Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
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
Muhammad Usman
PERFORMA_REPLICA
Commits
b98a14ac
Commit
b98a14ac
authored
Nov 01, 2018
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding google address field to capture google location in J001
parent
868d0474
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
363 additions
and
49 deletions
+363
-49
Job.xml
cmsWebApp/sql/Job.xml
+1
-0
Job.sql
cmsWebApp/sql/ms/Job.sql
+1
-0
Job.sql
cmsWebApp/sql/oracle/Job.sql
+1
-0
Job.sql
cmsWebApp/sql/postgres/Job.sql
+1
-0
BaseJob.java
cmsWebApp/src/performa/orm/BaseJob.java
+216
-0
Job.xml
cmsWebApp/src/performa/orm/Job.xml
+1
-0
JobPersistenceMgr.java
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
+11
-6
job_detail.jsp
cmsWebApp/webroot/extensions/adminportal/job_detail.jsp
+13
-2
20181031_Alter_Job.xml
...ot/extensions/adminportal/upgrades/20181031_Alter_Job.xml
+8
-41
google_address.js
cmsWebApp/webroot/scripts/google_address.js
+110
-0
No files found.
cmsWebApp/sql/Job.xml
View file @
b98a14ac
...
...
@@ -32,6 +32,7 @@
<column
name=
"industry"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"culture_statement"
type=
"String"
nullable=
"true"
length=
"2000"
/>
<column
name=
"draft_location"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"google_address_text"
type=
"String"
nullable=
"true"
length=
"300"
/>
<column
name=
"level_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"client_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"job_owner_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
...
...
cmsWebApp/sql/ms/Job.sql
View file @
b98a14ac
...
...
@@ -32,6 +32,7 @@ CREATE TABLE tl_job (
industry
varchar
(
200
)
NULL
,
culture_statement
varchar
(
2000
)
NULL
,
draft_location
varchar
(
200
)
NULL
,
google_address_text
varchar
(
300
)
NULL
,
level_id
numeric
(
12
)
NULL
,
client_id
numeric
(
12
)
NULL
,
job_owner_id
numeric
(
12
)
NULL
,
...
...
cmsWebApp/sql/oracle/Job.sql
View file @
b98a14ac
...
...
@@ -33,6 +33,7 @@ CREATE TABLE tl_job (
industry
varchar2
(
200
)
NULL
,
culture_statement
varchar2
(
2000
)
NULL
,
draft_location
varchar2
(
200
)
NULL
,
google_address_text
varchar2
(
300
)
NULL
,
level_id
number
(
12
)
NULL
,
client_id
number
(
12
)
NULL
,
job_owner_id
number
(
12
)
NULL
,
...
...
cmsWebApp/sql/postgres/Job.sql
View file @
b98a14ac
...
...
@@ -33,6 +33,7 @@ CREATE TABLE tl_job (
industry
varchar
(
200
)
NULL
,
culture_statement
varchar
(
2000
)
NULL
,
draft_location
varchar
(
200
)
NULL
,
google_address_text
varchar
(
300
)
NULL
,
level_id
numeric
(
12
)
NULL
,
client_id
numeric
(
12
)
NULL
,
job_owner_id
numeric
(
12
)
NULL
,
...
...
cmsWebApp/src/performa/orm/BaseJob.java
View file @
b98a14ac
...
...
@@ -68,6 +68,7 @@ public abstract class BaseJob extends BaseBusinessClass
public
static
final
String
FIELD_Industry
=
"Industry"
;
public
static
final
String
FIELD_CultureStatement
=
"CultureStatement"
;
public
static
final
String
FIELD_DraftLocation
=
"DraftLocation"
;
public
static
final
String
FIELD_GoogleAddressText
=
"GoogleAddressText"
;
public
static
final
String
FIELD_Email
=
"Email"
;
public
static
final
String
FIELD_Password
=
"Password"
;
public
static
final
String
FIELD_ConfirmPassword
=
"ConfirmPassword"
;
...
...
@@ -136,6 +137,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
static
final
EnumeratedAttributeHelper
<
Job
,
Industry
>
HELPER_Industry
=
new
EnumeratedAttributeHelper
<
Job
,
Industry
>
(
Industry
.
FACTORY_Industry
);
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_CultureStatement
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
EnumeratedAttributeHelper
<
Job
,
DraftLocation
>
HELPER_DraftLocation
=
new
EnumeratedAttributeHelper
<
Job
,
DraftLocation
>
(
DraftLocation
.
FACTORY_DraftLocation
);
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_GoogleAddressText
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_Email
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_Password
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
DefaultAttributeHelper
<
Job
>
HELPER_ConfirmPassword
=
DefaultAttributeHelper
.
INSTANCE
;
...
...
@@ -178,6 +180,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
Industry
_Industry
;
private
String
_CultureStatement
;
private
DraftLocation
_DraftLocation
;
private
String
_GoogleAddressText
;
private
String
_Email
;
private
String
_Password
;
private
String
_ConfirmPassword
;
...
...
@@ -259,6 +262,7 @@ public abstract class BaseJob extends BaseBusinessClass
private
static
final
AttributeValidator
[]
FIELD_Industry_Validators
;
private
static
final
AttributeValidator
[]
FIELD_CultureStatement_Validators
;
private
static
final
AttributeValidator
[]
FIELD_DraftLocation_Validators
;
private
static
final
AttributeValidator
[]
FIELD_GoogleAddressText_Validators
;
// Arrays of behaviour decorators
...
...
@@ -331,6 +335,7 @@ public abstract class BaseJob extends BaseBusinessClass
FIELD_Industry_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_Industry
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_CultureStatement_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_CultureStatement
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_DraftLocation_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_DraftLocation
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
FIELD_GoogleAddressText_Validators
=
(
AttributeValidator
[])
setupAttribMetaData_GoogleAddressText
(
validatorMapping
).
toArray
(
new
AttributeValidator
[
0
]);
REFERENCE_Job
.
initialiseReference
();
...
...
@@ -1278,6 +1283,25 @@ public abstract class BaseJob extends BaseBusinessClass
return
validators
;
}
// Meta Info setup
private
static
List
setupAttribMetaData_GoogleAddressText
(
Map
validatorMapping
)
{
Map
metaInfo
=
new
HashMap
();
metaInfo
.
put
(
"dbcol"
,
"google_address_text"
);
metaInfo
.
put
(
"length"
,
"300"
);
metaInfo
.
put
(
"name"
,
"GoogleAddressText"
);
metaInfo
.
put
(
"type"
,
"String"
);
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
DEBUG2
,
"Metadata for Job.GoogleAddressText:"
,
metaInfo
);
ATTRIBUTES_METADATA_Job
.
put
(
FIELD_GoogleAddressText
,
Collections
.
unmodifiableMap
(
metaInfo
));
List
validators
=
BaseBusinessClass
.
getAttribValidators
(
Job
.
class
,
"GoogleAddressText"
,
metaInfo
,
validatorMapping
);
LogMgr
.
log
(
BUSINESS_OBJECTS
,
LogLevel
.
DEBUG1
,
"Validators for Job.GoogleAddressText:"
,
validators
);
return
validators
;
}
// END OF STATIC METADATA DEFINITION
...
...
@@ -1329,6 +1353,7 @@ public abstract class BaseJob extends BaseBusinessClass
_Industry
=
(
Industry
)(
HELPER_Industry
.
initialise
(
_Industry
));
_CultureStatement
=
(
String
)(
HELPER_CultureStatement
.
initialise
(
_CultureStatement
));
_DraftLocation
=
(
DraftLocation
)(
HELPER_DraftLocation
.
initialise
(
_DraftLocation
));
_GoogleAddressText
=
(
String
)(
HELPER_GoogleAddressText
.
initialise
(
_GoogleAddressText
));
_Email
=
(
String
)(
HELPER_Email
.
initialise
(
_Email
));
_Password
=
(
String
)(
HELPER_Password
.
initialise
(
_Password
));
_ConfirmPassword
=
(
String
)(
HELPER_ConfirmPassword
.
initialise
(
_ConfirmPassword
));
...
...
@@ -3757,6 +3782,104 @@ public abstract class BaseJob extends BaseBusinessClass
}
/**
* Get the attribute GoogleAddressText
*/
public
String
getGoogleAddressText
()
{
assertValid
();
String
valToReturn
=
_GoogleAddressText
;
for
(
JobBehaviourDecorator
bhd
:
Job_BehaviourDecorators
)
{
valToReturn
=
bhd
.
getGoogleAddressText
((
Job
)
this
,
valToReturn
);
}
return
valToReturn
;
}
/**
* Called prior to the attribute changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected
void
preGoogleAddressTextChange
(
String
newGoogleAddressText
)
throws
FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected
void
postGoogleAddressTextChange
()
throws
FieldException
{
}
public
FieldWriteability
getWriteability_GoogleAddressText
()
{
return
getFieldWritabilityUtil
(
FieldWriteability
.
TRUE
);
}
/**
* Set the attribute GoogleAddressText. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public
void
setGoogleAddressText
(
String
newGoogleAddressText
)
throws
FieldException
{
boolean
oldAndNewIdentical
=
HELPER_GoogleAddressText
.
compare
(
_GoogleAddressText
,
newGoogleAddressText
);
try
{
for
(
JobBehaviourDecorator
bhd
:
Job_BehaviourDecorators
)
{
newGoogleAddressText
=
bhd
.
setGoogleAddressText
((
Job
)
this
,
newGoogleAddressText
);
oldAndNewIdentical
=
HELPER_GoogleAddressText
.
compare
(
_GoogleAddressText
,
newGoogleAddressText
);
}
if
(
FIELD_GoogleAddressText_Validators
.
length
>
0
)
{
Object
newGoogleAddressTextObj
=
HELPER_GoogleAddressText
.
toObject
(
newGoogleAddressText
);
if
(
newGoogleAddressTextObj
!=
null
)
{
int
loopMax
=
FIELD_GoogleAddressText_Validators
.
length
;
Map
metadata
=
(
Map
)
ATTRIBUTES_METADATA_Job
.
get
(
FIELD_GoogleAddressText
);
for
(
int
v
=
0
;
v
<
loopMax
;
++
v
)
{
FIELD_GoogleAddressText_Validators
[
v
].
checkAttribute
(
this
,
FIELD_GoogleAddressText
,
metadata
,
newGoogleAddressTextObj
);
}
}
}
}
catch
(
FieldException
e
)
{
if
(!
oldAndNewIdentical
)
{
e
.
setWouldModify
();
}
throw
e
;
}
if
(!
oldAndNewIdentical
)
{
assertValid
();
Debug
.
assertion
(
getWriteability_GoogleAddressText
()
!=
FieldWriteability
.
FALSE
,
"Field GoogleAddressText is not writeable"
);
preGoogleAddressTextChange
(
newGoogleAddressText
);
markFieldChange
(
FIELD_GoogleAddressText
);
_GoogleAddressText
=
newGoogleAddressText
;
postFieldChange
(
FIELD_GoogleAddressText
);
postGoogleAddressTextChange
();
}
}
/**
* Get the attribute Email
*/
public
String
getEmail
()
...
...
@@ -7265,6 +7388,7 @@ public abstract class BaseJob extends BaseBusinessClass
tl_jobPSet
.
setAttrib
(
FIELD_Industry
,
HELPER_Industry
.
toObject
(
_Industry
));
//
tl_jobPSet
.
setAttrib
(
FIELD_CultureStatement
,
HELPER_CultureStatement
.
toObject
(
_CultureStatement
));
//
tl_jobPSet
.
setAttrib
(
FIELD_DraftLocation
,
HELPER_DraftLocation
.
toObject
(
_DraftLocation
));
//
tl_jobPSet
.
setAttrib
(
FIELD_GoogleAddressText
,
HELPER_GoogleAddressText
.
toObject
(
_GoogleAddressText
));
//
_Level
.
getPersistentSets
(
allSets
);
_Client
.
getPersistentSets
(
allSets
);
_JobOwner
.
getPersistentSets
(
allSets
);
...
...
@@ -7310,6 +7434,7 @@ public abstract class BaseJob extends BaseBusinessClass
_Industry
=
(
Industry
)(
HELPER_Industry
.
fromObject
(
_Industry
,
tl_jobPSet
.
getAttrib
(
FIELD_Industry
)));
//
_CultureStatement
=
(
String
)(
HELPER_CultureStatement
.
fromObject
(
_CultureStatement
,
tl_jobPSet
.
getAttrib
(
FIELD_CultureStatement
)));
//
_DraftLocation
=
(
DraftLocation
)(
HELPER_DraftLocation
.
fromObject
(
_DraftLocation
,
tl_jobPSet
.
getAttrib
(
FIELD_DraftLocation
)));
//
_GoogleAddressText
=
(
String
)(
HELPER_GoogleAddressText
.
fromObject
(
_GoogleAddressText
,
tl_jobPSet
.
getAttrib
(
FIELD_GoogleAddressText
)));
//
_Level
.
setFromPersistentSets
(
objectID
,
allSets
);
_Client
.
setFromPersistentSets
(
objectID
,
allSets
);
_JobOwner
.
setFromPersistentSets
(
objectID
,
allSets
);
...
...
@@ -7548,6 +7673,15 @@ public abstract class BaseJob extends BaseBusinessClass
e
.
addException
(
ex
);
}
try
{
setGoogleAddressText
(
otherJob
.
getGoogleAddressText
());
}
catch
(
FieldException
ex
)
{
e
.
addException
(
ex
);
}
}
}
...
...
@@ -7587,6 +7721,7 @@ public abstract class BaseJob extends BaseBusinessClass
_Industry
=
sourceJob
.
_Industry
;
_CultureStatement
=
sourceJob
.
_CultureStatement
;
_DraftLocation
=
sourceJob
.
_DraftLocation
;
_GoogleAddressText
=
sourceJob
.
_GoogleAddressText
;
_Email
=
sourceJob
.
_Email
;
_Password
=
sourceJob
.
_Password
;
_ConfirmPassword
=
sourceJob
.
_ConfirmPassword
;
...
...
@@ -7693,6 +7828,7 @@ public abstract class BaseJob extends BaseBusinessClass
_Industry
=
(
Industry
)(
HELPER_Industry
.
readExternal
(
_Industry
,
vals
.
get
(
FIELD_Industry
)));
//
_CultureStatement
=
(
String
)(
HELPER_CultureStatement
.
readExternal
(
_CultureStatement
,
vals
.
get
(
FIELD_CultureStatement
)));
//
_DraftLocation
=
(
DraftLocation
)(
HELPER_DraftLocation
.
readExternal
(
_DraftLocation
,
vals
.
get
(
FIELD_DraftLocation
)));
//
_GoogleAddressText
=
(
String
)(
HELPER_GoogleAddressText
.
readExternal
(
_GoogleAddressText
,
vals
.
get
(
FIELD_GoogleAddressText
)));
//
_Email
=
(
String
)(
HELPER_Email
.
readExternal
(
_Email
,
vals
.
get
(
FIELD_Email
)));
//
_Password
=
(
String
)(
HELPER_Password
.
readExternal
(
_Password
,
vals
.
get
(
FIELD_Password
)));
//
_ConfirmPassword
=
(
String
)(
HELPER_ConfirmPassword
.
readExternal
(
_ConfirmPassword
,
vals
.
get
(
FIELD_ConfirmPassword
)));
//
...
...
@@ -7758,6 +7894,7 @@ public abstract class BaseJob extends BaseBusinessClass
vals
.
put
(
FIELD_Industry
,
HELPER_Industry
.
writeExternal
(
_Industry
));
vals
.
put
(
FIELD_CultureStatement
,
HELPER_CultureStatement
.
writeExternal
(
_CultureStatement
));
vals
.
put
(
FIELD_DraftLocation
,
HELPER_DraftLocation
.
writeExternal
(
_DraftLocation
));
vals
.
put
(
FIELD_GoogleAddressText
,
HELPER_GoogleAddressText
.
writeExternal
(
_GoogleAddressText
));
vals
.
put
(
FIELD_Email
,
HELPER_Email
.
writeExternal
(
_Email
));
vals
.
put
(
FIELD_Password
,
HELPER_Password
.
writeExternal
(
_Password
));
vals
.
put
(
FIELD_ConfirmPassword
,
HELPER_ConfirmPassword
.
writeExternal
(
_ConfirmPassword
));
...
...
@@ -7897,6 +8034,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
listener
.
notifyFieldChange
(
this
,
other
,
FIELD_DraftLocation
,
HELPER_DraftLocation
.
toObject
(
this
.
_DraftLocation
),
HELPER_DraftLocation
.
toObject
(
otherJob
.
_DraftLocation
));
}
if
(!
HELPER_GoogleAddressText
.
compare
(
this
.
_GoogleAddressText
,
otherJob
.
_GoogleAddressText
))
{
listener
.
notifyFieldChange
(
this
,
other
,
FIELD_GoogleAddressText
,
HELPER_GoogleAddressText
.
toObject
(
this
.
_GoogleAddressText
),
HELPER_GoogleAddressText
.
toObject
(
otherJob
.
_GoogleAddressText
));
}
// Compare single assocs
_AssessmentTemplate
.
compare
(
otherJob
.
_AssessmentTemplate
,
listener
);
...
...
@@ -7973,6 +8114,7 @@ public abstract class BaseJob extends BaseBusinessClass
visitor
.
visitField
(
this
,
FIELD_Industry
,
HELPER_Industry
.
toObject
(
getIndustry
()));
visitor
.
visitField
(
this
,
FIELD_CultureStatement
,
HELPER_CultureStatement
.
toObject
(
getCultureStatement
()));
visitor
.
visitField
(
this
,
FIELD_DraftLocation
,
HELPER_DraftLocation
.
toObject
(
getDraftLocation
()));
visitor
.
visitField
(
this
,
FIELD_GoogleAddressText
,
HELPER_GoogleAddressText
.
toObject
(
getGoogleAddressText
()));
visitor
.
visitAssociation
(
_AssessmentTemplate
);
visitor
.
visitAssociation
(
_CultureTemplate
);
visitor
.
visitAssociation
(
_JobTemplate
);
...
...
@@ -8177,6 +8319,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
filter
.
matches
(
getDraftLocation
());
}
else
if
(
attribName
.
equals
(
FIELD_GoogleAddressText
))
{
return
filter
.
matches
(
getGoogleAddressText
());
}
else
if
(
attribName
.
equals
(
SINGLEREFERENCE_Level
))
{
return
filter
.
matches
(
getLevel
());
...
...
@@ -8380,6 +8526,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchAll
andGoogleAddressText
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.google_address_text"
,
"GoogleAddressText"
);
return
this
;
}
public
SearchAll
andLevel
(
QueryFilter
<
Level
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
...
@@ -8629,6 +8781,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchJobKey
andGoogleAddressText
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.google_address_text"
,
"GoogleAddressText"
);
return
this
;
}
public
SearchJobKey
andLevel
(
QueryFilter
<
Level
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
...
@@ -8872,6 +9030,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchCompany
andGoogleAddressText
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.google_address_text"
,
"GoogleAddressText"
);
return
this
;
}
public
SearchCompany
andLevel
(
QueryFilter
<
Level
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
...
@@ -9116,6 +9280,12 @@ public abstract class BaseJob extends BaseBusinessClass
return
this
;
}
public
SearchDetails
andGoogleAddressText
(
QueryFilter
<
String
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.google_address_text"
,
"GoogleAddressText"
);
return
this
;
}
public
SearchDetails
andLevel
(
QueryFilter
<
Level
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job.level_id"
,
"Level"
);
...
...
@@ -9290,6 +9460,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
HELPER_DraftLocation
.
toObject
(
getDraftLocation
());
}
else
if
(
attribName
.
equals
(
FIELD_GoogleAddressText
))
{
return
HELPER_GoogleAddressText
.
toObject
(
getGoogleAddressText
());
}
else
if
(
attribName
.
equals
(
FIELD_Email
))
{
return
HELPER_Email
.
toObject
(
getEmail
());
...
...
@@ -9459,6 +9633,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
HELPER_DraftLocation
;
}
else
if
(
attribName
.
equals
(
FIELD_GoogleAddressText
))
{
return
HELPER_GoogleAddressText
;
}
else
if
(
attribName
.
equals
(
FIELD_Email
))
{
return
HELPER_Email
;
...
...
@@ -9628,6 +9806,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
setDraftLocation
((
DraftLocation
)(
HELPER_DraftLocation
.
fromObject
(
_DraftLocation
,
attribValue
)));
}
else
if
(
attribName
.
equals
(
FIELD_GoogleAddressText
))
{
setGoogleAddressText
((
String
)(
HELPER_GoogleAddressText
.
fromObject
(
_GoogleAddressText
,
attribValue
)));
}
else
if
(
attribName
.
equals
(
FIELD_Email
))
{
setEmail
((
String
)(
HELPER_Email
.
fromObject
(
_Email
,
attribValue
)));
...
...
@@ -9804,6 +9986,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
getWriteability_DraftLocation
();
}
else
if
(
fieldName
.
equals
(
FIELD_GoogleAddressText
))
{
return
getWriteability_GoogleAddressText
();
}
else
if
(
fieldName
.
equals
(
MULTIPLEREFERENCE_JobApplications
))
{
return
getWriteability_JobApplications
();
...
...
@@ -10054,6 +10240,11 @@ public abstract class BaseJob extends BaseBusinessClass
fields
.
add
(
FIELD_DraftLocation
);
}
if
(
getWriteability_GoogleAddressText
()
!=
FieldWriteability
.
TRUE
)
{
fields
.
add
(
FIELD_GoogleAddressText
);
}
if
(
getWriteability_Email
()
!=
FieldWriteability
.
TRUE
)
{
fields
.
add
(
FIELD_Email
);
...
...
@@ -10162,6 +10353,7 @@ public abstract class BaseJob extends BaseBusinessClass
result
.
add
(
HELPER_Industry
.
getAttribObject
(
getClass
(),
_Industry
,
false
,
FIELD_Industry
));
result
.
add
(
HELPER_CultureStatement
.
getAttribObject
(
getClass
(),
_CultureStatement
,
false
,
FIELD_CultureStatement
));
result
.
add
(
HELPER_DraftLocation
.
getAttribObject
(
getClass
(),
_DraftLocation
,
false
,
FIELD_DraftLocation
));
result
.
add
(
HELPER_GoogleAddressText
.
getAttribObject
(
getClass
(),
_GoogleAddressText
,
false
,
FIELD_GoogleAddressText
));
result
.
add
(
HELPER_Email
.
getAttribObject
(
getClass
(),
_Email
,
false
,
FIELD_Email
));
result
.
add
(
HELPER_Password
.
getAttribObject
(
getClass
(),
_Password
,
false
,
FIELD_Password
));
result
.
add
(
HELPER_ConfirmPassword
.
getAttribObject
(
getClass
(),
_ConfirmPassword
,
false
,
FIELD_ConfirmPassword
));
...
...
@@ -10660,6 +10852,24 @@ public abstract class BaseJob extends BaseBusinessClass
}
/**
* Get the attribute GoogleAddressText
*/
public
String
getGoogleAddressText
(
Job
obj
,
String
original
)
{
return
original
;
}
/**
* Change the value set for attribute GoogleAddressText.
* May modify the field beforehand
* Occurs before validation.
*/
public
String
setGoogleAddressText
(
Job
obj
,
String
newGoogleAddressText
)
throws
FieldException
{
return
newGoogleAddressText
;
}
/**
* Get the attribute Email
*/
public
String
getEmail
(
Job
obj
,
String
original
)
...
...
@@ -11169,6 +11379,10 @@ public abstract class BaseJob extends BaseBusinessClass
{
return
toDraftLocation
();
}
if
(
name
.
equals
(
"GoogleAddressText"
))
{
return
toGoogleAddressText
();
}
if
(
name
.
equals
(
"Level"
))
{
return
toLevel
();
...
...
@@ -11280,6 +11494,8 @@ public abstract class BaseJob extends BaseBusinessClass
public
PipeLine
<
From
,
String
>
toCultureStatement
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
String
>(
FIELD_CultureStatement
));
}
public
PipeLine
<
From
,
DraftLocation
>
toDraftLocation
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
DraftLocation
>(
FIELD_DraftLocation
));
}
public
PipeLine
<
From
,
String
>
toGoogleAddressText
()
{
return
pipe
(
new
ORMAttributePipe
<
Me
,
String
>(
FIELD_GoogleAddressText
));
}
public
AssessmentCriteriaTemplate
.
AssessmentCriteriaTemplatePipeLineFactory
<
From
,
AssessmentCriteriaTemplate
>
toAssessmentTemplate
()
{
return
toAssessmentTemplate
(
Filter
.
ALL
);
}
public
AssessmentCriteriaTemplate
.
AssessmentCriteriaTemplatePipeLineFactory
<
From
,
AssessmentCriteriaTemplate
>
toAssessmentTemplate
(
Filter
<
AssessmentCriteriaTemplate
>
filter
)
...
...
cmsWebApp/src/performa/orm/Job.xml
View file @
b98a14ac
...
...
@@ -59,6 +59,7 @@
<ATTRIB
name=
"Industry"
type=
"Industry"
dbcol=
"industry"
attribHelper=
"EnumeratedAttributeHelper"
/>
<ATTRIB
name=
"CultureStatement"
type=
"String"
dbcol=
"culture_statement"
length=
"2000"
/>
<ATTRIB
name=
"DraftLocation"
type=
"DraftLocation"
dbcol=
"draft_location"
attribHelper=
"EnumeratedAttributeHelper"
/>
<ATTRIB
name=
"GoogleAddressText"
type=
"String"
dbcol=
"google_address_text"
length=
"300"
/>
<SINGLEREFERENCE
name=
"Level"
type=
"Level"
dbcol=
"level_id"
mandatory=
"false"
/>
<SINGLEREFERENCE
name=
"Client"
type=
"Client"
dbcol=
"client_id"
backreferenceName=
"Jobs"
/>
...
...
cmsWebApp/src/performa/orm/JobPersistenceMgr.java
View file @
b98a14ac
...
...
@@ -53,6 +53,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
private
Industry
dummyIndustry
;
private
String
dummyCultureStatement
;
private
DraftLocation
dummyDraftLocation
;
private
String
dummyGoogleAddressText
;
// Static constants corresponding to attribute helpers
...
...
@@ -80,6 +81,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
private
static
final
EnumeratedAttributeHelper
HELPER_Industry
=
new
EnumeratedAttributeHelper
(
Industry
.
FACTORY_Industry
);
private
static
final
DefaultAttributeHelper
HELPER_CultureStatement
=
DefaultAttributeHelper
.
INSTANCE
;
private
static
final
EnumeratedAttributeHelper
HELPER_DraftLocation
=
new
EnumeratedAttributeHelper
(
DraftLocation
.
FACTORY_DraftLocation
);
private
static
final
DefaultAttributeHelper
HELPER_GoogleAddressText
=
DefaultAttributeHelper
.
INSTANCE
;
...
...
@@ -110,10 +112,11 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
dummyIndustry
=
(
Industry
)(
HELPER_Industry
.
initialise
(
dummyIndustry
));
dummyCultureStatement
=
(
String
)(
HELPER_CultureStatement
.
initialise
(
dummyCultureStatement
));
dummyDraftLocation
=
(
DraftLocation
)(
HELPER_DraftLocation
.
initialise
(
dummyDraftLocation
));
dummyGoogleAddressText
=
(
String
)(
HELPER_GoogleAddressText
.
initialise
(
dummyGoogleAddressText
));
}
private
String
SELECT_COLUMNS
=
"{PREFIX}tl_job.object_id as id, {PREFIX}tl_job.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_job.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_job.job_title, {PREFIX}tl_job.job_description, {PREFIX}tl_job.job_status, {PREFIX}tl_job.open_date, {PREFIX}tl_job.apply_by, {PREFIX}tl_job.include_assessment_criteria, {PREFIX}tl_job.assessment_type, {PREFIX}tl_job.random_key, {PREFIX}tl_job.job_type, {PREFIX}tl_job.ref_number, {PREFIX}tl_job.last_status_change_date, {PREFIX}tl_job.remote, {PREFIX}tl_job.city, {PREFIX}tl_job.postcode, {PREFIX}tl_job.location_radius, {PREFIX}tl_job.state, {PREFIX}tl_job.country, {PREFIX}tl_job.require_cv, {PREFIX}tl_job.manually_closed, {PREFIX}tl_job.last_edited, {PREFIX}tl_job.is_ppj, {PREFIX}tl_job.industry, {PREFIX}tl_job.culture_statement, {PREFIX}tl_job.draft_location, {PREFIX}tl_job.level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.job_owner_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.hiring_team_id, {PREFIX}tl_job.occupation_id, {PREFIX}tl_job.shortened_url_id, 1 AS commasafe "
;
private
String
SELECT_COLUMNS
=
"{PREFIX}tl_job.object_id as id, {PREFIX}tl_job.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}tl_job.object_CREATED_DATE as CREATED_DATE, {PREFIX}tl_job.job_title, {PREFIX}tl_job.job_description, {PREFIX}tl_job.job_status, {PREFIX}tl_job.open_date, {PREFIX}tl_job.apply_by, {PREFIX}tl_job.include_assessment_criteria, {PREFIX}tl_job.assessment_type, {PREFIX}tl_job.random_key, {PREFIX}tl_job.job_type, {PREFIX}tl_job.ref_number, {PREFIX}tl_job.last_status_change_date, {PREFIX}tl_job.remote, {PREFIX}tl_job.city, {PREFIX}tl_job.postcode, {PREFIX}tl_job.location_radius, {PREFIX}tl_job.state, {PREFIX}tl_job.country, {PREFIX}tl_job.require_cv, {PREFIX}tl_job.manually_closed, {PREFIX}tl_job.last_edited, {PREFIX}tl_job.is_ppj, {PREFIX}tl_job.industry, {PREFIX}tl_job.culture_statement, {PREFIX}tl_job.draft_location, {PREFIX}tl_job.
google_address_text, {PREFIX}tl_job.
level_id, {PREFIX}tl_job.client_id, {PREFIX}tl_job.job_owner_id, {PREFIX}tl_job.company_user_id, {PREFIX}tl_job.hiring_team_id, {PREFIX}tl_job.occupation_id, {PREFIX}tl_job.shortened_url_id, 1 AS commasafe "
;
private
String
SELECT_JOINS
=
""
;
public
BaseBusinessClass
fetchByID
(
ObjectID
id
,
PersistentSetCollection
allPSets
,
RDBMSPersistenceContext
context
,
SQLManager
sqlMgr
)
throws
SQLException
,
StorageException
...
...
@@ -188,6 +191,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_Industry
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_CultureStatement
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_DraftLocation
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
FIELD_GoogleAddressText
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Level
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_Client
)||
!
tl_jobPSet
.
containsAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)||
...
...
@@ -274,10 +278,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
int
rowsUpdated
=
executeStatement
(
sqlMgr
,
"UPDATE {PREFIX}tl_job "
+
"SET job_title = ?, job_description = ?, job_status = ?, open_date = ?, apply_by = ?, include_assessment_criteria = ?, assessment_type = ?, random_key = ?, job_type = ?, ref_number = ?, last_status_change_date = ?, remote = ?, city = ?, postcode = ?, location_radius = ?, state = ?, country = ?, require_cv = ?, manually_closed = ?, last_edited = ?, is_ppj = ?, industry = ?, culture_statement = ?, draft_location = ?, level_id = ? , client_id = ? , job_owner_id = ? , company_user_id = ? , hiring_team_id = ? , occupation_id = ? , shortened_url_id = ? , object_LAST_UPDATED_DATE = "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
" "
+
"SET job_title = ?, job_description = ?, job_status = ?, open_date = ?, apply_by = ?, include_assessment_criteria = ?, assessment_type = ?, random_key = ?, job_type = ?, ref_number = ?, last_status_change_date = ?, remote = ?, city = ?, postcode = ?, location_radius = ?, state = ?, country = ?, require_cv = ?, manually_closed = ?, last_edited = ?, is_ppj = ?, industry = ?, culture_statement = ?, draft_location = ?,
google_address_text = ?,
level_id = ? , client_id = ? , job_owner_id = ? , company_user_id = ? , hiring_team_id = ? , occupation_id = ? , shortened_url_id = ? , object_LAST_UPDATED_DATE = "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
" "
+
"WHERE tl_job.object_id = ? AND "
+
getConcurrencyCheck
(
sqlMgr
,
"object_LAST_UPDATED_DATE"
,
obj
.
getObjectLastModified
())
+
" "
,
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
))).
listEntry
(
HELPER_DraftLocation
.
getForSQL
(
dummyDraftLocation
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_DraftLocation
))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Occupation
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
)))).
listEntry
(
objectID
.
longID
()).
listEntry
(
obj
.
getObjectLastModified
()).
toList
().
toArray
());
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
))).
listEntry
(
HELPER_DraftLocation
.
getForSQL
(
dummyDraftLocation
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_DraftLocation
))).
listEntry
(
HELPER_GoogleAddressText
.
getForSQL
(
dummyGoogleAddressText
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_GoogleAddressText
))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Occupation
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
)))).
listEntry
(
objectID
.
longID
()).
listEntry
(
obj
.
getObjectLastModified
()).
toList
().
toArray
());
if
(
rowsUpdated
!=
1
)
{
...
...
@@ -721,6 +725,7 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_Industry
,
HELPER_Industry
.
getFromRS
(
dummyIndustry
,
r
,
"industry"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_CultureStatement
,
HELPER_CultureStatement
.
getFromRS
(
dummyCultureStatement
,
r
,
"culture_statement"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_DraftLocation
,
HELPER_DraftLocation
.
getFromRS
(
dummyDraftLocation
,
r
,
"draft_location"
));
tl_jobPSet
.
setAttrib
(
Job
.
FIELD_GoogleAddressText
,
HELPER_GoogleAddressText
.
getFromRS
(
dummyGoogleAddressText
,
r
,
"google_address_text"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Level
,
r
.
getObject
(
"level_id"
));
tl_jobPSet
.
setAttrib
(
Job
.
SINGLEREFERENCE_Client
,
r
.
getObject
(
"client_id"
));
...
...
@@ -745,10 +750,10 @@ public class JobPersistenceMgr extends ObjectPersistenceMgr
{
executeStatement
(
sqlMgr
,
"INSERT INTO {PREFIX}tl_job "
+
" (job_title, job_description, job_status, open_date, apply_by, include_assessment_criteria, assessment_type, random_key, job_type, ref_number, last_status_change_date, remote, city, postcode, location_radius, state, country, require_cv, manually_closed, last_edited, is_ppj, industry, culture_statement, draft_location, level_id, client_id, job_owner_id, company_user_id, hiring_team_id, occupation_id, shortened_url_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) "
+
" (job_title, job_description, job_status, open_date, apply_by, include_assessment_criteria, assessment_type, random_key, job_type, ref_number, last_status_change_date, remote, city, postcode, location_radius, state, country, require_cv, manually_closed, last_edited, is_ppj, industry, culture_statement, draft_location,
google_address_text,
level_id, client_id, job_owner_id, company_user_id, hiring_team_id, occupation_id, shortened_url_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE) "
+
"VALUES "
+
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
", "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
")"
,
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
))).
listEntry
(
HELPER_DraftLocation
.
getForSQL
(
dummyDraftLocation
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_DraftLocation
)))
.
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Occupation
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
))))
.
listEntry
(
objectID
.
longID
()).
toList
().
toArray
());
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?,
?, ?, ?, ?, ?, ?, ?, ?, "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
", "
+
sqlMgr
.
getPortabilityServices
().
getTimestampExpression
()
+
")"
,
CollectionUtils
.
listEntry
(
HELPER_JobTitle
.
getForSQL
(
dummyJobTitle
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobTitle
))).
listEntry
(
HELPER_JobDescription
.
getForSQL
(
dummyJobDescription
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobDescription
))).
listEntry
(
HELPER_JobStatus
.
getForSQL
(
dummyJobStatus
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobStatus
))).
listEntry
(
HELPER_OpenDate
.
getForSQL
(
dummyOpenDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_OpenDate
))).
listEntry
(
HELPER_ApplyBy
.
getForSQL
(
dummyApplyBy
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ApplyBy
))).
listEntry
(
HELPER_IncludeAssessmentCriteria
.
getForSQL
(
dummyIncludeAssessmentCriteria
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IncludeAssessmentCriteria
))).
listEntry
(
HELPER_AssessmentType
.
getForSQL
(
dummyAssessmentType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_AssessmentType
))).
listEntry
(
HELPER_RandomKey
.
getForSQL
(
dummyRandomKey
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RandomKey
))).
listEntry
(
HELPER_JobType
.
getForSQL
(
dummyJobType
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_JobType
))).
listEntry
(
HELPER_ReferenceNumber
.
getForSQL
(
dummyReferenceNumber
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ReferenceNumber
))).
listEntry
(
HELPER_LastStatusChangeDate
.
getForSQL
(
dummyLastStatusChangeDate
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastStatusChangeDate
))).
listEntry
(
HELPER_Remote
.
getForSQL
(
dummyRemote
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Remote
))).
listEntry
(
HELPER_City
.
getForSQL
(
dummyCity
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_City
))).
listEntry
(
HELPER_PostCode
.
getForSQL
(
dummyPostCode
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_PostCode
))).
listEntry
(
HELPER_ExpectedCandidateRadius
.
getForSQL
(
dummyExpectedCandidateRadius
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_ExpectedCandidateRadius
))).
listEntry
(
HELPER_State
.
getForSQL
(
dummyState
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_State
))).
listEntry
(
HELPER_Country
.
getForSQL
(
dummyCountry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Country
))).
listEntry
(
HELPER_RequireCV
.
getForSQL
(
dummyRequireCV
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_RequireCV
))).
listEntry
(
HELPER_IsManuallyClosed
.
getForSQL
(
dummyIsManuallyClosed
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsManuallyClosed
))).
listEntry
(
HELPER_LastEdited
.
getForSQL
(
dummyLastEdited
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_LastEdited
))).
listEntry
(
HELPER_IsPPJ
.
getForSQL
(
dummyIsPPJ
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_IsPPJ
))).
listEntry
(
HELPER_Industry
.
getForSQL
(
dummyIndustry
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_Industry
))).
listEntry
(
HELPER_CultureStatement
.
getForSQL
(
dummyCultureStatement
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_CultureStatement
))).
listEntry
(
HELPER_DraftLocation
.
getForSQL
(
dummyDraftLocation
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_DraftLocation
)))
.
listEntry
(
HELPER_GoogleAddressText
.
getForSQL
(
dummyGoogleAddressText
,
tl_jobPSet
.
getAttrib
(
Job
.
FIELD_GoogleAddressText
)))
.
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Level
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Client
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_JobOwner
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_CreatedBy
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_HiringTeam
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_Occupation
)))).
listEntry
(
SQLManager
.
CheckNull
((
Long
)(
tl_jobPSet
.
getAttrib
(
Job
.
SINGLEREFERENCE_ShortenedURL
))))
.
listEntry
(
objectID
.
longID
()).
toList
().
toArray
());
tl_jobPSet
.
setStatus
(
PersistentSetStatus
.
PROCESSED
);
}
...
...
cmsWebApp/webroot/extensions/adminportal/job_detail.jsp
View file @
b98a14ac
...
...
@@ -160,7 +160,10 @@
return false;
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyCaBh-MsMb8BBYJD_NcFzoCmygQbt5-QSw"></script>
<oneit:script>
<oneit:script src="/scripts/google_address.js"/>
</oneit:script>
<oneit:form name="editJob" method="post" enctype="multipart/form-data">
<div class="container-fluid">
...
...
@@ -264,6 +267,12 @@
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<label><oneit:label GUIName="Google Location"/></label>
<oneit:ormInput obj="<%= job %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+job.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
...
...
@@ -277,7 +286,6 @@
</div>
</div>
</div>
</div>
<div class="form-page-section">
...
...
@@ -545,5 +553,8 @@
<button type="button" value="Save Job Occupation" id="save-job-occ" class="btn btn-primary largeBtn" style="" >Save Job Occupation</button>
</div>
</div>
<script>
addGoogleAddressListener('#<%= "gAddress_"+ job.getObjectID() %>');
</script>
</oneit:form>
</oneit:dynIncluded>
cmsWebApp/webroot/extensions/adminportal/upgrades/20181031_Alter_Job.xml
View file @
b98a14ac
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<!-- @AutoRun -->
<OBJECTS
name=
""
xmlns:oneit=
"http://www.1iT.com.au"
><NODE
name=
"Script"
factory=
"Vector"
>
<OBJECTS
name=
""
xmlns:oneit=
"http://www.1iT.com.au"
>
<NODE
name=
"Script"
factory=
"Vector"
>
<NODE
name=
"DDL"
factory=
"Participant"
class=
"oneit.sql.transfer.
D
efineTableOperation"
>
<NODE
name=
"DDL"
factory=
"Participant"
class=
"oneit.sql.transfer.
Red
efineTableOperation"
>
<tableName
factory=
"String"
>
tl_job
</tableName>
<column
name=
"object_id"
type=
"Long"
nullable=
"false"
length=
"11"
/>
<column
name=
"object_last_updated_date"
type=
"Date"
nullable=
"false"
length=
"22"
/>
<column
name=
"object_created_date"
type=
"Date"
nullable=
"false"
length=
"22"
/>
<column
name=
"job_title"
type=
"String"
nullable=
"false"
length=
"500"
/>
<column
name=
"job_description"
type=
"CLOB"
nullable=
"false"
/>
<column
name=
"job_status"
type=
"String"
nullable=
"false"
length=
"200"
/>
<column
name=
"open_date"
type=
"Date"
nullable=
"true"
/>
<column
name=
"apply_by"
type=
"Date"
nullable=
"true"
/>
<column
name=
"include_assessment_criteria"
type=
"Boolean"
nullable=
"false"
/>
<column
name=
"assessment_type"
type=
"String"
nullable=
"false"
length=
"200"
/>
<column
name=
"random_key"
type=
"String"
nullable=
"true"
length=
"10"
/>
<column
name=
"job_type"
type=
"String"
nullable=
"false"
length=
"200"
/>
<column
name=
"ref_number"
type=
"String"
nullable=
"true"
length=
"100"
/>
<column
name=
"last_status_change_date"
type=
"Date"
nullable=
"true"
/>
<column
name=
"remote"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"city"
type=
"String"
nullable=
"true"
length=
"100"
/>
<column
name=
"postcode"
type=
"String"
nullable=
"true"
length=
"100"
/>
<column
name=
"location_radius"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"state"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"country"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"require_cv"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"manually_closed"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"last_edited"
type=
"Date"
nullable=
"true"
/>
<column
name=
"is_ppj"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"industry"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"culture_statement"
type=
"String"
nullable=
"true"
length=
"2000"
/>
<column
name=
"draft_location"
type=
"String"
nullable=
"true"
length=
"200"
/>
<column
name=
"level_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"client_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"job_owner_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"company_user_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"hiring_team_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"occupation_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"shortened_url_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"google_address_text"
type=
"String"
nullable=
"true"
length=
"300"
/>
</NODE>
<NODE
name=
"INDEX"
factory=
"Participant"
class=
"oneit.sql.transfer.DefineIndexOperation"
tableName=
"tl_job"
indexName=
"idx_tl_job_client_id"
isUnique=
"false"
><column
name=
"client_id"
/></NODE>
</NODE></OBJECTS>
\ No newline at end of file
</NODE>
</OBJECTS>
\ No newline at end of file
cmsWebApp/webroot/scripts/google_address.js
0 → 100644
View file @
b98a14ac
var
componentForm
=
{
street_number
:
'short_name'
,
route
:
'long_name'
,
locality
:
'long_name'
,
administrative_area_level_1
:
'short_name'
,
country
:
'long_name'
,
postal_code
:
'short_name'
};
var
googleAutoComplete
=
{};
function
addGoogleAddressListener
(
domSelector
)
{
var
autocomplete
=
new
google
.
maps
.
places
.
Autocomplete
(
$
(
domSelector
)[
0
]);
googleAutoComplete
[
domSelector
]
=
autocomplete
;
var
place
;
$
(
domSelector
).
change
(
function
(){
if
(
!
$
(
this
).
val
()
||
!
trim
(
$
(
this
).
val
())
||
autocomplete
.
getPlace
()
==
null
||
autocomplete
.
getPlace
()
==
undefined
||
!
autocomplete
.
getPlace
().
geometry
)
{
var
parentDiv
=
$
(
domSelector
).
closest
(
'.googleAddress'
);
parentDiv
.
find
(
".latitude"
).
val
(
''
);
parentDiv
.
find
(
".longitude"
).
val
(
''
);
for
(
var
component
in
componentForm
)
{
parentDiv
.
find
(
"."
+
component
).
val
(
''
);
}
}
})
$
(
domSelector
).
keypress
(
function
(
e
)
{
if
(
e
.
which
==
13
)
{
e
.
preventDefault
();
}
});
autocomplete
.
addListener
(
'place_changed'
,
function
()
{
place
=
autocomplete
.
getPlace
();
googleAutoComplete
[
domSelector
]
=
place
;
placeChanged
(
domSelector
);
});
}
function
placeChanged
(
domSelector
)
{
var
place
=
googleAutoComplete
[
domSelector
];
if
(
place
===
undefined
||
!
place
.
geometry
)
{
return
;
}
var
parentDiv
=
$
(
domSelector
).
closest
(
'.googleAddress'
);
parentDiv
.
find
(
".latitude"
).
val
(
place
.
geometry
.
location
.
lat
());
parentDiv
.
find
(
".longitude"
).
val
(
place
.
geometry
.
location
.
lng
());
for
(
var
component
in
componentForm
)
{
parentDiv
.
find
(
"."
+
component
).
val
(
''
);
}
for
(
var
i
=
0
;
i
<
place
.
address_components
.
length
;
i
++
)
{
var
addressType
=
place
.
address_components
[
i
].
types
[
0
];
if
(
componentForm
[
addressType
])
{
var
val
=
place
.
address_components
[
i
][
componentForm
[
addressType
]];
parentDiv
.
find
(
"."
+
addressType
).
val
(
val
);
}
}
}
//remove left and right space
function
trim
(
str
)
{
return
str
.
replace
(
/
(
^
\s
*
)
|
(\s
*$
)
/g
,
""
);
}
function
toggleAddressMode
(
gAddressid
)
{
var
selection
=
$
(
'input[googleid='
+
gAddressid
+
']'
).
prop
(
'checked'
);
var
parentDiv
=
$
(
'#'
+
gAddressid
).
closest
(
'.googleAddress'
);
for
(
var
component
in
componentForm
)
{
if
(
!
selection
)
{
parentDiv
.
find
(
"."
+
component
).
prop
(
'readonly'
,
'true'
);
}
else
{
parentDiv
.
find
(
"."
+
component
).
removeProp
(
'readonly'
);
}
}
if
(
!
selection
)
{
$
(
'#'
+
gAddressid
).
removeProp
(
'readonly'
);
placeChanged
(
'#'
+
gAddressid
);
}
else
{
$
(
'#'
+
gAddressid
).
prop
(
'readonly'
,
'true'
);
}
}
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