Changed the dynamic div generation to occur under PHP instead of directly under Javascript. This allows us to create a div on the server side making it directly part of the page (which is how we'll populate it with existing values).
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@211 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -220,7 +220,17 @@ class FormatHelper extends AppHelper {
|
||||
return $prefix . $var;
|
||||
|
||||
// OK, must just be a string after all
|
||||
return $prefix . "'" . preg_replace("/'/", '\\\'', $var) . "'";
|
||||
$str = '';
|
||||
$first = true;
|
||||
$lines = explode("\n", $var);
|
||||
//pr(compact('var', 'lines'));
|
||||
foreach ($lines AS $line) {
|
||||
if (!$first)
|
||||
$str .= ' + "\n" +' . "\n";
|
||||
$str .= $prefix . "'" . preg_replace("/'/", '\\\'', $line) . "'";
|
||||
$first = false;
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
// The only thing left that we know how to dump
|
||||
|
||||
Reference in New Issue
Block a user