protected function addSCKeyScript()
    {
        $keyMap = $this->getSCKeyFuncMap();
        if (count($keyMap) == 0) {
            return "";
        }
        Openbizx::$app->getClientProxy()->appendScripts("shortcut", "shortcut.js");
        $str = "<script>\n";
        $formObj = $this->getFormObj();

        if (!$formObj->removeall_sck) {
            $str .= " shortcut.removeall(); \n";
            $formObj->removeall_sck = true;
        }

        foreach ($keyMap as $key => $func) {
            $str .= " shortcut.remove(\"$key\"); \n";
        }

        $str .= " shortcut.add(\"$key\",function() { $func }); \n";
        $str .= "</script>\n";
        return $str;
    }
protected function addSCKeyScript()
    {
        $keyMap = $this->getSCKeyFuncMap();
        if (count($keyMap) == 0) {
            return "";
        }
        Openbizx::$app->getClientProxy()->appendScripts("shortcut", "shortcut.js");
        $str = "<script>\n";
        $formObj = $this->getFormObj();

        if (!$formObj->removeall_sck) {
            $str .= " shortcut.removeall(); \n";
            $formObj->removeall_sck = true;
        }

        foreach ($keyMap as $key => $func) {
            $str .= " shortcut.remove(\"$key\"); \n";
        }

        $str .= " shortcut.add(\"$key\",function() { $func }); \n";
        $str .= "</script>\n";
        return $str;
    }
protected function addSCKeyScript ( ) { $ keyMap = $ this -> getSCKeyFuncMap ( ) ; if ( count ( $ keyMap ) == 0 ) { return "" ; } Openbizx :: $ app -> getClientProxy ( ) -> appendScripts ( "shortcut" , "shortcut.js" ) ; $ str = "<script>\n" ; $ formObj = $ this -> getFormObj ( ) ; if ( ! $ formObj -> removeall_sck ) { $ str .= " shortcut.removeall(); \n" ; $ formObj -> removeall_sck = true ; } foreach ( $ keyMap as $ key => $ func ) { $ str .= " shortcut.remove(\"$key\"); \n" ; } $ str .= " shortcut.add(\"$key\",function() { $func }); \n" ; $ str .= "</script>\n" ; return $ str ; }
Add sort-cut key scripts

@return string
Add sort - cut key scripts