[mhk] r1089 committed - create_source GUI updated and person_sex corrected @mhk_families

0 views
Skip to first unread message

codesite...@google.com

unread,
Jun 30, 2013, 11:23:06 AM6/30/13
to mhk-dis...@googlegroups.com
Revision: 1089
Author: tbc...@gmail.com
Date: Sun Jun 30 08:22:55 2013
Log: create_source GUI updated and person_sex corrected @mhk_families
http://code.google.com/p/mhk/source/detail?r=1089

Modified:
/branches/mhk_families/idb/etc/template/new/create_source.vm
/branches/mhk_families/idb/pt/uc/cisuc/jrc/mhk/parser/SaveWebSource.java

=======================================
--- /branches/mhk_families/idb/etc/template/new/create_source.vm Sat Jun 29
14:23:44 2013
+++ /branches/mhk_families/idb/etc/template/new/create_source.vm Sun Jun 30
08:22:55 2013
@@ -3,8 +3,6 @@
#set ( $help = "createSource")

#parse("new/head.vm")
-
-
<script>
var count_persons=1;
var count_relations=1;
@@ -480,76 +478,96 @@

<body>
#parse("new/header.vm")
-
+#parse("new/setup.vm")
+#set ( $dollar = "$" )
<div id="main">
-
+
<h2>$mhks.get("createSource") &raquo;</h2>
- <form action="">
Source Name*: <input type="text" id="source_name"><br>
Source Type: <input type="text" id="source_type">Source Description:
<input type="text" id="source_observation"><br>

<h3>Persons &raquo;</h3>
<table id="persons_table">
- <tr>
- <td>Person Id</td>
- <td>Person Name</td>
- <td>Person Sex</td>
- <td>Person Observation</td>
- </tr>
+ <thead>
+ <tr>
+ <th>Person Id</th>
+ <th>Person Name</th>
+ <th>Person Sex</th>
+ <th>Person Observation</th>
+ <th>Remove Person</th>
+ </tr>
+ </thead>
</table>
- Person Name*: <input type="text" id="person_name">Person Sex: <input
type="text" id="person_sex">Person Observation: <input type="text"
id="person_observation"><input type="button" value="Add Person"
onClick="printPersonsTable()"><br>
-
+ <p></p>
+ Person Name*: <input type="text" id="person_name">Person Sex (M/F):
<input type="text"id="person_sex">Person Observation: <input type="text"
id="person_observation"><input type="button" value="Add Person"
onClick="printPersonsTable()"><br>
+
+ <br></br>
+
<h3>Attributes &raquo;</h3>
<table id="attributes_table">
<tr>
- <td>Attribute Id</td>
- <td>Attribute Name</td>
- <td>Attribute Value</td>
- <td>Person Id</td>
- <td>Attribute Observation</td>
+ <th>Attribute Id</th>
+ <th>Attribute Name</th>
+ <th>Attribute Value</th>
+ <th>Person Id</th>
+ <th>Attribute Observation</th>
+ <th>Remove Attribute</th>
</tr>
</table>
+ <p></p>
Attribute Name*: <input type="text" id="attribute_name">Attribute
Value*: <input type="text" id="attribute_value">Person Id*: <select
id="attribute_select"></select>Attribute Observation: <input type="text"
id="attribute_observation"><input type="button" value="Add Attribute"
onClick="printAttributesTable()"><br>

+ <br></br>
+
<h3>Relations &raquo;</h3>
<table id="relations_table">
<tr>
- <td>Relation Id</td>
- <td>Relation Type</td>
- <td>Relation Value</td>
- <td>Relation Origin</td>
- <td>Relation Destination</td>
- <td>Relation Observation</td>
+ <th>Relation Id</th>
+ <th>Relation Type</th>
+ <th>Relation Value</th>
+ <th>Relation Origin</th>
+ <th>Relation Destination</th>
+ <th>Relation Observation</th>
+ <th>Remove Relation</th>
</tr>
</table>
+ <p></p>
Relation Type*: <input type="text" id="relation_type">Relation Value*:
<input type="text" id="relation_value">Origin Id*: <select
id="relation_origin_select"></select>Destination Id*: <select
id="relation_destination_select"></select>Relation Observation: <input
type="text" id="relation_observation"><input type="button" value="Add
Relation" onClick="printRelationsTable()"><br>

+ <br></br>
+
<h3>Acts &raquo;</h3>
<table id="acts_table">
<tr>
- <td>Act Id</td>
- <td>Act Type</td>
- <td>Act Localization</td>
- <td>Act Observation</td>
+ <th>Act Id</th>
+ <th>Act Type</th>
+ <th>Act Localization</th>
+ <th>Act Observation</th>
+ <th>Remove Act</th>
</tr>
</table>
+ <p></p>
Act Type*: <input type="text" id="act_type">Act Localization: <input
type="text" id="act_localization">Act Observation: <input type="text"
id="act_observation"><input type="button" value="Add Act"
onClick="printActsTable()"><br>

+ <br></br>
+
<h3>Functions in Act &raquo;</h3>
<table id="functions_table">
- <tr>
- <td>Function Id</td>
- <td>Act Id</td>
- <td>Function Value</td>
- <td>Function Destname</td>
- <td>Function Origin</td>
+ <tr BGCOLOR="$bgcolor1">
+ <th>Function Id</th>
+ <th>Act Id</th>
+ <th>Function Value</th>
+ <th>Function Destname</th>
+ <th>Function Origin</th>
+ <th>Remove Function</th>
</tr>
</table>
- Act Id*: <select id="function_act_select"></select>Function Value*:
<input type="text" id="function_value">Function Destname: <input
type="text" id="function_destname">Function Origin*:<select
id="function_origin_select"></select><input type="button" value="Add
Function" onClick="printFunctionsTable()"><br>
+ <p></p>
+ Function Value*: <input type="text" id="function_value">Function
Destname: <input type="text" id="function_destname">Act Id*: <select
id="function_act_select"></select>Function Origin*:<select
id="function_origin_select"></select><input type="button" value="Add
Function" onClick="printFunctionsTable()"><br>

+ <br></br>

- <input type="button" value="Save" onclick="submitForm()">
- </form>
+ <input type="button" value="Save Web Source" onclick="submitForm()">
</div>

#parse("new/footer.vm")
=======================================
---
/branches/mhk_families/idb/pt/uc/cisuc/jrc/mhk/parser/SaveWebSource.java
Sat Jun 29 14:23:44 2013
+++
/branches/mhk_families/idb/pt/uc/cisuc/jrc/mhk/parser/SaveWebSource.java
Sun Jun 30 08:22:55 2013
@@ -378,7 +378,7 @@
individual.addContent(s);

String sex=(String)person.get("sex");
- if(!sex.equals("")){
+ if(sex.equalsIgnoreCase("M") || sex.equalsIgnoreCase("F")){
s=new Element("ELEMENT");
s.setAttribute("NAME","sex");
s.setAttribute("CLASS","sex");
@@ -387,15 +387,6 @@
s.addContent(core);
individual.addContent(s);
}
- else{
- s=new Element("ELEMENT");
- s.setAttribute("NAME","sex");
- s.setAttribute("CLASS","sex");
- core=new Element("core");
- core.addContent("N/A");
- s.addContent(core);
- individual.addContent(s);
- }

String obs=(String)person.get("observation");
if(!obs.equals("")){
Reply all
Reply to author
Forward
0 new messages