Make a new merge after bad reintegrate of branche 2.2

This commit is contained in:
Michael RICOIS 2012-09-13 14:52:09 +00:00
parent 187f42255c
commit 93adf6d658
3 changed files with 107 additions and 49 deletions

View File

@ -1,4 +1,5 @@
<div id="center">
<?php if (!empty($this->message)) { ?>
<div style="margin:5px; padding: 5pt 0.7em;" class="ui-state-highlight ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
@ -8,9 +9,10 @@
<h1 class="titre">PROFIL UTILISATEUR</h1>
<form id="moncompte" name="moncompte" action="/user" method="post">
<div class="paragraph">
<form id="moncompte" name="moncompte" action="/user" method="post">
<input type="hidden" name="frmOptions[idClient]" value="<?=$this->options['idClient']?>"/>
<input type="hidden" name="frmOptions[action]" value="<?=$this->action?>"/>
@ -35,7 +37,7 @@ if ($this->action == 'new') {
<div class="infoTitle StyleInfoLib">R&eacute;f. facturation (service, etc...)</div>
<div class="infoData">
<input type="text" size="20" maxlength="80" name="frmOptions[reference]" value="<?=$this->options['reference']?>"/>
<input type="text" size="20" maxlength="80" name="frmOptions[reference]" value="<?=$this->options['referenceParDefaut']?>"/>
</div>
<div class="infoTitle StyleInfoLib">Adresse e-mail</div>

View File

@ -9,25 +9,31 @@
<div id="groups" class="jstree jstree-default" style="overflow:auto;"></div>
<script src="/libs/jstree/jquery.jstree.min.js"></script>
<script>
$("#groups").jstree({
"core" : { "html_titles" : true },
$("#groups").jstree({
"core" : {
"html_titles" : true,
},
"plugins" : ["themes", "json_data", "search"],
"json_data" : { "data" : [<?=$this->data?>] },
"search" : { "show_only_matches" : true },
"json_data" : {
"data" : [<?=$this->data?>],
},
"search" : {
"show_only_matches" : true,
},
"themes" : {
"theme" : "default",
"url" : "/libs/jstree/themes/default/style.css",
"dots" : true,
"icons" : false
}
"icons" : false,
}
});
$('#clear_search').on('click', function() {
$("#text").val('');
$("#groups").jstree("clear_search");
$("#groups").jstree("clear_search");
});
$('#search').on('click', function(){
$("#groups").jstree("search", $("#text").val());
$("#groups").jstree("search", $("#text").val());
});
</script>

View File

@ -1,5 +1,5 @@
<div id="center">
<?php if ($message!='') { ?>
<?php if ($message!='') {?>
<div style="margin:5px; padding: 0pt 0.7em;" class="ui-state-highlight ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
<?=$message?></p>
@ -9,7 +9,7 @@
<h1 class="titre">Saisie ou Correction Liasse</h1>
<div class="paragraph">
<div>
<div class="clearfix">
<label>Num&eacute;ro identifiant Siret</label>
<?=$this->SiretTexte($this->siret)?>
</div>
@ -19,45 +19,95 @@
<?=$this->raisonSociale?>
</div>
</div>
<h2>TITRE</h2>
<style>
#tabs { font-size:0.8em; }
</style>
<div id="tabs">
<ul>
<?php foreach ( $this->entetes as $i => $entete ) {?>
<li><a href="#tabs-<?=$i?>"><?=$entete?></a></li>
<?php }?>
</ul>
<?php foreach ( $this->postes as $i => $item ) {?>
<div id="tabs-<?=$i?>">
<table>
<?php
$max = count($item['cols'][0]);
$nbcols = count($item['cols']);
for ($i=0;$i<$max;$i++) {
?>
<tr>
<?php for ($k=0;$k<$nbcols;$k++) {?>
<td>
<?=(isset($item['cols'][$k][$i]))?$item['cols'][$k][$i].'=':'';?>
</td>
<td>0</td>
<?php }?>
</tr>
<?php }?>
</table>
</div>
<?php }?>
</div>
<div class="clearfix">
<label>Liste des liasses</label>
<form name="choixbilan" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'liasse', 'siret'=>$this->siren), null, true)?>" method="post">
<select name="selection">
<option>-</option>
<?php foreach ($this->bilans as $item) {?>
<option value="<?=$item['value']?>"><?=$item['type']?> - <?=$item['date']?></option>
<?php }?>
</select>
</form>
<script>
$(function() {
$( "#tabs" ).tabs();
$('select[name=selection]').change(function(e){
e.preventDefault();
$('form[name=choixbilan]').submit();
});
</script>
</div>
</div>
<div class="paragraph">
<?php if ($this->infos) {?>
<div class="tabbed_area">
<ul class="tabs">
<?php foreach ($this->ancres as $id => $name):?>
<li><a href="#<?=$id?>" title="<?=$name?>" class="tab"><?=$name?></a></li>
<?php endforeach;?>
</ul>
</div>
<div class="content">
<?php
if ($this->typeBilan=='N' || $this->typeBilan=='C') {
echo $this->partial('saisie/liasse/2050.phtml');
} elseif ($this->typeBilan=='S') {
echo $this->partial('saisie/liasse/2033.phtml');
}
?>
</div>
<div id="saveMsg" style="text-align:center;"></div>
<div style="text-align:center;"><input type="submit" class="button" id="save" name="save" value="Enregistrer" /></div>
<script>
$('input#save').click(function(e){
e.preventDefault();
var strPostes = '';
$('span.poste').each(function(){
id = $(this).attr('id');
val = $(this).html();
if (val != id && val != '' && val != '-') {
if (strPostes!='') strPostes = strPostes + ';';
strPostes = strPostes + id + '=' + val;
}
});
$('input#save').css('display', 'none');
$('div#saveMsg').html('Enregistrement en cours....');
$.post('/saisie/liassesave/siren/<?=$this->siren?>', {
unite: $('span#unit').html(),
dateCloture: $('span#dateCloture').html(),
dureeMois: $('span#dureeMois').html(),
dateCloturePre: $('span#dateCloturePre').html(),
dureeMoisPre: $('span#dureeMoisPre').html(),
typeBilan: $('span#typeBilan').html(),
postes: strPostes
}, function(data) {
if (data.status=='OK') {
$('div#saveMsg').html('Bilan modifié.');
} else if (data.status=='ERR' && $.isArray(data.postes)) {
for (poste in data.postes) {
$('span#'+poste).addClass('editable-error');
}
$('div#saveMsg').html(data.message);
$('input#save').css('display', 'block');
} else if (data.status=='ERR') {
$('div#saveMsg').html(data.message);
$('input#save').css('display', 'block');
} else {
$('div#saveMsg').html('Error');
$('input#save').css('display', 'block');
}
}, 'json'
).error(function(){
$('div#saveMsg').html('Error');
$('input#save').css('display', 'block');
});
});
</script>
<?php } else {?>
Aucune sélection.
<?php }?>
</div>
</div>