Formulaire pour la sauvegarde des critères de comptage
This commit is contained in:
parent
91d84eb92d
commit
5d93818bae
@ -46,6 +46,26 @@ class ComptageController extends Zend_Controller_Action
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage formulaire de sauvegarde
|
||||
*/
|
||||
public function savedialogAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
//Récupération de la session pour le profil et les valeurs du comptage
|
||||
require_once 'Scores/SessionCiblage.php';
|
||||
$session = new SessionCiblage();
|
||||
$criteres = $session->getCriteres();
|
||||
$this->view->assign('criteres', $criteres);
|
||||
if (count($criteres)==0) {
|
||||
$this->view->assign('noSelection', true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sauvegarde du profil de ciblage et de son comptage
|
||||
*/
|
||||
public function saveAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
16
application/views/default/scripts/comptage/savedialog.phtml
Normal file
16
application/views/default/scripts/comptage/savedialog.phtml
Normal file
@ -0,0 +1,16 @@
|
||||
<?php if ($this->noSelection): ?>
|
||||
Vous n'avez pas sélectionné de critères !
|
||||
<?php else:?>
|
||||
|
||||
<form method="post" action="<?=$this->url(array('controller'=>'comptage', 'action'=>'save'))?>">
|
||||
<label>Votre référence</label>
|
||||
<input type="text" name="ref" value="" />
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php endif;?>
|
||||
<pre>
|
||||
<?php print_r($this->criteres)?>
|
||||
</pre>
|
@ -88,6 +88,7 @@ $(document).ready(function(){
|
||||
headerSelected: "ui-icon-circle-arrow-s"
|
||||
}
|
||||
});
|
||||
|
||||
$( "#toggle" ).button().toggle(function() {
|
||||
$( "#accordion" ).accordion( "option", "icons", false );
|
||||
}, function() {
|
||||
@ -151,6 +152,31 @@ $(document).ready(function(){
|
||||
function(){ $('#control').css('display', 'none'); }
|
||||
);
|
||||
|
||||
$('#saveciblage').on('click', function(){
|
||||
var title = 'Sauvegarde du profil de ciblage';
|
||||
var href = $(this).attr('href');
|
||||
var dialogOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 500,
|
||||
height: 200,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {
|
||||
Ok: function() {
|
||||
|
||||
},
|
||||
Annuler: function() { $(this).dialog('close'); }
|
||||
},
|
||||
close: function() { $('#dialogsaveciblage').remove(); }
|
||||
};
|
||||
$('<div id="dialogsaveciblage"></div>').dialog(dialogOpts);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function set(key, value)
|
||||
|
Loading…
Reference in New Issue
Block a user