[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3255] trunk



Revision: 3255
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3255&view=rev
Author:   einhverfr
Date:     2011-06-15 23:18:46 +0000 (Wed, 15 Jun 2011)

Log Message:
-----------
Corrected js/css issues on employee screen.

Modified Paths:
--------------
    trunk/UI/Contact/contact.css
    trunk/UI/Contact/contact.html
    trunk/UI/Contact/contact.js
    trunk/scripts/employee.pl

Modified: trunk/UI/Contact/contact.css
===================================================================
--- trunk/UI/Contact/contact.css	2011-06-15 13:25:25 UTC (rev 3254)
+++ trunk/UI/Contact/contact.css	2011-06-15 23:18:46 UTC (rev 3255)
@@ -38,3 +38,21 @@
 div.container {
 	display: block;
 }
+
+div {
+        overflow: auto;
+}
+
+#hr_div div.input_group {
+        display: block;
+        float: left;
+        width: 23em;
+}
+
+#hr_div label {
+        float: left;
+        display: block;
+        width: 9em;
+        text-align: right;
+        margin-right: 1em
+}

Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	2011-06-15 13:25:25 UTC (rev 3254)
+++ trunk/UI/Contact/contact.html	2011-06-15 23:18:46 UTC (rev 3255)
@@ -84,8 +84,8 @@
 		name = "form_id"
 		value = form_id
 	} ?>
-
-<div class="input" id="person_name_div"><?lsmb text('Name:')?>&nbsp;
+<div class="input" id="person_name_div"><?lsmb #text('Name:')?>&nbsp;
+<div class="input_group">
 <!-- TODO:  Add Saluatation -->
 <?lsmb PROCESS input element_data = {
 	label = text('First')
@@ -94,6 +94,8 @@
 	type = "text"
 	size = 20
 } ?>
+</div>
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('Middle')
 	name = "middle_name"
@@ -101,6 +103,8 @@
 	type = "text"
 	size = 20
 } ?>
+</div>
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('Last')
 	name = "last_name"
@@ -109,9 +113,11 @@
 	size = 20
 } ?>
 </div>
+</div>
 <div id="job_title_div">
 <!-- Note that the strange # ' constructs are only necessary to help VIM avoid
 problems with multi-word single-quoted constructs in PI tags. -CT  -->
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('Job Title:')
 	name = "role"
@@ -119,6 +125,8 @@
 	type = "text"
 	size = 20
 } # ' ?>
+</div>
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('Sales:')
 	value = 1
@@ -126,6 +134,10 @@
 	checked = sales
 	name = "sales"
 } ?>
+</div>
+</div>
+<div id="employee_div">
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('Employee Number')
 	value = employee_number
@@ -133,13 +145,18 @@
 	type = "text"
 	size = 20
 } # ' ?>
+</div>
+<div class="input_group">
 <label for="manager_select"><?lsmb text('Manager:') ?></label>
 <select id="manager_select" name="manager_id">
 <?lsmb FOREACH e = employee ?>
 <option value = e.entity_id <?lsmb (manager_id == e.entity_id) ? "SELECTED" : ""?><?lsmb e.name ?></option>
 <?lsmb END ?>
 </select>
-<div>
+</div>
+</div>
+<div id="hr_dates_div">
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('DOB:')
 	name = "dob"
@@ -148,6 +165,8 @@
 	class = "date"
 	size = 10
 }  ?>
+</div>
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('Start Date:')
 	name = "start_date"
@@ -156,6 +175,8 @@
 	class = "date"
 	size = 10
 } # '  ?>
+</div>
+<div class="input_group">
 <?lsmb PROCESS input element_data = {
 	label = text('End Date:')
 	name = "end_date"
@@ -164,12 +185,15 @@
 	type = "text"
 	size = 10
 } # ' ?>
+</div>
+</div>
 <div>
 <?lsmb PROCESS button element_data = {
 	text = text('Save')
 	class = "submit"
 	type = "submit"
-	value = "save_employee"
+        name = 'action'
+	value = "save"
 } ?>
 </div>
 </form>

Modified: trunk/UI/Contact/contact.js
===================================================================
--- trunk/UI/Contact/contact.js	2011-06-15 13:25:25 UTC (rev 3254)
+++ trunk/UI/Contact/contact.js	2011-06-15 23:18:46 UTC (rev 3255)
@@ -22,7 +22,7 @@
 			},false);
 		}
 	}
-	if (div_id != ''){
+	if (div_id != '' && document.getElementById(div_id)){
 		select_div(div_id);
 	}
 }

Modified: trunk/scripts/employee.pl
===================================================================
--- trunk/scripts/employee.pl	2011-06-15 13:25:25 UTC (rev 3254)
+++ trunk/scripts/employee.pl	2011-06-15 23:18:46 UTC (rev 3255)
@@ -48,6 +48,7 @@
     my $employee = LedgerSMB::DBObject::Employee->new(base => $request, copy => 'all');
     
     $employee->set( entity_class=> '3' );
+    $employee->{target_div} = 'hr_div'; 
     my $result = $employee->get();
     
     my $template = LedgerSMB::Template->new( user => $user, 
@@ -89,6 +90,7 @@
     my ($request) = @_;
     my $employee= LedgerSMB::DBObject::Employee->new(base => $request, copy => 'all');
     $employee->set( entity_class=> '3' );
+    $employee->{target_div} = 'hr_div'; 
     _render_main_screen($employee);
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.