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@211 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-05 17:30:59 +00:00
parent 6844513253
commit c59f48fb84
3 changed files with 178 additions and 112 deletions

View File

@@ -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