Going AJAX route to grab an editable row from the controller and update the table. FFS
This commit is contained in:
parent
e99174501a
commit
be49771830
|
|
@ -29,6 +29,38 @@ class JobsController extends AppController {
|
|||
|
||||
}
|
||||
|
||||
/** Called via AJAX to get an editable row */
|
||||
function getEditableRow($id) {
|
||||
$this->layout = 'ajax';
|
||||
$this->set('job', $this->Job->find('first', array('conditions'=>array('Job.id'=>$id))));
|
||||
|
||||
|
||||
$this->set('sale_category_options', $this->sale_category_options());
|
||||
$this->set('sale_category_array', $this->sale_category_array());
|
||||
$this->set('job_type_options', $this->job_type_options());
|
||||
$this->set('shipment_options', $this->shipment_options());
|
||||
$this->set('freight_paid_by_options',$this->freight_paid_options());
|
||||
$this->set('gst_options', $this->gst_options());
|
||||
|
||||
}
|
||||
|
||||
/** Called via AJAX to get an viewable row */
|
||||
function getViewableRow($id) {
|
||||
$this->layout = 'ajax';
|
||||
$this->set('job', $this->Job->find('first', array('conditions'=>array('Job.id'=>$id))));
|
||||
|
||||
|
||||
$this->set('sale_category_options', $this->sale_category_options());
|
||||
$this->set('sale_category_array', $this->sale_category_array());
|
||||
$this->set('job_type_options', $this->job_type_options());
|
||||
$this->set('shipment_options', $this->shipment_options());
|
||||
$this->set('freight_paid_by_options',$this->freight_paid_options());
|
||||
$this->set('gst_options', $this->gst_options());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* For the 'sale_category' column.
|
||||
|
|
|
|||
89
views/jobs/get_editable_row.ctp
Normal file
89
views/jobs/get_editable_row.ctp
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<tr id="<?=$job['Job']['id']?>">
|
||||
<? echo $form->create('Job', array('action'=>'ajax_edit', 'id'=>'form_'.$job['Job']['id'], 'class'=>'job_table_form')); ?>
|
||||
<?=$form->input('id', array('type'=>'hidden', 'value'=>$job['Job']['id'])); ?>
|
||||
<td><button class="editButton">Edit</button> <button class="saveButton">Save</button> <button class="cancelButton">Cancel</button></td>
|
||||
<td><?=$job['Job']['date_order_received'];?></td>
|
||||
<td><?=$job['Job']['job_status'];?></td>
|
||||
<td>
|
||||
<?=$form->input('sale_category', array('options'=>$sale_category_options, 'label'=>false, 'selected'=>$job['Job']['sale_category'], 'class'=>'sale_category'));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('job_type', array('options'=>$job_type_options, 'label' => false, 'selected'=>$job['Job']['job_type']));?></td>
|
||||
<td><?=$form->input('shipment_category', array('options'=>$shipment_options, 'label'=>false,'selected'=>$job['Job']['shipment_category']));?></td>
|
||||
<td><?=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?></td>
|
||||
<td><?=$html->link($job['Enquiry']['title'], array('controller'=>'enquiries','action'=>'view', $job['Enquiry']['id']));?>
|
||||
<td><?
|
||||
$poString = '';
|
||||
foreach($job['PurchaseOrder'] as $po) {
|
||||
$poString .= ' '.$html->link($po['title'], array('controller'=>'purchase_orders', 'action'=>'view', $po['id']));
|
||||
}
|
||||
echo $poString;
|
||||
?>
|
||||
</td>
|
||||
<td><?=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?></td>
|
||||
<td>
|
||||
<?=$form->input('customer_order_number', array('value'=>$job['Job']['customer_order_number'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?=$form->input('supplier_reference', array('value'=>$job['Job']['supplier_reference'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?=$form->input('date_scheduled_ex_works', array('value'=>$job['Job']['date_scheduled_ex_works'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('date_order_sent_to_customer', array('value'=>$job['Job']['date_order_sent_to_customer'], 'label'=>false ,'div'=>false));?>
|
||||
|
||||
</td>
|
||||
<td> <?=$form->input('domestic_freight_paid_by', array('value'=>$job['Job']['domestic_freight_paid_by'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('currency_id', array('value'=>$job['Currency']['name'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('company_gross_sales_aud', array('value'=>$job['Job']['company_gross_sales_aud'], 'label'=>false ,'div'=>false));?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('net_sales_aud', array('value'=>$job['Job']['net_sales_aud'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_profit_aud', array('value'=>$job['Job']['gross_profit_aud'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
Net Export Sales Conv to AUD?
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gross_profit_exports_aud', array('value'=>$job['Job']['gross_profit_exports_aud'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gp_percent', array('value'=>$job['Job']['gp_percent'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>? Double column?</td>
|
||||
<td>
|
||||
<?=$form->input('ato_exchange_rate', array('value'=>$job['Job']['ato_exchange_rate'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_australian_sales_foreign_currency', array('value'=>$job['Job']['gross_australian_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('net_australian_sales_foreign_currency', array('value'=>$job['Job']['net_australian_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_profit_value_australian_sales_foreign_currency', array('value'=>$job['Job']['gross_profit_value_australian_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gross_export_sales_foreign_currency', array('value'=>$job['Job']['gross_export_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('net_export_sales_foreign_currency', array('value'=>$job['Job']['net_export_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_profit_value_after_discount_exports_foreign_currency', array('value'=>$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gross_commissions', array('value'=>$job['Job']['gross_commissions'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('net_commissions', array('value'=>$job['Job']['net_commissions'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td><button class="editButton">Edit</button> <button class="saveButton">Save</button> <button class="cancelButton">Cancel</button></td>
|
||||
</tr>
|
||||
<?=$form->end();?>
|
||||
|
||||
<?php debug($job); ?>
|
||||
85
views/jobs/get_viewable_row.ctp
Normal file
85
views/jobs/get_viewable_row.ctp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<tr id="<?=$job['Job']['id']?>">
|
||||
<td><button class="editButton">Edit</button> <button class="saveButton">Save</button> <button class="cancelButton">Cancel</button></td>
|
||||
<td><?=$job['Job']['date_order_received'];?></td>
|
||||
<td><?=$job['Job']['job_status'];?></td>
|
||||
<td>
|
||||
<?=$form->input('sale_category', array('options'=>$sale_category_options, 'label'=>false, 'selected'=>$job['Job']['sale_category'], 'class'=>'sale_category'));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('job_type', array('options'=>$job_type_options, 'label' => false, 'selected'=>$job['Job']['job_type']));?></td>
|
||||
<td><?=$form->input('shipment_category', array('options'=>$shipment_options, 'label'=>false,'selected'=>$job['Job']['shipment_category']));?></td>
|
||||
<td><?=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?></td>
|
||||
<td><?=$html->link($job['Enquiry']['title'], array('controller'=>'enquiries','action'=>'view', $job['Enquiry']['id']));?>
|
||||
<td><?
|
||||
$poString = '';
|
||||
foreach($job['PurchaseOrder'] as $po) {
|
||||
$poString .= ' '.$html->link($po['title'], array('controller'=>'purchase_orders', 'action'=>'view', $po['id']));
|
||||
}
|
||||
echo $poString;
|
||||
?>
|
||||
</td>
|
||||
<td><?=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?></td>
|
||||
<td>
|
||||
<?=$form->input('customer_order_number', array('value'=>$job['Job']['customer_order_number'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?=$form->input('supplier_reference', array('value'=>$job['Job']['supplier_reference'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?=$form->input('date_scheduled_ex_works', array('value'=>$job['Job']['date_scheduled_ex_works'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('date_order_sent_to_customer', array('value'=>$job['Job']['date_order_sent_to_customer'], 'label'=>false ,'div'=>false));?>
|
||||
|
||||
</td>
|
||||
<td> <?=$form->input('domestic_freight_paid_by', array('value'=>$job['Job']['domestic_freight_paid_by'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('currency_id', array('value'=>$job['Currency']['name'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('company_gross_sales_aud', array('value'=>$job['Job']['company_gross_sales_aud'], 'label'=>false ,'div'=>false));?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('net_sales_aud', array('value'=>$job['Job']['net_sales_aud'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_profit_aud', array('value'=>$job['Job']['gross_profit_aud'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
Net Export Sales Conv to AUD?
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gross_profit_exports_aud', array('value'=>$job['Job']['gross_profit_exports_aud'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gp_percent', array('value'=>$job['Job']['gp_percent'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>? Double column?</td>
|
||||
<td>
|
||||
<?=$form->input('ato_exchange_rate', array('value'=>$job['Job']['ato_exchange_rate'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_australian_sales_foreign_currency', array('value'=>$job['Job']['gross_australian_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('net_australian_sales_foreign_currency', array('value'=>$job['Job']['net_australian_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_profit_value_australian_sales_foreign_currency', array('value'=>$job['Job']['gross_profit_value_australian_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gross_export_sales_foreign_currency', array('value'=>$job['Job']['gross_export_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('net_export_sales_foreign_currency', array('value'=>$job['Job']['net_export_sales_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('gross_profit_value_after_discount_exports_foreign_currency', array('value'=>$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$form->input('gross_commissions', array('value'=>$job['Job']['gross_commissions'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td> <?=$form->input('net_commissions', array('value'=>$job['Job']['net_commissions'], 'label'=>false ,'div'=>false));?>
|
||||
</td>
|
||||
<td><button class="editButton">Edit</button> <button class="saveButton">Save</button> <button class="cancelButton">Cancel</button></td>
|
||||
</tr>
|
||||
<?=$form->end();?>
|
||||
|
|
@ -69,22 +69,19 @@ echo $paginator->counter(array(
|
|||
<tbody>
|
||||
<? foreach($jobs as $job):?>
|
||||
|
||||
<? echo $form->create('Job', array('action'=>'ajax_edit', 'id'=>'form_'.$job['Job']['id'], 'class'=>'job_table_form')); ?>
|
||||
|
||||
<tr id="<?=$job['Job']['id']?>">
|
||||
<? echo $form->create('Job', array('action'=>'ajax_edit', 'id'=>'form_'.$job['Job']['id'], 'class'=>'job_table_form')); ?>
|
||||
<?=$form->input('id', array('type'=>'hidden', 'value'=>$job['Job']['id'])); ?>
|
||||
<td><button class="editButton">Edit</button> <button class="saveButton">Save</button> <button class="cancelButton">Cancel</button></td>
|
||||
<td><?=$job['Job']['date_order_received'];?></td>
|
||||
<td><?=$job['Job']['job_status'];?></td>
|
||||
<td>
|
||||
<span class="viewText"><?=$sale_category_array[$job['Job']['sale_category']]?></span>
|
||||
<?=$form->input('sale_category', array('options'=>$sale_category_options, 'label'=>false, 'selected'=>$job['Job']['sale_category']));?>
|
||||
<?=$job['Job']['sale_category'];?>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span class="viewText"><?=$job['Job']['job_type']?></span>
|
||||
<?=$form->input('job_type', array('options'=>$job_type_options, 'label' => false, 'selected'=>$job['Job']['job_type']));?></td>
|
||||
<td><?=$form->input('shipment_category', array('options'=>$shipment_options, 'label'=>false,'selected'=>$job['Job']['shipment_category']));?></td>
|
||||
<?=$job['Job']['job_type'];?></td>
|
||||
<td><?=$job['Job']['shipment_category'];?></td>
|
||||
<td><?=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?></td>
|
||||
<td><?=$html->link($job['Enquiry']['title'], array('controller'=>'enquiries','action'=>'view', $job['Enquiry']['id']));?>
|
||||
<td><?
|
||||
|
|
@ -96,34 +93,67 @@ echo $paginator->counter(array(
|
|||
?>
|
||||
</td>
|
||||
<td><?=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?></td>
|
||||
<td><span class="viewText"><?=$job['Job']['customer_order_number'];?></span>
|
||||
<?=$form->input('customer_order_number', array('value'=>$job['Job']['customer_order_number'], 'label'=>false ,'div'=>false));?>
|
||||
<td>
|
||||
<?=$job['Job']['customer_order_number'];?>
|
||||
</td>
|
||||
|
||||
<td><span class="viewText"><?=$job['Job']['supplier_reference'];?></span>
|
||||
<?=$form->input('supplier_reference', array('value'=>$job['Job']['supplier_reference'], 'label'=>false ,'div'=>false));?>
|
||||
<td>
|
||||
<?=$job['Job']['supplier_reference'];?>
|
||||
</td>
|
||||
|
||||
<td><?=$job['Job']['date_scheduled_ex_works'];?></td>
|
||||
<td><?=$job['Job']['date_order_sent_to_customer'];?></td>
|
||||
<td><?=$job['Job']['domestic_freight_paid_by'];?></td>
|
||||
<td><?=$job['Currency']['name'];?></td>
|
||||
<td><?=$job['Job']['company_gross_sales_aud'];?></td>
|
||||
<td><?=$job['Job']['net_sales_aud'];?></td>
|
||||
<td><?=$job['Job']['gross_profit_aud'];?></td>
|
||||
<td>Net Export Sales Conv to AUD?</td>
|
||||
<td><?=$job['Job']['gross_profit_exports_aud'];?></td>
|
||||
<td><?=$job['Job']['gp_percent'];?>%</td>
|
||||
<td>
|
||||
<?=$job['Job']['date_scheduled_ex_works'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['date_order_sent_to_customer'];?>
|
||||
|
||||
</td>
|
||||
<td> <?=$job['Job']['domestic_freight_paid_by'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Currency']['name'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['company_gross_sales_aud'];?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['net_sales_aud'];?>
|
||||
</td>
|
||||
<td> <?=$job['Job']['gross_profit_aud'];?>
|
||||
</td>
|
||||
<td>
|
||||
Net Export Sales Conv to AUD?
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['gross_profit_exports_aud'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['gp_percent'];?>
|
||||
</td>
|
||||
<td>? Double column?</td>
|
||||
<td><?=$job['Job']['ato_exchange_rate'];?></td>
|
||||
<td><?=$job['Job']['gross_australian_sales_foreign_currency'];?></td>
|
||||
<td><?=$job['Job']['net_australian_sales_foreign_currency'];?></td>
|
||||
<td><?=$job['Job']['gross_profit_value_australian_sales_foreign_currency'];?></td>
|
||||
<td><?=$job['Job']['gross_export_sales_foreign_currency'];?></td>
|
||||
<td><?=$job['Job']['net_export_sales_foreign_currency'];?></td>
|
||||
<td><?=$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];?></td>
|
||||
<td><?=$job['Job']['gross_commissions'];?></td>
|
||||
<td><?=$job['Job']['net_commissions'];?></td>
|
||||
<td>
|
||||
<?=$job['Job']['ato_exchange_rate'];?>
|
||||
</td>
|
||||
<td> <?=$job['Job']['gross_australian_sales_foreign_currency'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['net_australian_sales_foreign_currency'];?>
|
||||
</td>
|
||||
<td> <?=$job['Job']['gross_profit_value_australian_sales_foreign_currency'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['gross_export_sales_foreign_currency'];?>
|
||||
</td>
|
||||
<td> <?=$job['Job']['net_export_sales_foreign_currency'];?>
|
||||
</td>
|
||||
<td> <?=$job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$job['Job']['gross_commissions'];?>
|
||||
</td>
|
||||
<td> <?=$job['Job']['net_commissions'];?>
|
||||
</td>
|
||||
<td><button class="editButton">Edit</button> <button class="saveButton">Save</button> <button class="cancelButton">Cancel</button></td>
|
||||
</tr>
|
||||
<?=$form->end();?>
|
||||
|
|
|
|||
|
|
@ -1304,12 +1304,30 @@ table.jobsTable tr td form {
|
|||
|
||||
.jobsTable input {
|
||||
width: auto;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
.jobsTable select {
|
||||
font-size: 85%;
|
||||
width: 80px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
.jobsTable [disabled] {
|
||||
|
||||
color:#000;
|
||||
background-color:#fff
|
||||
|
||||
}
|
||||
|
||||
|
||||
select.sale_category {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
|
||||
.outer {
|
||||
height: 650px;
|
||||
}
|
||||
|
|
@ -1,15 +1,13 @@
|
|||
$(function() {
|
||||
|
||||
// console.profile();
|
||||
$(":input").hide();
|
||||
//$(":input").hide();
|
||||
$(".editButton").show();
|
||||
$(".cancelButton").hide();
|
||||
$(".saveButton").hide();
|
||||
|
||||
/*$("tr").dblclick(function() {
|
||||
|
||||
makeEditable($(this).attr('id'));
|
||||
});*/
|
||||
|
||||
|
||||
$("input").attr("readonly","readonly");
|
||||
$("select").attr("disabled", "disabled");
|
||||
|
||||
$(".editButton").click(function() {
|
||||
|
||||
|
|
@ -19,9 +17,8 @@ $(function() {
|
|||
//alert(id);
|
||||
makeEditable(id);
|
||||
|
||||
$(this).hide();
|
||||
$('.editButton').hide();
|
||||
|
||||
$("#"+id).find('.viewText').hide();
|
||||
$("#"+id).find('.saveButton').show();
|
||||
$("#"+id).find('.cancelButton').show();
|
||||
return false;
|
||||
|
|
@ -44,7 +41,8 @@ $(function() {
|
|||
var serializedForm = $("#"+'form_'+id).serialize();
|
||||
|
||||
$.post('/jobs/ajax_edit', serializedForm, function(data) {
|
||||
alert("Posted the Form!!"+data); //Need to do something here to update the Row.
|
||||
alert("Success! Job Edited"+data); //Need to do something here to update the Row.
|
||||
window.location.reload();
|
||||
});
|
||||
|
||||
//console.log($("#"+id).find('form').serialize());
|
||||
|
|
@ -57,18 +55,20 @@ $(function() {
|
|||
return false;
|
||||
});
|
||||
|
||||
//console.profileEnd();
|
||||
//console.profileEnd();
|
||||
|
||||
});
|
||||
|
||||
|
||||
function makeEditable(id) {
|
||||
$("#"+id).find(':input').show();
|
||||
$("#"+id).find('input').attr("readonly","");
|
||||
$("#"+id).find('select').attr("disabled","");
|
||||
}
|
||||
|
||||
|
||||
function cancelEditable(id) {
|
||||
$("#"+id).find(':input').hide();
|
||||
$("#"+id).find('input').attr("readonly","readonly");
|
||||
$("#"+id).find('select').attr("disabled","disabled");
|
||||
$(".editButton").show();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue