issue #0000043 : Work on page break

This commit is contained in:
Michael RICOIS 2013-11-20 14:12:42 +00:00
parent 7535ddb913
commit 9558971c48
7 changed files with 43 additions and 30 deletions

View File

@ -1185,7 +1185,12 @@ class IdentiteController extends Zend_Controller_Action
$heading = $deg[$num];
$streetview->setHeading($heading);
//$streetview->setLocationTxt($adresse);
$url = $this->view->url(array('controller'=>'fichier', 'action'=>'streetview', 'fichier'=> $streetview->display()), null, true);
$url = $this->view->url(array(
'controller'=>'fichier',
'action'=>'streetview',
'fichier'=> $streetview->display())
, null, true
);
$this->view->assign('url', $url);
}
$this->view->assign('lat', $lat);

View File

@ -50,7 +50,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $request->getParam('apage'));
if ($session->getSource()=='006') {
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
$this->view->assign('AutreSource', true);

View File

@ -1,4 +1,4 @@
<?php if ($this->source == 'google'):?>
<?php if ($this->source == 'google') {?>
<div id="infogeo_photo">
<?=$this->action('streetview', 'identite', null, array(
@ -8,20 +8,13 @@
));?>
</div>
<?php elseif ($this->source == 'mappy'):?>
<?php } elseif ($this->source == 'mappy') {?>
<div><img id="pp-cb-thumb" width="300px" /></div>
<script src="<?=$this->lienJs?>"></script>
<script type="text/javascript">
$(document).ready(function() {
var photoService = new Mappy.api.visiocity.PhotoService();
var geo = new Mappy.api.geolocation.Geocoder();
var address = "<?=$this->adresse?>";
geo.geocode(address, function(result) {
photoService.search(result[0], "f", serviceHandler);
}, function(error) {});
var serviceHandler = function(result) {
var serviceHandler = function(result) {
if (result instanceof Mappy.api.visiocity.Frontage) {
var current = result.getCurrent();
var img = $('<img src="' + current.getURL(320, null) +
@ -30,6 +23,12 @@ $(document).ready(function() {
$('#pp-cb-thumb').replaceWith(img);
}
};
var address = "<?=$this->adresse?>";
var geo = new Mappy.api.geolocation.Geocoder();
var photoService = new Mappy.api.visiocity.PhotoService();
geo.geocode(address, function(result) {
photoService.search(result[0], 'f', serviceHandler);
}, function(error) {});
});
</script>
<?php endif;?>
<?php }?>

View File

@ -1,12 +1,14 @@
<?php if ($this->url) {?>
<div id="legende-photo">Cliché à l'approche de l'adresse postale.</div>
<img id="pp-cb-thumb" src="<?=$this->url?>" width="320" height="320" />
<div>
<div>
<a class="street-heading" href="<?=$this->url(array(
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec))?>">&lt;</a>
-
'controller'=>'identite','action'=>'streetview',
'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec))?>">&lt;</a>
-
<a class="street-heading" href="<?=$this->url(array(
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv))?>">&gt;</a>
'controller'=>'identite', 'action'=>'streetview',
'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv))?>">&gt;</a>
</div>
<script>
$('a.street-heading').click(function(e){

View File

@ -1,12 +1,13 @@
<script type="text/javascript">
window.onload = function() {
window.print();
window.close();
window.print(); window.close();
}
</script>
<style>
#header { width:0px !important;}
#global { width:auto !important;}
#content { margin:5px; padding:0; width:auto; }
body{font-family:Verdana, Arial, sans-serif;font-size: 11px;}
#global {width:auto !important;text-align:left;}
#content {margin:5px; padding:0; width:auto;}
table {page-break-inside:avoid}
div.paragraph {page-break-inside:avoid}
</style>
<?=$this->action($this->action, $this->controller, null, $this->params)?>

View File

@ -36,7 +36,8 @@ class Scores_Wkhtml_Pdf
if (empty($fileOut)) {$fileOut = str_replace('.html', '.pdf', $fileIn); }
if(file_exists($fileOut)){ unlink($fileOut); }
$options = '--disable-internal-links';
$options = '--print-media-type';
$options.= ' --disable-internal-links';
if ( count($this->options) )
{
foreach ( $this->options as $name => $value )

View File

@ -397,7 +397,7 @@ table {
/* Main
----------------------------------*/
body{ background-color: #bebebe;font-family: Verdana, Arial, sans-serif;font-size: 11px;text-align: center; /* pour corriger le bug de centrage IE */ }
body{ background-color:#bebebe;font-family: Verdana, Arial, sans-serif;font-size:11px;text-align:center; /* pour corriger le bug de centrage IE */ }
#global {width:900px; margin:0 auto; text-align:left;}
#content {float:right;clear:both;width:680px;padding:0;margin:0;padding-top:20px;}
#center {background-color:#fff;padding:5px 0;}
@ -425,8 +425,15 @@ input, select {border: 1px solid #999999;vertical-align: middle;font: 11px Arial
div.ui-state-highlight p {margin: 10px;}
div.ui-state-highlight a {text-decoration: underline;}
.noborder {border:0;}
img { vertical-align:middle; }
img {vertical-align:middle;}
@media print {
body{font-family:Verdana, Arial, sans-serif;font-size: 11px;}
#global {width:auto !important;text-align:left;}
#content {margin:5px; padding:0; width:auto; }
table {page-break-inside:avoid}
div.paragraph {page-break-inside:avoid}
}
/* Menu
----------------------------------*/
@ -452,7 +459,6 @@ div#menu div.icones {text-align:center;margin-top:5px;}
/* Recherche
----------------------------------*/
/*#center{padding:5px;}*/
#center-recherche{text-align:center; padding:0;}
#recherche{margin:78px auto 20px auto;}
#recherche h3{color:#ffffff; font-size:medium; font-weight:bold;}
@ -671,11 +677,10 @@ table.greffe td.type {text-align:center;}
/* Kbis
----------------------------------*/
/* progress bar container */
#progressbar { border:1px solid black;width:200px;height:20px;position:relative;color:black;}
#progressbar {border:1px solid black;width:200px;height:20px;position:relative;color:black;}
/* color bar */
#progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;}
/* text on bar */
#progressbar div.progress .text {position:absolute;text-align:center;color:white;}
/* text off bar */
#progressbar div.text {position:absolute;width:100%;height:100%;text-align:center;}
#progressbar div.text {position:absolute;width:100%;height:100%;text-align:center;}