[Mapbender-commits] r8301 - in branches/2.7/http: plugins
print/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Apr 4 07:56:21 EDT 2012
Author: verenadiewald
Date: 2012-04-04 04:56:21 -0700 (Wed, 04 Apr 2012)
New Revision: 8301
Modified:
branches/2.7/http/plugins/mb_print.php
branches/2.7/http/print/classes/mbParagraphDecorator.php
Log:
http://trac.osgeo.org/mapbender/ticket/878
Modified: branches/2.7/http/plugins/mb_print.php
===================================================================
--- branches/2.7/http/plugins/mb_print.php 2012-04-03 11:45:36 UTC (rev 8300)
+++ branches/2.7/http/plugins/mb_print.php 2012-04-04 11:56:21 UTC (rev 8301)
@@ -572,15 +572,22 @@
} else {
str += '<div class="print_option_dyn" style="display:none;">\n';
}
+
+ if(element.maxCharacter) {
+ var maxLength = 'maxlength="'+element.maxCharacter+'"';
+ }
+ else {
+ var maxLength = "";
+ }
switch (element.type) {
case "text":
- str += '<input type="'+element.type+'" name="'+element.id+'" id="'+element.id+'" size="'+element.size+'"><br>\n';
+ str += '<input type="'+element.type+'" name="'+element.id+'" id="'+element.id+'" size="'+element.size+'" '+maxLength+'><br>\n';
break;
case "hidden":
str += '<input type="'+element.type+'" name="'+element.id+'" id="'+element.id+'">\n';
break;
case "textarea":
- str += '<textarea id="'+element.id+'" name="'+element.id+'" size="'+element.size+'"></textarea><br>\n';
+ str += '<textarea id="'+element.id+'" name="'+element.id+'" size="'+element.size+'" '+maxLength+'></textarea><br>\n';
break;
case "select":
str += '<select id="'+element.id+'" name="'+element.id+'" size="1">\n';
Modified: branches/2.7/http/print/classes/mbParagraphDecorator.php
===================================================================
--- branches/2.7/http/print/classes/mbParagraphDecorator.php 2012-04-03 11:45:36 UTC (rev 8300)
+++ branches/2.7/http/print/classes/mbParagraphDecorator.php 2012-04-04 11:56:21 UTC (rev 8301)
@@ -48,7 +48,9 @@
$this->pdf->objPdf->SetLineWidth($this->conf->border_width);
$this->pdf->objPdf->SetXY($this->conf->x_ul, $this->conf->y_ul);
$this->pdf->objPdf->setFont($this->conf->font_family, "", $this->conf->font_size);
- $this->pdf->objPdf->Cell($this->conf->width, $this->conf->height, utf8_decode($this->value), $this->conf->border, 0, $this->conf->align, $this->conf->fill);
+ #$this->pdf->objPdf->Cell($this->conf->width, $this->conf->height, utf8_decode($this->value), $this->conf->border, 0, $this->conf->align, $this->conf->fill);
+ //use MultiCell for line breaks after cell end is reached
+ $this->pdf->objPdf->MultiCell($this->conf->width, $this->conf->height, utf8_decode($this->value), $this->conf->border, $this->conf->align, $this->conf->fill);
}
}
More information about the Mapbender_commits
mailing list