Changeset 13119

Show
Ignore:
Timestamp:
10/26/07 21:59:27 (1 year ago)
Author:
flack
Message:

removed htmlarea

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/midcom/application.php

    r12985 r13119  
    105105 * @package midcom 
    106106 */ 
    107 class midcom_application  
     107class midcom_application 
    108108{ 
    109109    /** 
     
    301301     */ 
    302302    private $_jquery_enabled = false; 
    303      
     303 
    304304    private $_jquery_init_scripts = ''; 
    305      
     305 
    306306    /** 
    307307     * Array with all JQuery state scripts for the page's head. 
     
    419419 
    420420        $this->_status = MIDCOM_STATUS_PREPARE; 
    421          
     421 
    422422        // Load the services that are always needed, including the serviceloader 
    423423        $this->_load_core_services(); 
    424          
     424 
    425425        // Start-up some of the services 
    426426        $this->auth->initialize(); 
     
    483483        $this->style = new midcom_helper__styleloader(); 
    484484        $this->auth = new midcom_services_auth(); 
    485          
     485 
    486486        // These can be refactored behind serviceloader 
    487         $this->permalinks = new midcom_services_permalinks();     
     487        $this->permalinks = new midcom_services_permalinks(); 
    488488        $this->tmp = new midcom_services_tmp(); 
    489489        $this->toolbars = new midcom_services_toolbars(); 
     
    492492        $this->_services['rcs'] = new midcom_services_rcs($GLOBALS['midcom_config']); 
    493493    } 
    494      
     494 
    495495    /** 
    496496     * Load core DBA classes 
     
    544544     * @see midcom_application::_process() 
    545545     */ 
    546     public function codeinit()  
     546    public function codeinit() 
    547547    { 
    548548        if ($this->get_current_context() == 0) 
    549         {     
     549        { 
    550550            // Initialize the UI message stack from session 
    551551            $this->uimessages->initialize(); 
     
    555555        $this->_parser = $this->serviceloader->load('midcom_core_service_urlparser'); 
    556556        $this->_parser->parse($GLOBALS['midgard']->argv); 
    557          
    558         if (!$this->_parser)  
     557 
     558        if (!$this->_parser) 
    559559        { 
    560560            debug_push_class(__CLASS__, __FUNCTION__); 
     
    565565 
    566566        $this->_process(); 
    567          
     567 
    568568        if ($this->get_current_context() == 0) 
    569569        { 
     
    579579     * Style template, usually <(content)>. 
    580580     */ 
    581     public function content()  
    582     { 
    583  
    584  
    585  
    586         debug_push_class(__CLASS__, __FUNCTION__);     
     581    public function content() 
     582    { 
     583 
     584 
     585 
     586        debug_push_class(__CLASS__, __FUNCTION__); 
    587587 
    588588        // Enter Context 
     
    673673     * @return int                        The ID of the newly created context. 
    674674     */ 
    675     public function dynamic_load($url, $config = array(), $type = MIDCOM_REQUEST_CONTENT)  
     675    public function dynamic_load($url, $config = array(), $type = MIDCOM_REQUEST_CONTENT) 
    676676    { 
    677677        debug_push_class(__CLASS__, __FUNCTION__); 
     
    821821                        debug_add("Substyle '$substyle' selected", MIDCOM_LOG_INFO); 
    822822                        break; 
    823      
     823 
    824824                    case 'serveattachmentguid': 
    825825                    case 'serveattachment': 
     
    828828                            debug_add('Too many arguments remaining for serve_attachment.', MIDCOM_LOG_ERROR); 
    829829                        } 
    830                          
     830 
    831831                        debug_add("Trying to serve Attachment with GUID {$value}", MIDCOM_LOG_INFO); 
    832                          
     832 
    833833                        $attachment = new midcom_baseclasses_database_attachment($value); 
    834834                        if (   !$attachment 
     
    837837                            $this->generate_error(MIDCOM_ERRNOTFOUND, 'Failed to access attachment: ' . mgd_errstr()); 
    838838                        } 
    839                          
     839 
    840840                        if (!$attachment->can_do('midgard:autoserve_attachment')) 
    841841                        { 
    842842                            $this->generate_error(MIDCOM_ERRNOTFOUND, 'Failed to access attachment: Autoserving denied.'); 
    843843                        } 
    844                          
     844 
    845845                        $this->serve_attachment($attachment); 
    846846                        $this->finish(); 
    847847                        exit(); 
    848                          
     848 
    849849                    case 'permalink': 
    850850                        $guid = $value; 
     
    855855                            // This will exit; 
    856856                        } 
    857      
     857 
    858858                        // We use "302 Found" here so that search engines and others will keep using the PermaLink instead of the temporary 
    859859                        $this->header("Location: {$destination}", 302); 
    860860                        $this->finish(); 
    861861                        exit(); 
    862      
     862 
    863863                    case 'cache': 
    864864                        if ($value == 'invalidate') 
     
    880880                        $this->auth->logout(); 
    881881                        // This will exit; 
    882      
     882 
    883883                    case 'login': 
    884884                        // Value is ignored 
     
    902902                        $this->_showdebuglog($value); 
    903903                        break; 
    904      
     904 
    905905                    default: 
    906906                        debug_add("Unknown MidCOM URL Property ignored: {$key} => {$value}", MIDCOM_LOG_WARN); 
     
    913913        $this->_status = MIDCOM_STATUS_CANHANDLE; 
    914914 
    915         do  
     915        do 
    916916        { 
    917917            $object = $this->_parser->get_current_object(); 
     
    921921                $this->generate_error(MIDCOM_ERRCRIT, "Root node missing."); 
    922922            } 
    923              
     923 
    924924            if (is_a($object, 'midgard_attachment')) 
    925925            { 
     
    929929            $path = $object->component; 
    930930 
    931             if (!$path)  
     931            if (!$path) 
    932932            { 
    933933                debug_add("No component defined for this node.", MIDCOM_LOG_ERROR); 
     
    941941            // If so, execute it, if not, continue. 
    942942 
    943             if ($this->_can_handle($object))  
     943            if ($this->_can_handle($object)) 
    944944            { 
    945945                $this->_status = MIDCOM_STATUS_HANDLE; 
    946946 
    947947                $prefix = $this->_parser->get_url(); 
    948                  
     948 
    949949                // Initialize context 
    950950                $this->_context[$this->_currentcontext][MIDCOM_CONTEXT_ANCHORPREFIX] = $prefix; 
     
    983983 
    984984            /** 
    985              * Simple: if current context is not '0' we were called from another context.  
     985             * Simple: if current context is not '0' we were called from another context. 
    986986             * If so we should not break application now - just gracefully continue. 
    987987             */ 
    988              
    989             if ($this->get_current_context() == 0)  
     988 
     989            if ($this->get_current_context() == 0) 
    990990            { 
    991991                $this->generate_error(MIDCOM_ERRNOTFOUND, "This page is not available on this server."); 
     
    10521052            $this->generate_error(MIDCOM_ERRCRIT, "Unkown Request Type encountered:"  . $this->_context[$this->current_context][MIDCOM_CONTEXT_REQUESTTYPE]); 
    10531053        } 
    1054          
     1054 
    10551055        $handler =& $this->componentloader->get_interface_class($path); 
    10561056 
     
    10641064            // $this->generate_error($handler->errcode($this->_currentcontext), $handler->errstr($this->_currentcontext)); 
    10651065            $this->generate_error(MIDCOM_ERRCRIT, "Component $path failed to handle the request"); 
    1066              
     1066 
    10671067            // This will exit. 
    10681068        } 
     
    11401140            $this->generate_error(MIDCOM_ERRCRIT, "Unkown Request Type encountered:" . $this->_context[$this->current_context][MIDCOM_CONTEXT_REQUESTTYPE]); 
    11411141        } 
    1142          
     1142 
    11431143        // Get component interface class 
    11441144        $component_interface =& $this->componentloader->get_interface_class($path); 
    1145         if ($component_interface === null)  
     1145        if ($component_interface === null) 
    11461146        { 
    11471147            $path = 'midcom.core.nullcomponent'; 
     
    11671167            return false; 
    11681168        } 
    1169          
     1169 
    11701170        debug_add("Component {$path} in {$object->name} will handle request.", MIDCOM_LOG_INFO); 
    11711171        debug_pop(); 
     
    11841184     * @access private 
    11851185     */ 
    1186     private function & _loadconfig($object)  
     1186    private function & _loadconfig($object) 
    11871187    { 
    11881188        $path = $this->get_context_data(MIDCOM_CONTEXT_COMPONENT); 
     
    12261226            $this->generate_error(MIDCOM_ERRCRIT, "Unkown Request Type encountered:" . $this->_context[$this->current_context][MIDCOM_CONTEXT_REQUESTTYPE]); 
    12271227        } 
    1228          
     1228 
    12291229        $component =& $this->componentloader->get_interface_class($this->get_context_data(MIDCOM_CONTEXT_COMPONENT)); 
    12301230        $component->show_content($this->_currentcontext); 
     
    13781378     * @return midcom_helper__componentloader The reference of the component loader in use. 
    13791379     */ 
    1380     public function & get_component_loader ()  
     1380    public function & get_component_loader () 
    13811381    { 
    13821382        return $this->componentloader; 
     
    14501450            $key = $param2; 
    14511451        } 
    1452          
     1452 
    14531453        if (!is_array($this->_context)) 
    14541454        { 
     
    14921492     * @access private 
    14931493     */ 
    1494     function _set_context_data($value, $param1, $param2 = null)  
     1494    function _set_context_data($value, $param1, $param2 = null) 
    14951495    { 
    14961496        if (is_null($param2)) 
     
    18371837     * @param integer $response_code HTTP response code to send with the header 
    18381838     */ 
    1839     function header($header, $response_code = null)  
     1839    function header($header, $response_code = null) 
    18401840    { 
    18411841        $this->cache->content->register_sent_header($header); 
    1842          
     1842 
    18431843        if (!is_null($response_code)) 
    18441844        { 
     
    20332033                $code = 200; 
    20342034                break; 
    2035          
     2035 
    20362036            case MIDCOM_ERRNOTFOUND: 
    20372037                $header = "HTTP/1.0 404 Not Found"; 
     
    23022302        fpassthru($f); 
    23032303        $attachment->close(); 
    2304          
     2304 
    23052305        //$this->exit(); 
    23062306        exit(); 
     
    24172417    function add_jsfile($url, $prepend = false) 
    24182418    { 
    2419         // Adds an URL for a <script type="text/javascript" src="htmlarea.js"></script> 
     2419        // Adds an URL for a <script type="text/javascript" src="tinymce.js"></script> 
    24202420        // like call. $url is inserted into src. Duplicates are omitted. 
    24212421        if (! in_array($url, $this->_jsfiles)) 
     
    24672467        if ($prepend) 
    24682468        { 
    2469             $this->_prepend_jshead[] = $js_call;             
     2469            $this->_prepend_jshead[] = $js_call; 
    24702470        } 
    24712471        else 
     
    25792579            return false; 
    25802580        } 
    2581          
     2581 
    25822582        if (!array_key_exists('href', $attributes)) 
    25832583        { 
    25842584            return false; 
    25852585        } 
    2586          
     2586 
    25872587        // Register each URL only once 
    25882588        if (in_array($attributes['href'], $this->_linkhrefs)) 
     
    25912591        } 
    25922592        $this->_linkhrefs[] = $attributes['href']; 
    2593          
     2593 
    25942594        $output = ''; 
    2595          
     2595 
    25962596        if (array_key_exists('condition', $attributes)) 
    25972597        { 
    25982598            $this->_link_head .= "<!--[if {$attributes['condition']}]>\n"; 
    25992599        } 
    2600          
     2600 
    26012601        foreach ($attributes as $key => $val) 
    26022602        { 
    26032603            if ($key != 'conditions') 
    26042604            { 
    2605                 $output .= " {$key}=\"{$val}\" ";                 
     2605                $output .= " {$key}=\"{$val}\" "; 
    26062606            } 
    26072607        } 
     
    27132713            echo $this->_jquery_init_scripts; 
    27142714        } 
    2715          
     2715 
    27162716        if (!empty($this->_prepend_jshead)) 
    27172717        { 
     
    27192719            { 
    27202720                echo $js_call; 
    2721             }            
    2722         } 
    2723          
     2721            } 
     2722        } 
     2723 
    27242724        echo $this->_link_head; 
    27252725        echo $this->_object_head; 
     
    27452745            return; 
    27462746        } 
    2747          
     2747 
    27482748        $url = MIDCOM_STATIC_URL . "/jQuery/jquery-{$version}.js"; 
    27492749        $this->_jquery_init_scripts = '<script type="text/javascript" src="' . $url . '"></script>' . "\n"; 
    2750          
     2750 
    27512751        $script = 'var $j = jQuery.noConflict();'."\n"; 
    27522752        $script .= "var MIDCOM_STATIC_URL = '" . MIDCOM_STATIC_URL . "';\n"; 
     
    27562756        $this->_jquery_init_scripts .= trim($script) . "\n"; 
    27572757        $this->_jquery_init_scripts .= "</script>\n"; 
    2758      
     2758 
    27592759        $this->_jquery_enabled = true; 
    27602760    } 
     
    27762776            return; 
    27772777        } 
    2778          
     2778 
    27792779        echo '<script type="text/javascript">' . "\n"; 
    2780          
     2780 
    27812781        foreach ($this->_jquery_states as $status => $scripts) 
    27822782        { 
     
    27862786            echo "\n" . '$j(' . $status_target . ').' . $status_method . '(function() {'."\n"; 
    27872787            echo $scripts; 
    2788             echo "\n" . '});' . "\n";            
     2788            echo "\n" . '});' . "\n"; 
    27892789        } 
    27902790 
     
    29152915        $view_toolbar =& $this->toolbars->get_view_toolbar($this->_currentcontext); 
    29162916        $view_toolbar->bind_to($object); 
    2917          
     2917 
    29182918        // Bind the object to the metadata service 
    29192919        $this->metadata->bind_metadata_to_object(MIDCOM_METADATA_VIEW, $object, $this->_currentcontext); 
    29202920        $this->metadata->set_page_class($page_class, $this->_currentcontext); 
    2921          
     2921 
    29222922        $this->substyle_append($page_class); 
    29232923    } 
  • trunk/midcom/midcom.helper.datamanager/datamanager.php

    r12014 r13119  
    257257 * bulk uploads. 
    258258 * 
    259  * 
    260  * <b>Copyright references:</b> 
    261  * 
    262  * HTMLAREA, copyright (c) 2002-2004, 
    263  * interactivetools.com, inc. 
    264  * HTMLAREA is available under a BSD-derived license. More information 
    265  * at http://www.interactivetools.com/products/htmlarea/license.html 
    266  * 
    267  * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze" 
    268  * Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/ 
    269  * 
    270  * Details and latest version at: 
    271  * http://dynarch.com/mishoo/calendar.epl 
    272  * 
    273  * This script is distributed under the GNU Lesser General Public License. 
    274  * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html 
    275259 * 
    276260 * @package midcom.helper.datamanager 
  • trunk/midcom/midcom.helper.datamanager/static/columned.css

    r4138 r13119  
    4646 
    4747/* Normal content entry */ 
    48 div.form_viewfield, form.datamanager input.shorttext, form.datamanager textarea, form.datamanager select, form.datamanager input.fileselector, form.datamanager .htmlarea, form.datamanager span.mceEditorContainer 
     48div.form_viewfield, form.datamanager input.shorttext, form.datamanager textarea, form.datamanager select, form.datamanager input.fileselector, form.datamanager span.mceEditorContainer 
    4949{ 
    5050    font-size: 1.15em; 
     
    5757{ 
    5858    width: 20%; 
    59 } 
    60 form.datamanager .htmlarea 
    61 { 
    62     margin-left: 10%; 
    6359} 
    6460form.datamanager textarea.longtext 
  • trunk/midcom/midcom.helper.datamanager/static/datamanager.css

    r3285 r13119  
    1313 
    1414@import "../midcom.helper.datamanager/jscript-calendar/jscalendar.css"; 
    15 @import "../midcom.helper.datamanager/htmlarea/htmlarea.css"; 
    16  
    1715 
    1816form.datamanager label  
  • trunk/support/clean_files.php

    r4797 r13119  
    3939        '/config\.inc$/', 
    4040        // skip 3rd party DM1/2 plugins 
    41         '#/static/(tinymce|jscript-calendar|tiny_mce|htmlarea|communityhtml)/#', 
     41        '#/static/(tinymce|jscript-calendar|tiny_mce|communityhtml)/#', 
    4242    ); 
    4343 
     
    7171        return preg_replace("/[ \t]+$/m", '', $data); 
    7272    } 
    73      
     73 
    7474    function walk_dir($dir) 
    7575    { 
     
    9797                } 
    9898            } 
    99              
     99 
    100100            echo "processing {$path}\n"; 
    101101            if (!is_readable($path))