Réécriture de CFGPCMN pour utiliser ManageTable

Ajout bouton ajout dans menu
This commit is contained in:
Dany De Bontridder 2017-10-24 00:27:41 +02:00
parent b0f26ffd3c
commit dc51c2806e
2 changed files with 5 additions and 0 deletions

View file

@ -56,6 +56,7 @@ class Acc_Plan_MTable extends Manage_Table_SQL
["label"=>_("Contexte"),"value"=>"CON"]
]);
$this->a_order=["pcm_val","pcm_lib","parent_accounting","pcm_type","fiche_qcode"];
$this->set_icon_mod("first");
}
/**
* Display a row

View file

@ -74,6 +74,7 @@ echo $mtable->display_table(" where pcm_val::text like '{$g_start}%' order by pc
/* it will override the classic onscroll (see scripts.js)
* @see scripts.js
*/
?>
<div id="go_up" class="inner_box" style="padding:0px;left:auto;width:250px;height: 100px;display:none;position:fixed;top:5px;right:20px">
<?php echo HtmlInput::title_box(_('Navigation'), 'go_up', "none");?>
@ -94,6 +95,9 @@ echo $mtable->display_table(" where pcm_val::text like '{$g_start}%' order by pc
$('go_up').hide();
}
}
$('pcmn_update_add_bt3').onclick=function() {
<?php printf("%s.input(-1,'%s')",$mtable->get_object_name(),$mtable->get_object_name());?>
}
</script>
<?php
html_page_stop();