| @@ 300-305 (lines=6) @@ | ||
| 297 | { |
|
| 298 | $modx = evolutionCMS(); |
|
| 299 | $msg = addslashes($modx->getDatabase()->escape($msg)); |
|
| 300 | if (substr(strtolower($url), 0, 11) == "javascript:") { |
|
| 301 | $act = "__WebAlert();"; |
|
| 302 | $fnc = "function __WebAlert(){" . substr($url, 11) . "};"; |
|
| 303 | } else { |
|
| 304 | $act = ($url ? "window.location.href='" . addslashes($url) . "';" : ""); |
|
| 305 | } |
|
| 306 | $html = "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>"; |
|
| 307 | if ($modx->isFrontend()) { |
|
| 308 | $modx->regClientScript($html); |
|
| @@ 38-44 (lines=7) @@ | ||
| 35 | if(!$img) { |
|
| 36 | $img = $base_url . $_style['tx']; |
|
| 37 | } |
|
| 38 | if(substr($action, 0, 3) == "js:") { |
|
| 39 | $action = substr($action, 3); |
|
| 40 | } else if(substr($action, 0, 3) == "hl:") { |
|
| 41 | $action = "window.location.href='" . substr($action, 3) . "'"; |
|
| 42 | } else { |
|
| 43 | $action = "window.location.href='" . $action . "'"; |
|
| 44 | } |
|
| 45 | $action = " onmouseover=\"this.className='cntxMnuItemOver';\" onmouseout=\"this.className='cntxMnuItem';\" onclick=\"$action; hideCntxMenu('" . $this->id . "');\""; |
|
| 46 | $this->html .= "<div class='" . ($disabled ? "cntxMnuItemDisabled" : "cntxMnuItem") . "' $action>"; |
|
| 47 | if(substr($img, 0, 5) == 'fa fa') { |
|