Changeset 1380

Show
Ignore:
Timestamp:
11/29/08 06:06:00 (6 weeks ago)
Author:
MattRead
Message:

plugin:unbuttonadmin OMG! MWAHAHAH! the hack of the day right here.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/unbuttonadmin/trunk/unbuttonadmin.plugin.php

    r1374 r1380  
    1616    public function action_admin_header( $theme ) 
    1717    { 
     18        // This is such a hack it's not even funny 
     19        // But I am laughing inside. Laughing in a bad way. 
     20        Stack::remove('admin_stylesheet', 'admin'); 
     21        $css = file_get_contents(Site::get_dir('admin_theme') . '/css/admin.css'); 
     22        $css = preg_replace( 
     23            '@#page input\[type=button\], #page input\[type=submit\], #page button {([^}]+)}@', 
     24            '', 
     25            $css, 
     26            1 
     27        ); 
     28        $css = preg_replace( 
     29            '@#page input\[type=button\]:hover, #page input\[type=submit\]:hover, #page button:hover {([^}]+)}@', 
     30            '', 
     31            $css, 
     32            1 
     33        ); 
    1834        Stack::add( 
    1935            'admin_stylesheet', 
    2036            array( 
    21                 ' 
    22                 #page input[type=button], #page input[type=submit], #page button {  
    23                     padding: inherit;  
    24                     cursor: inherit;  
    25                     -webkit-border-radius: 0;     /* Webkit only supports up to 9px at present */  
    26                     -moz-border-radius: 0;  
    27                     font-size: inherit;  
    28                     background: inherit;  
    29                     border: inherit;  
    30                 }  
    31                   
    32                 #page input[type=button]:hover, #page input[type=submit]:hover, #page button:hover {  
    33                     background: inherit;  
    34                     border: inherit;  
    35                 } 
    36                 ', 
     37                $css, 
    3738                'screen' 
    3839            ), 
    39             'unbuttonadmin', 
    40             'admin' 
     40            'admin', 
     41            'jquery' 
    4142        ); 
    4243    }