Subversion Repositories oidplus

Rev

Rev 800 | Rev 805 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 800 Rev 801
Line 464... Line 464...
464
        public function gui($id, &$out, &$handled) {
464
        public function gui($id, &$out, &$handled) {
465
                if ($id === 'oidplus:system') {
465
                if ($id === 'oidplus:system') {
466
                        $handled = true;
466
                        $handled = true;
467
 
467
 
468
                        $out['title'] = OIDplus::config()->getValue('system_title');
468
                        $out['title'] = OIDplus::config()->getValue('system_title');
469
                        $out['icon'] = OIDplus::webpath(__DIR__,true).'img/main_icon.png';
469
                        $out['icon'] = OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon.png';
470
 
470
 
471
                        if (file_exists(OIDplus::localpath() . 'userdata/welcome/welcome$'.OIDplus::getCurrentLang().'.html')) {
471
                        if (file_exists(OIDplus::localpath() . 'userdata/welcome/welcome$'.OIDplus::getCurrentLang().'.html')) {
472
                                $cont = file_get_contents(OIDplus::localpath() . 'userdata/welcome/welcome$'.OIDplus::getCurrentLang().'.html');
472
                                $cont = file_get_contents(OIDplus::localpath() . 'userdata/welcome/welcome$'.OIDplus::getCurrentLang().'.html');
473
                        } else if (file_exists(OIDplus::localpath() . 'userdata/welcome/welcome.html')) {
473
                        } else if (file_exists(OIDplus::localpath() . 'userdata/welcome/welcome.html')) {
474
                                $cont = file_get_contents(OIDplus::localpath() . 'userdata/welcome/welcome.html');
474
                                $cont = file_get_contents(OIDplus::localpath() . 'userdata/welcome/welcome.html');
Line 663... Line 663...
663
 
663
 
664
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
664
        public function tree(&$json, $ra_email=null, $nonjs=false, $req_goto='') {
665
                if ($nonjs) {
665
                if ($nonjs) {
666
                        $json[] = array(
666
                        $json[] = array(
667
                                'id' => 'oidplus:system',
667
                                'id' => 'oidplus:system',
668
                                'icon' => OIDplus::webpath(__DIR__,true).'img/main_icon16.png',
668
                                'icon' => OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png',
669
                                'text' => _L('System')
669
                                'text' => _L('System')
670
                        );
670
                        );
671
 
671
 
672
                        $parent = '';
672
                        $parent = '';
673
                        $res = OIDplus::db()->query("select parent from ###objects where id = ?", array($req_goto));
673
                        $res = OIDplus::db()->query("select parent from ###objects where id = ?", array($req_goto));
Line 775... Line 775...
775
                                        "opened" => true,
775
                                        "opened" => true,
776
                                        // "selected" => true)  // "selected" is buggy:
776
                                        // "selected" => true)  // "selected" is buggy:
777
                                        // 1) The select-event will not be triggered upon loading
777
                                        // 1) The select-event will not be triggered upon loading
778
                                        // 2) The nodes directly blow cannot be opened (loading infinite time)
778
                                        // 2) The nodes directly blow cannot be opened (loading infinite time)
779
                                ),
779
                                ),
780
                                'icon' => OIDplus::webpath(__DIR__,true).'img/main_icon16.png',
780
                                'icon' => OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/main_icon16.png',
781
                                'children' => $objTypesChildren
781
                                'children' => $objTypesChildren
782
                        );
782
                        );
783
 
783
 
784
                        return true;
784
                        return true;
785
                }
785
                }
Line 1043... Line 1043...
1043
                }
1043
                }
1044
 
1044
 
1045
                $out = '<script>
1045
                $out = '<script>
1046
                                tinymce.EditorManager.baseURL = "vendor/tinymce/tinymce";
1046
                                tinymce.EditorManager.baseURL = "vendor/tinymce/tinymce";
1047
                                tinymce.init({
1047
                                tinymce.init({
1048
                                        document_base_url: "'.OIDplus::webpath().'",
1048
                                        document_base_url: "'.OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'",
1049
                                        selector: "#'.$name.'",
1049
                                        selector: "#'.$name.'",
1050
                                        height: 200,
1050
                                        height: 200,
1051
                                        statusbar: false,
1051
                                        statusbar: false,
1052
//                                      menubar:false,
1052
//                                      menubar:false,
1053
//                                      toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table | fontsizeselect",
1053
//                                      toolbar: "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table | fontsizeselect",
Line 1057... Line 1057...
1057
                                                theme: "mobile",
1057
                                                theme: "mobile",
1058
                                                toolbar: "undo redo | styleselect | bold italic underline forecolor | bullist numlist | outdent indent | table | fontsizeselect",
1058
                                                toolbar: "undo redo | styleselect | bold italic underline forecolor | bullist numlist | outdent indent | table | fontsizeselect",
1059
                                                plugins: "'.implode(' ', $mce_plugins).'"
1059
                                                plugins: "'.implode(' ', $mce_plugins).'"
1060
                                        }
1060
                                        }
1061
                                        '.($tinyMCELang == '' ? '' : ', language : "'.$tinyMCELang.'"').'
1061
                                        '.($tinyMCELang == '' ? '' : ', language : "'.$tinyMCELang.'"').'
1062
                                        '.($tinyMCELang == '' ? '' : ', language_url : "'.OIDplus::webpath().'vendor/tweeb/tinymce-i18n/langs/'.$tinyMCELang.'.js"').'
1062
                                        '.($tinyMCELang == '' ? '' : ', language_url : "'.OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE_CANONICAL).'vendor/tweeb/tinymce-i18n/langs/'.$tinyMCELang.'.js"').'
1063
                                });
1063
                                });
1064
 
1064
 
1065
                                pageChangeRequestCallbacks.push([OIDplusPagePublicObjects.cbQueryTinyMCE, "#'.$name.'"]);
1065
                                pageChangeRequestCallbacks.push([OIDplusPagePublicObjects.cbQueryTinyMCE, "#'.$name.'"]);
1066
                                pageChangeCallbacks.push([OIDplusPagePublicObjects.cbRemoveTinyMCE, "#'.$name.'"]);
1066
                                pageChangeCallbacks.push([OIDplusPagePublicObjects.cbRemoveTinyMCE, "#'.$name.'"]);
1067
                        </script>';
1067
                        </script>';