Commit f0592803 authored by Evren Kutar's avatar Evren Kutar

ADD refs GH-6 dgeni generated first version of docs. fix needed for links and css styles

parent 1cffc00a
<header class="api-profile-header">
<h1 class="api-profile-header-heading">dateformatter</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>dateformatter handles all date fields and returns humanized and jquery datepicker format dates</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>dateformatter(formObject);</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>
formObject
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">doItemAction</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<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>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>doItemAction($scope, key, todo, mode);</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>
$scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
key
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
todo
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
mode
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">generate</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<ul>
<li>generate function is inclusive for form generation
defines given scope&#39;s client_cmd, model, schema, form, token, object_id objects</li>
</ul>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>generate(scope, data);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
data
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-string">string</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">get_diff</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>get_diff(obj1, obj2);</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>
obj1
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
obj2
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">{object}</a></td>
<td><p>diff object of two given objects</p>
</td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">get_diff_array</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>extracts items of second array from the first array</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>get_diff_array(array1, array2, way);</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>
array1
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
array2
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
way
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-array">Array</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">get_form</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>Communicates with api with given scope object.</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>get_form(scope);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">get_list</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>gets list of related wf/model</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>get_list(scope);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">get_wf</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<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>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>get_wf(scope);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">group</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>group function to group form layout by form meta data for layout</p>
<p>grouping will use an object like below when parsing its items:</p>
<p><code>grouping = [
{
&quot;groups&quot;: [
{
&quot;group_title&quot;: &quot;title1&quot;,
&quot;items&quot;: [&quot;item1&quot;, &quot;item2&quot;, &quot;item3&quot;, &quot;item4&quot;],
}
],
&quot;layout&quot;: &quot;4&quot;,
&quot;collapse&quot;: False
},
{
&quot;groups&quot;: [
{
&quot;group_title&quot;: &quot;title2&quot;,
&quot;items&quot;: [&quot;item5&quot;, &quot;item6&quot;],
}
],
&quot;layout&quot;: &quot;2&quot;,
&quot;collapse&quot;: False
}]</code></p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>group(scope);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<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>
<h1>Function components in <code>formService</code></h1>
<div class="component-breakdown">
<div>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/formService/function/makeUrl">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><ul>
<li>generate function is inclusive for form generation
defines given scope&#39;s client_cmd, model, schema, form, token, object_id objects</li>
</ul>
</td>
</tr>
<tr>
<td><a href="api/formService/function/group">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><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>
</td>
</tr>
<tr>
<td><a href="api/formService/function/dateformatter">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><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>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_form">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><p>gets list of related wf/model</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_wf">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><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><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><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><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><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><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>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_diff">get_diff</a></td>
<td></td>
</tr>
<tr>
<td><a href="api/formService/function/get_diff_array">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><p>get item unicode name from titleMap</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/submit">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>
</tr>
</table>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">isValidDate</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>checks if given value can be parsed as Date object</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>isValidDate(dateValue);</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>
dateValue
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-boolean">boolean</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">isValidEmail</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>checks if given value is a valid email address.</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>isValidEmail(email);</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>
email
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-boolean">boolean</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">isValidTCNo</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>checks if given value is a valid identity number for Turkey.</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>isValidTCNo(tcno);</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>
tcno
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-boolean">boolean</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">item_from_array</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>get item unicode name from titleMap</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>item_from_array(item, array);</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>
item
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
array
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">makeUrl</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>this function generates url combining backend url and the related object properties for http requests</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>makeUrl(scope);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-string">string</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">pageData</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<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>
</div>
<div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">pathDecider</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>pathDecider is used to redirect related path by looking up the data in response</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>pathDecider(client_cmd, $scope, data);</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>
client_cmd
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
$scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
data
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">prepareFormItems</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<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>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>prepareFormItems(scope);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">redirectTo</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<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>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>redirectTo(scope, page);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
page
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">submit</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<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>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>submit($scope, redirectTo);</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>
$scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
redirectTo
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<h1>
<code>formService</code>
</h1>
<h2>Installation</h2>
<p>First include <code>undefined</code> in your HTML:</p>
<pre><code>&lt;script src=&quot;angular.js&quot;&gt;&#10;&lt;script src=&quot;&quot;&gt;</code></pre>
<p>You can download this file from the following places:</p>
<ul>
<li>
<a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a><br>
e.g. <code>//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/undefined</code>
</li>
<li>
<a href="http://bower.io">Bower</a><br>
e.g. <pre><code>bower install @X.Y.Z</code></pre>
</li>
<li>
<a href="http://code.angularjs.org/">code.angularjs.org</a><br>
e.g. <pre><code>&quot;//code.angularjs.org/X.Y.Z/&quot;</code></pre>
</li>
</ul>
<p>where X.Y.Z is the AngularJS version you are running.</p>
<p>Then load the module in your application by adding it as a dependent module:</p>
<pre><code>angular.module(&#39;app&#39;, [&#39;formService&#39;]);</code></pre>
<p>With that you&apos;re ready to get started!</p>
<p>The <code>formService</code> module provides generic services for auto generated forms.</p>
<div class="component-breakdown">
<h2>Module Components</h2>
<div>
<h3 class="component-heading" id="service">Service</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/formService/service/Generator">Generator</a></td>
<td><p>form service&#39;s Generator factory service handles all generic form operations</p>
</td>
</tr>
</table>
</div>
<div>
<h3 class="component-heading" id="function">Function</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/formService/function/makeUrl">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><ul>
<li>generate function is inclusive for form generation
defines given scope&#39;s client_cmd, model, schema, form, token, object_id objects</li>
</ul>
</td>
</tr>
<tr>
<td><a href="api/formService/function/group">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><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>
</td>
</tr>
<tr>
<td><a href="api/formService/function/dateformatter">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><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>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_form">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><p>gets list of related wf/model</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_wf">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><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><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><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><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><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><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>
</td>
</tr>
<tr>
<td><a href="api/formService/function/get_diff">get_diff</a></td>
<td></td>
</tr>
<tr>
<td><a href="api/formService/function/get_diff_array">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><p>get item unicode name from titleMap</p>
</td>
</tr>
<tr>
<td><a href="api/formService/function/submit">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>
</tr>
</table>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">Generator</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- service in module <a href="api/formService">formService</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>form service&#39;s Generator factory service handles all generic form operations</p>
</div>
<div>
</div>
<h1>Service components in <code>formService</code></h1>
<div class="component-breakdown">
<div>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/formService/service/Generator">Generator</a></td>
<td><p>form service&#39;s Generator factory service handles all generic form operations</p>
</td>
</tr>
</table>
</div>
</div>
<h1>Controller 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="api/ulakbus.crud/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>
</td>
</tr>
<tr>
<td><a href="api/ulakbus.crud/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;]
There are 3 directives to manipulate controllers scope objects in crud.html</p>
</td>
</tr>
</table>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">generateParam</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>generateParam is a function to generate required params to post backend api.</p>
<p>scope</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>generateParam(scope, routeParams, cmd);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
routeParams
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
cmd
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
<h3>Returns</h3>
<table class="variables-matrix return-arguments">
<tr>
<td><a href="" class="label type-hint type-hint-object">*</a></td>
<td></td>
</tr>
</table>
</div>
<h1>Function 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="api/ulakbus.crud/function/generateParam">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><p>listPageItems is a function to prepare objects to list in the list page.</p>
</td>
</tr>
</table>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">listPageItems</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- function in module <a href="api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>listPageItems is a function to prepare objects to list in the list page.</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>listPageItems(scope, pageData);</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>
scope
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
pageData
</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
</section>
</div>
<h1>
<code>ulakbus.crud</code>
</h1>
<h2>Installation</h2>
<p>First include <code>undefined</code> in your HTML:</p>
<pre><code>&lt;script src=&quot;angular.js&quot;&gt;&#10;&lt;script src=&quot;&quot;&gt;</code></pre>
<p>You can download this file from the following places:</p>
<ul>
<li>
<a href="https://developers.google.com/speed/libraries/devguide#angularjs">Google CDN</a><br>
e.g. <code>//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/undefined</code>
</li>
<li>
<a href="http://bower.io">Bower</a><br>
e.g. <pre><code>bower install @X.Y.Z</code></pre>
</li>
<li>
<a href="http://code.angularjs.org/">code.angularjs.org</a><br>
e.g. <pre><code>&quot;//code.angularjs.org/X.Y.Z/&quot;</code></pre>
</li>
</ul>
<p>where X.Y.Z is the AngularJS version you are running.</p>
<p>Then load the module in your application by adding it as a dependent module:</p>
<pre><code>angular.module(&#39;app&#39;, [&#39;ulakbus.crud&#39;]);</code></pre>
<p>With that you&apos;re ready to get started!</p>
<p>ulakbus.crud module is the main module for ui. It interacts with backend and manipulate data to screen generically.</p>
<div class="component-breakdown">
<h2>Module Components</h2>
<div>
<h3 class="component-heading" id="service">Service</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/ulakbus.crud/service/CrudUtility">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>
</table>
</div>
<div>
<h3 class="component-heading" id="function">Function</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/ulakbus.crud/function/generateParam">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><p>listPageItems is a function to prepare objects to list in the list page.</p>
</td>
</tr>
</table>
</div>
<div>
<h3 class="component-heading" id="controller">Controller</h3>
<table class="definition-table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="api/ulakbus.crud/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>
</td>
</tr>
<tr>
<td><a href="api/ulakbus.crud/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;]
There are 3 directives to manipulate controllers scope objects in crud.html</p>
</td>
</tr>
</table>
</div>
</div>
<header class="api-profile-header">
<h1 class="api-profile-header-heading">CrudUtility</h1>
<ol class="api-profile-header-structure naked-list step-list">
<li>
- service in module <a href="api/ulakbus.crud">ulakbus.crud</a>
</li>
</ol>
</header>
<div class="api-profile-description">
<p>Crud Utility is a service to provide generic functions for Crud controllers to format data and scope object.</p>
</div>
<div>
<h2 id="usage">Usage</h2>
<p><code>CrudUtility();</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>
<h1>Service 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="api/ulakbus.crud/service/CrudUtility">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>
</table>
</div>
</div>
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