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
5300be68
Commit
5300be68
authored
Sep 11, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
datepicker has resolved for all forms
parent
3dc0b101
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
app.js
app/app.js
+2
-1
form_service.js
app/zetalib/forms/form_service.js
+6
-14
No files found.
app/app.js
View file @
5300be68
...
...
@@ -24,7 +24,7 @@ var app = angular.module(
//'ulakbus.version',
'schemaForm'
,
'gettext'
,
//
'templates-prod'
'templates-prod'
]).
/**
* RESTURL is the url of rest api to talk
...
...
@@ -32,6 +32,7 @@ var app = angular.module(
*/
constant
(
"RESTURL"
,
(
function
()
{
return
{
url
:
"http://"
+
window
.
location
.
hostname
+
":9001/"
};
//return {url: "http://api.ulakbus.net/"};
})()).
/**
* USER_ROLES and AUTH_EVENTS are constant for auth functions
...
...
app/zetalib/forms/form_service.js
View file @
5300be68
...
...
@@ -28,23 +28,15 @@ form_generator.factory('Generator', function ($http, $q, $log, $modal, $timeout,
angular
.
forEach
(
scope
.
schema
.
properties
,
function
(
k
,
v
)
{
// check if type is date and if type date found change it to string
// and give it 'type':'template' property and load it with template
if
(
k
.
type
==
'date'
)
{
k
.
title
=
k
.
title
;
scope
.
form
[
scope
.
form
.
indexOf
(
v
)]
=
{
"type"
:
"template"
,
"templateUrl"
:
"shared/templates/datefield.html"
,
"title"
:
k
.
title
,
"key"
:
k
.
name
};
debugger
;
scope
.
model
[
k
.
name
]
=
generator
.
dateformatter
(
scope
.
model
[
k
.
name
]);
k
.
type
=
'string'
;
// seek for datepicker field and initialize datepicker
scope
.
$watch
(
angular
.
element
(
$
(
'.datepickerfield'
)),
function
(){
console
.
log
(
'date field initialized'
);
$
(
'.datepickerfield'
).
datepicker
();
//// seek for datepicker field and initialize datepicker
scope
.
$watch
(
$
(
'#'
+
v
),
function
(){
$timeout
(
function
()
{
jQuery
(
'#'
+
v
).
datepicker
();
});
});
}
...
...
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