Added popup screen ajax option.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 15 Oct 2008 13:28:40 +0000 (13:28 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 15 Oct 2008 13:28:40 +0000 (13:28 +0000)
includes/ajax.inc

index 135ee03df2dc91cd46d75d79d63a0d22f91adee3..ce8c965519e3ab62f0429649e8f0d50fe4ca4808 100644 (file)
@@ -25,11 +25,17 @@ class Ajax extends JsHttpRequest {
        //
        function redirect($url) {
            if(in_ajax()) {
-                 $this->_addCommand(true, array('n'=>'rd'),$url);
+                       $this->_addCommand(true, array('n'=>'rd'),$url);
                  $this->run();
            }
        }
        //
+       // Popup window (target=_blank)
+       //
+       function popup($url) {
+                 $this->_addCommand(true, array('n'=>'pu'),$url);
+       }
+       //
        // Adds an executable Javascript code.
        //
        function addScript($trigger, $sJS)