Simplification

This commit is contained in:
Michael RICOIS 2012-02-15 10:35:07 +00:00
parent 60b733b8b6
commit 6762b15a00
14 changed files with 116 additions and 82 deletions

View File

@ -5,8 +5,8 @@ class DashboardController extends Libs_Controller
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/pages/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/pages/'.$this->getRequest()->getControllerName().'.js', 'text/javascript');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/'.$this->getRequest()->getControllerName().'.js', 'text/javascript');
}
public function indexAction()
@ -48,9 +48,28 @@ class DashboardController extends Libs_Controller
$this->_helper->viewRenderer->setNoRender(true);
$request = $this->getRequest();
$object = new Object_Dashboard();
$q = $request->getParam('q');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
echo $object->rcomptage(strtolower($this->getRequest()->getParam('q', '')));
$criteresM = new Table_Criteres();
$sql = $criteresM->select()
->from($criteresM, array('id', 'reference', "DATE_FORMAT(dateAjout, '%d/%m/%Y') as date"))
->where("idClient = ?", $user->idClient)
->where("login = ?", $user->username)
->where("reference LIKE ?", $q.'%');
$rows = $criteresM->fetchAll($sql);
if (count($rows)>0){
$separator = " , ";
foreach ($rows as $item) {
$output[] = array(
'label' => $item->reference . $separator . $item->date,
'value' => $item->reference,
'url' => $this->view->url(array('controller'=>'dashboard', 'action'=>'ciblagedetail', 'id'=>$item->id)),
);
}
}
echo json_encode($output);
}
public function configurationAction()

View File

@ -10,7 +10,7 @@ class EconomiqueController extends Libs_Controller
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/pages/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);

View File

@ -10,7 +10,7 @@ class EntrepriseController extends Libs_Controller
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/pages/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);

View File

@ -11,7 +11,7 @@ class FinancierController extends Libs_Controller
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/pages/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);

View File

@ -11,7 +11,7 @@ class GeographiqueController extends Libs_Controller
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/pages/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);

View File

@ -11,7 +11,7 @@ class JuridiqueController extends Libs_Controller
public function indexAction()
{
require_once('Scores/Field.php');
$this->view->headLink()->appendStylesheet('/themes/default/styles/pages/'.$this->getRequest()->getControllerName().'.css', 'all');
$this->view->headLink()->appendStylesheet('/themes/default/styles/'.$this->getRequest()->getControllerName().'.css', 'all');
$auth = Zend_Auth::getInstance();
$user = $auth->getIdentity();
$field = new Fields($user->username);

View File

@ -13,4 +13,21 @@ $(document).ready(function(){
}
});
$(".tooltip").click(function(){
var id = $(this).attr('id');
var date = $('#ch_'+id).html();
$('#ch_'+id).html('<img src="/themes/default/images/ajax.gif" />');
$.ajax({
type : "GET",
cache : false,
url : 'dashboard/ciblagedetail/id/'+id,
data : $(this).serializeArray(),
success: function(data) {
$('#ch_'+id).html(date);
$('.previsualisation').html(data);
}
});
});
});

View File

@ -1,3 +1,73 @@
.dashboard {
background-color:#ffffff;
}
.dashboard .reference
{
font-weight:bold;
}
.dashboard .date
{
font-style: italic;
}
.dashboard fieldset
{
border:1px solid black;
padding:20px;
}
.dashboard a
{
color:blue;
text-decoration: none;
}
.dashboard legend
{
text-align:right;
margin:10px 0;
text-decoration: none;
font-size:20px;
font-weight:bold;
}
.dashboard table {
font-size:11px;
border-collapse: separate;
border-spacing: 1px 8px; /* Nombre de pixels d'espace horizontal (5px), vertical (8px) */
}
.dashboard tr th , .dashboard tr td{
height:20px;
padding:5px;
border:1px solid silver;
margin-top:2px;
}
.dashboard tbody tr {
/*background-image:url('/themes/default/images/stripe.png');*/
background-repeat: repeat-x;
cursor:pointer;
}
.dashboard thead tr {
background-color: #DFE8E7;
}
.dashboard tbody tr:hover {
/*background-image:url('/themes/default/images/stripe-hover.png');*/
background-repeat: repeat-x;
}
.dashboard .previsua
{
border-collapse: separate;
border-spacing: 1px 1px;
font-size:12px;
}
#rechercheCiblage {
margin:5px 0;
}
@ -32,3 +102,4 @@ ul.ui-autocomplete {
#lastCiblage {
margin:5px 0;
}

View File

@ -1,5 +1,3 @@
@CHARSET "ISO-8859-1";
#economique .arborescence {
border-top: 1px solid #838587;
background: #b8b8b8;

View File

@ -1,71 +0,0 @@
@CHARSET "ISO-8859-1";
.dashboard {
background-color:#ffffff;
}
.dashboard .reference
{
font-weight:bold;
}
.dashboard .date
{
font-style: italic;
}
.dashboard fieldset
{
border:1px solid black;
padding:20px;
}
.dashboard a
{
color:blue;
text-decoration: none;
}
.dashboard legend
{
text-align:right;
margin:10px 0;
text-decoration: none;
font-size:20px;
font-weight:bold;
}
.dashboard table {
font-size:11px;
border-collapse: separate;
border-spacing: 1px 8px; /* Nombre de pixels d'espace horizontal (5px), vertical (8px) */
}
.dashboard tr th , .dashboard tr td{
height:20px;
padding:5px;
border:1px solid silver;
margin-top:2px;
}
.dashboard tbody tr {
/*background-image:url('/themes/default/images/stripe.png');*/
background-repeat: repeat-x;
cursor:pointer;
}
.dashboard thead tr {
background-color: #DFE8E7;
}
.dashboard tbody tr:hover {
/*background-image:url('/themes/default/images/stripe-hover.png');*/
background-repeat: repeat-x;
}
.dashboard .previsua
{
border-collapse: separate;
border-spacing: 1px 1px;
font-size:12px;
}