From 233b08df59877fe6c342e21b337a5b6ed555d73d Mon Sep 17 00:00:00 2001 From: abijah Date: Thu, 9 Jul 2009 00:21:48 +0000 Subject: [PATCH] Made the same layout changes from H2 to CSS with the move_in page git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@271 97e9348a-65ac-dc4b-aefc-98561f571b83 --- views/leases/move_in.ctp | 58 +++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/views/leases/move_in.ctp b/views/leases/move_in.ctp index ff46bdf..8aa4f93 100644 --- a/views/leases/move_in.ctp +++ b/views/leases/move_in.ctp @@ -64,26 +64,26 @@ function onRowSelect(grid_id, item_type, item_id) { $("#movein-"+item_type).html($(grid_id).getCell(item_id, cell_name)); // Hide the "no customer" message and show the current customer - $("#no-"+item_type).hide(); - $("#current-"+item_type).show(); + $("."+item_type+"-selection-invalid").hide(); + $("."+item_type+"-selection-valid").show(); $("#"+item_type+"s-list .HeaderButton").click(); } function onGridState(grid_id, item_type, state) { if (state == 'visible') { - $("#no-"+item_type).hide(); - $("#current-"+item_type).hide(); + $("."+item_type+"-selection-invalid").hide(); + $("."+item_type+"-selection-valid").hide(); } else { //if ($(grid_id).getGridParam("selrow")) //alert("id:" + $("#"+item_type+"-id").val()); if ($("#"+item_type+"-id").val() > 0) { - $("#current-"+item_type).show(); - $("#no-"+item_type).hide(); + $("."+item_type+"-selection-invalid").hide(); + $("."+item_type+"-selection-valid").show(); } else { - $("#current-"+item_type).hide(); - $("#no-"+item_type).show(); + $("."+item_type+"-selection-invalid").show(); + $("."+item_type+"-selection-valid").hide(); } } } @@ -105,10 +105,17 @@ echo $this->element('customers', array 'limit' => 10, ))); -echo ('

' . - 'Customer: ' . - 'Please select customer' . - '

' . "\n"); +echo ('
' . + + '' . + + '' . + + '
' . "\n"); echo $this->element('units', array ('config' => array @@ -122,10 +129,17 @@ echo $this->element('units', array 'limit' => 10, ))); -echo ('

' . - 'Unit: ' . - 'Please select unit' . - '

' . "\n"); +echo ('
' . + + '' . + + '' . + + '
' . "\n"); echo $form->create(null, array('id' => 'move-in-form', 'url' => array('controller' => 'leases', @@ -167,21 +181,17 @@ echo $form->end('Move In Customer'); $("#customer-id").val(); $("#movein-customer").html(""); - $("#current-customer").show(); - $("#no-customer").hide(); + onGridState(null, 'customer', 'hidden'); - $("#current-customer").hide(); - $("#no-customer").hide(); + onGridState(null, 'customer', 'visible'); $("#unit-id").val(); $("#movein-unit").html(""); - $("#current-unit").show(); - $("#no-unit").hide(); + onGridState(null, 'unit', 'hidden'); - $("#current-unit").hide(); - $("#no-unit").hide(); + onGridState(null, 'unit', 'visible'); }); -->