mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 00:18:25 +01:00
a bit more flexible parsing of confirm dialogs
This commit is contained in:
parent
6aaa85b7bd
commit
99ca767542
@ -203,7 +203,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<div id="divMain">'."\n";
|
echo '<div id="divMain">'."\n";
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['manual'])
|
if ($GLOBALS['egw_info']['user']['apps']['manual']) // adding a manual icon to every popup
|
||||||
{
|
{
|
||||||
$manual =& new etemplate('etemplate.popup.manual');
|
$manual =& new etemplate('etemplate.popup.manual');
|
||||||
echo $manual->show(array());
|
echo $manual->show(array());
|
||||||
@ -994,10 +994,11 @@
|
|||||||
{
|
{
|
||||||
$onclick = preg_replace("/form::name\\('([^']+)'\\)/",'\''.$this->form_name($cname,$matches[1]).'\'',$onclick);
|
$onclick = preg_replace("/form::name\\('([^']+)'\\)/",'\''.$this->form_name($cname,$matches[1]).'\'',$onclick);
|
||||||
}
|
}
|
||||||
elseif (preg_match('/^return confirm\(["\']{1}(.*)["\']{1}\);?$/',$cell['onclick'],$matches))
|
elseif (preg_match('/confirm\(["\']{1}(.*)["\']{1}\)/',$cell['onclick'],$matches))
|
||||||
{
|
{
|
||||||
$question = lang($matches[1]).(substr($matches[1],-1) != '?' ? '?' : ''); // add ? if not there, saves extra phrase
|
$question = lang($matches[1]).(substr($matches[1],-1) != '?' ? '?' : ''); // add ? if not there, saves extra phrase
|
||||||
$onclick = "return confirm('".str_replace('\'','\\\'',$this->html->htmlspecialchars($question))."');";
|
$onclick = preg_replace('/confirm\(["\']{1}(.*)["\']{1}\)/','confirm(\''.$question.'\')',$onclick);
|
||||||
|
//$onclick = "return confirm('".str_replace('\'','\\\'',$this->html->htmlspecialchars($question))."');";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->java_script() && ($cell['onchange'] != '' || $img && !$readonly) && !$cell['needed']) // use a link instead of a button
|
if ($this->java_script() && ($cell['onchange'] != '' || $img && !$readonly) && !$cell['needed']) // use a link instead of a button
|
||||||
|
Loading…
Reference in New Issue
Block a user