From 861548b198d1c4290e8d8209ae16a5f6dd5efa0c Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Jul 2010 08:30:09 +0000 Subject: [PATCH 1/6] Ajout chemin executable php --- batch/greffeCmdMois.php | 1 + 1 file changed, 1 insertion(+) diff --git a/batch/greffeCmdMois.php b/batch/greffeCmdMois.php index d6d6669b6..4d889003e 100644 --- a/batch/greffeCmdMois.php +++ b/batch/greffeCmdMois.php @@ -1,3 +1,4 @@ +#!/usr/bin/php -q Date: Tue, 6 Jul 2010 09:23:06 +0000 Subject: [PATCH 2/6] Mise en forme --- www/js/synthese.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/www/js/synthese.js b/www/js/synthese.js index 9f1187fb7..72b04306c 100644 --- a/www/js/synthese.js +++ b/www/js/synthese.js @@ -1,7 +1,6 @@ $(document).ready(function() { - $('#synthese a[tooltip]').each(function() - { + $('#synthese a[tooltip]').each(function(){ $(this).qtip({ content: $(this).attr('tooltip'), style: { width: 500, name: 'dark' }, @@ -9,10 +8,8 @@ $(document).ready(function() }); }); - $('.sTip').each(function() - { - $(this).qtip( - { + $('.sTip').each(function(){ + $(this).qtip({ content: { text: 'Chargement...', url: $(this).attr('rel'), @@ -38,10 +35,8 @@ $(document).ready(function() $(location).attr('href',$(this).val()); }); - $('.scoreTip').each(function() - { - $(this).qtip( - { + $('.scoreTip').each(function(){ + $(this).qtip({ content: { text: 'Chargement...', url: $(this).attr('rel'), From 969d9b37e83830aac7ebdd175c56159a31f346fd Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Jul 2010 09:24:32 +0000 Subject: [PATCH 3/6] Modification appel surveillance --- includes/surveillance/index.php | 29 ++++++++++++++++ includes/surveillance/script-ajax.js | 31 ----------------- includes/surveillance/script.js | 28 --------------- includes/surveillance/style-ajax.css | 23 ------------ includes/surveillance/surveillance.php | 38 ++++++++++---------- www/index.php | 10 ++++-- www/pages/options_surv.php | 48 +++++++++++++------------- www/pages/portefeuille.php | 6 ++-- 8 files changed, 83 insertions(+), 130 deletions(-) create mode 100644 includes/surveillance/index.php delete mode 100644 includes/surveillance/script-ajax.js delete mode 100644 includes/surveillance/script.js delete mode 100644 includes/surveillance/style-ajax.css diff --git a/includes/surveillance/index.php b/includes/surveillance/index.php new file mode 100644 index 000000000..6b77c0ae8 --- /dev/null +++ b/includes/surveillance/index.php @@ -0,0 +1,29 @@ +Mise sous surveillance en cours...'); - return true; - } - - function showResponse(responseText, statusText) { - $('#frmSurv').replaceWith('' + responseText + ''); - if(statusText == 'success'){ return true; }else{ return false; } - } -}); \ No newline at end of file diff --git a/includes/surveillance/script.js b/includes/surveillance/script.js deleted file mode 100644 index e1aafb729..000000000 --- a/includes/surveillance/script.js +++ /dev/null @@ -1,28 +0,0 @@ -$(document).ready(function(){ - var siren = ''; - var options = { - target: '#frmSurv', - url: './pages/ajax_surveillance.php', - beforeSubmit: showRequest, - success: showResponse - }; - - $('#frmSurv').submit(function() { - $(this).ajaxSubmit(options); - return false; - }); - - function showResponse(responseText, statusText) { - $("#frmSurv").replaceWith('' + responseText + ''); - if(statusText == 'success' && siren != ''){ - document.location.href = './?page=surveillance'; - } - } - - function showRequest(formData, jqForm, options) { - var value = $('input[type=hidden][name=formSurv[siret]]').fieldValue(); - siren = value[0]; - $("#frmSurv").replaceWith('
Mise sous surveillance en cours...
'); - return true; - } -}); \ No newline at end of file diff --git a/includes/surveillance/style-ajax.css b/includes/surveillance/style-ajax.css deleted file mode 100644 index 8f727ed4a..000000000 --- a/includes/surveillance/style-ajax.css +++ /dev/null @@ -1,23 +0,0 @@ -form { clear:both; } -form em { color:#FF0000;} -fieldset {border:0; margin:0; padding:0;} -fieldset legend{ padding:0 0 0 10px;} -.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;} -.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; } -.fieldgrp label{font-weight:bold; margin-left:30px; width:180px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;} -.fieldgrp label span{font-weight:normal;} -.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;} -.field {float:left; padding:0 10px 0 0;line-height:22px;_padding-top:3px;} -.field .longfield{width:215px;} -.field .longfield-select{width:220px;} -.field .smallfield{width:95px;} -.field .medfield{width:110px;} -.field input, .field select{ font-size:110%; margin:2px 0; } -.field input[type="radio"] { margin:0 5px 0 5px; } -div.submit{ margin-left:200px; padding-left:0px; margin-top:1em; } -div.submit p.submit-button{margin-top:0;} -div.submit p.details{font-size:85%;color:#666;margin:0;} -div.submit p.required-note{margin-top:1em;} -div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;} -input.submit {border:none;} -#survForm {display:none;} \ No newline at end of file diff --git a/includes/surveillance/surveillance.php b/includes/surveillance/surveillance.php index 80909a875..454f3ba72 100644 --- a/includes/surveillance/surveillance.php +++ b/includes/surveillance/surveillance.php @@ -47,10 +47,10 @@ function formSurveillance($source, $siret, $notEmail, $inDialog = false) $output = ''; - if($inDialog){ + if ( $inDialog ){ $output.= ''."\n"; $output.= '
'."\n"; + 'action="./?page=surveillance" method="post">'."\n"; $output.= ''; $output.= ''."\n"; @@ -124,14 +124,14 @@ function formSurveillance($source, $siret, $notEmail, $inDialog = false) $output.= ''."\n"; $output.= '
'."\n"; - }else{ - $texte = 'Mettre sous surveillance '; - if( !empty($source) ) { - $texte.= $assocSourceTxt[$source]; - } - $output.= '
'; - $output.= lienSousSurveillance($texte, - 'Ajouter la surveillance', $source, $siret); + } else { + $texte = 'Mettre sous surveillance '; + if( !empty($source) ) { + $texte.= $assocSourceTxt[$source]; + } + $output.= '
'; + $output.= lienSousSurveillance($texte, + 'Ajouter la surveillance', $source, $siret); $output.= '
'."\n"; } return $output; @@ -181,10 +181,11 @@ function getSurveillance($source, $siret){ * @param string $siret */ function lienSousSurveillance($texte, $titre, $source, $siret){ - return ''. $texte . ''; + $output = ''. $texte . ''; + return $output; } /** @@ -251,7 +252,7 @@ function inSurveillance($source, $siret){ 'dateAjout' => $item['dateAjout'], 'dateDerEnvoi' => $item['dateDerEnvoi'], ); - break; + break; } } } else { @@ -300,9 +301,9 @@ function setSurveillance($tabForm) } //Mise en surveillance pour une liste de sources - if (is_array($source)){ - foreach ($source as $s){ - try{ + if ( is_array($source) ){ + foreach ( $source as $s ){ + try { $result = $client->setSurveillance($siret, $email, $ref, $s, false, $encours); $result = ''; @@ -310,7 +311,6 @@ function setSurveillance($tabForm) $result = false; } } - //Mise en surveillance pour une source } else { try{ diff --git a/www/index.php b/www/index.php index db0ad5f48..2ecb286f7 100644 --- a/www/index.php +++ b/www/index.php @@ -156,10 +156,10 @@ switch ($page) $page2 = 'evenements.php'; require_once realpath(dirname(__FILE__)).'/pages/main.php'; break; - case 'saisieajax': require_once '../includes/saisie/index.php'; - exit; break; + exit; + break; case 'saisie': $title = titreAvecSiren('Saisie/Edition'); if (hasModeEdition()){ @@ -340,6 +340,12 @@ switch ($page) require_once realpath(dirname(__FILE__)).'/pages/main.php'; break; case 'surveillance': + //Gestion des requetes en Ajax + if ( isset($_REQUEST['q']) ){ + require_once '../includes/surveillance/index.php'; + exit; + } + //Affichage des surveillances $title = 'Liste des établissements sous suveillances'; if (hasPerm('survliste')){ $page2 = 'options_surv.php'; diff --git a/www/pages/options_surv.php b/www/pages/options_surv.php index 0e175f1f1..4e1a95df8 100644 --- a/www/pages/options_surv.php +++ b/www/pages/options_surv.php @@ -111,7 +111,7 @@ if($source == ''){ @@ -124,7 +124,7 @@ if($vue=='default'){
@@ -342,20 +342,18 @@ foreach($listTrier as $item) foreach($tabSource as $source => $perm) { FB::log($source, $perm); - if(hasPerm('surv'.$perm)) + if ( hasPerm('surv'.$perm) ) { - if(array_key_exists($source, $item['sources'])) - { - foreach($item['sources'][$source] as $surveillance) - { + if ( array_key_exists($source, $item['sources']) ){ + foreach ( $item['sources'][$source] as $surveillance ){ ?>

- - @@ -366,13 +364,13 @@ foreach($listTrier as $item)

- + + +
- +} elseif( $vue == 'source' ) { + foreach ( $listTrier as $item ){ + ?> + @@ -450,9 +450,9 @@ foreach($listTrier as $item){ if ($pDate!='00/00/0000'){print '

'.$pDate.'

'; }else{ print '

-

';} ?> - - + diff --git a/www/pages/portefeuille.php b/www/pages/portefeuille.php index afac6b7a9..bce12bb2d 100644 --- a/www/pages/portefeuille.php +++ b/www/pages/portefeuille.php @@ -11,7 +11,7 @@ $position = isset($_REQUEST['p']) ? $_REQUEST['p'] : 0 ; $nbAffichage = 100; -switch($tri){ +switch ( $tri ){ default: case 'siren': $triws = 'siren'; break; case 'rs': $triws = 'rs'; break; @@ -22,7 +22,7 @@ switch($tri){ } //Liste des surveillances score de l'utilisateur -try{ +try { $O = $client->getPortefeuille(0, $position, $nbAffichage, $triws); $listSurveillance = $O['results']['reponses']; @@ -277,7 +277,7 @@ if(count($listSurveillance)>0) $item['procol']!='P' && $item['actif']!=0) { ?> - From 21292c4c414d1104ef0190a7e43b84e8cc866906 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Jul 2010 09:25:42 +0000 Subject: [PATCH 4/6] Suppression debug --- includes/surveillance/index.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/surveillance/index.php b/includes/surveillance/index.php index 6b77c0ae8..b2bdb0f75 100644 --- a/includes/surveillance/index.php +++ b/includes/surveillance/index.php @@ -13,8 +13,6 @@ switch ( $action ){ echo $return; break; case 'setsurv': - print_r($_REQUEST['formSurv']); - exit; $set = setSurveillance($_REQUEST['formSurv']); FB::log($set, 'set'); if ( $set == '' ){ From d85283c26325c36ab9bd330e368b5206a4aac200 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Jul 2010 09:43:27 +0000 Subject: [PATCH 5/6] =?UTF-8?q?Gestion=20diff=C3=A9rence=20type=20et=20typ?= =?UTF-8?q?eCommande?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/pages/greffescmd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/pages/greffescmd.php b/www/pages/greffescmd.php index 90f736702..cfd5516d3 100644 --- a/www/pages/greffescmd.php +++ b/www/pages/greffescmd.php @@ -171,7 +171,7 @@ if (count($cStatuts)>0 && hasModeEdition()){

@@ -434,8 +430,12 @@ foreach($listTrier as $item){

- - + + + + + +