Changeset 1845

Show
Ignore:
Timestamp:
08/15/08 16:21:01 (3 months ago)
Author:
taher
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/ChangeLog

    r1842 r1845  
     12008-08-14  Taher Shihadeh <taher@unixwars.com> 
     2 
     3        * admin/PageVServers.py, admin/PageVServer.py, 
     4        admin/static/css/cherokee.css: addresses UI enhancement proposal 
     5        at http://code.google.com/p/cherokee/issues/detail?id=86. 
     6 
    172008-08-15  Alvaro Lopez Ortega  <alvaro@alobbs.com> 
    28 
    39        * admin/PageVServer.py (PageVServer._render_vserver_guts): Fixes 
    410        an unfortunate error. The administration interface fails to set 
    5         the security files (certificates and keys) because and previous 
     11        the security files (certificates and keys) because a previous 
    612        variable value messed up the property key. 
    713 
  • cherokee/trunk/admin/PageVServer.py

    r1842 r1845  
    5151        self._priorities_userdir = None 
    5252        self._rule_table         = 1 
    53          
     53 
    5454    def _op_handler (self, uri, post): 
    5555        assert (len(uri) > 1) 
     
    273273        txt += '<table id="%s" class="rulestable">' % (table_name) 
    274274        txt += '<tr NoDrag="1" NoDrop="1"><th>Target</th><th>Type</th><th>Handler</th><th>Auth</th><th>Final</th></tr>' 
    275              
     275 
    276276        # Rule list 
    277277        for prio in priorities: 
     
    280280            _type = conf.get_val('match') 
    281281            pre   = '%s!%s' % (cfg_key, prio) 
    282              
    283             # Try to load the rule plugin             
     282 
     283            # Try to load the rule plugin 
    284284            rule_module = module_obj_factory (_type, self._cfg, pre, self.submit_url) 
    285285            name        = rule_module.get_name() 
    286286            name_type   = rule_module.get_type_name() 
    287              
     287 
    288288            if _type != 'default': 
    289289                link     = '<a href="%s/prio/%s">%s</a>' % (url_prefix, prio, name) 
     
    312312 
    313313        txt += '</table>\n' 
    314         txt += '''<script type="text/javascript"> 
     314        txt += ''' 
     315                      <script type="text/javascript"> 
    315316                      $(document).ready(function() { 
    316317                        $("#%(name)s tr:even').addClass('alt')"); 
     
    324325                                post += 'update_prio=' + rows[i].id + ',' + prio + '&'; 
    325326                              } 
    326                               jQuery.post ('%(url)s', post,  
     327                              jQuery.post ('%(url)s', post, 
    327328                                  function (data, textStatus) { 
    328                                       window.location.reload();   
     329                                      window.location.reload(); 
    329330                                  } 
    330331                              ); 
     
    332333                        }); 
    333334                      }); 
     335 
     336                      $(document).ready(function(){ 
     337                        $("table.rulestable tr:odd").addClass("odd"); 
     338                      }); 
     339 
     340                      $(document).mouseup(function(){ 
     341                        $("table.rulestable tr:even").removeClass("odd"); 
     342                        $("table.rulestable tr:odd").addClass("odd"); 
     343                      }); 
    334344                      </script> 
    335                ''' % {'name':   table_name,  
     345               ''' % {'name':   table_name, 
    336346                      'url' :   self.submit_ajax_url, 
    337347                      'prefix': cfg_key} 
     
    374384                                  modules_available(LOGGERS), NOTE_LOGGERS) 
    375385        txt += self.Indent(str(table)) 
    376          
     386 
    377387        # Writers 
    378          
     388 
    379389        if format: 
    380390            writers = '' 
  • cherokee/trunk/admin/PageVServers.py

    r1750 r1845  
    129129            else: 
    130130                logging = 'no' 
    131                  
     131 
    132132            if nick != "default": 
    133133                js = "post_del_key('/ajax/update', 'vserver!%s');"%(prio) 
     
    140140 
    141141        txt += '</table>' 
    142         txt += '''<script type="text/javascript"> 
     142        txt += ''' 
     143                      <script type="text/javascript"> 
    143144                      $(document).ready(function() { 
    144145                        $("#%(name)s tr:even').addClass('alt')"); 
     
    151152                                post += rows[i].id + ','; 
    152153                              } 
    153                               jQuery.post ('%(url)s', post,  
     154                              jQuery.post ('%(url)s', post, 
    154155                                  function (data, textStatus) { 
    155                                       window.location.reload();   
     156                                      window.location.reload(); 
    156157                                  } 
    157158                              ); 
     
    159160                        }); 
    160161                      }); 
     162 
     163                      $(document).ready(function(){ 
     164                        $("table.rulestable tr:odd").addClass("odd"); 
     165                      }); 
     166 
     167                      $(document).mouseup(function(){ 
     168                        $("table.rulestable tr:even").removeClass("odd"); 
     169                        $("table.rulestable tr:odd").addClass("odd"); 
     170                      }); 
    161171                      </script> 
    162                ''' % {'name':   table_name,  
     172               ''' % {'name':   table_name, 
    163173                      'url' :   '/vserver/ajax_update'} 
    164174 
  • cherokee/trunk/admin/static/css/cherokee.css

    r1515 r1845  
    77 
    88.clearfix:after { 
    9     content: ".";  
    10     display: block;  
    11     height: 0;  
    12     clear: both;  
     9    content: "."; 
     10    display: block; 
     11    height: 0; 
     12    clear: both; 
    1313    visibility: hidden; 
    1414} 
     
    126126/** HELP **/ 
    127127#help-area { 
    128      
     128 
    129129} 
    130130 
     
    191191} 
    192192 
    193 .dialog-information h2,  
     193.dialog-information h2, 
    194194.dialog-warning h2, 
    195 .dialog-error h2  
     195.dialog-error h2 
    196196{ 
    197197    margin: 0 0 0.3em 0; 
     
    220220.tab dt:hover { 
    221221    background:#efefef url(../images/collapsed.gif) no-repeat scroll 0px 4px; 
    222 }       
    223            
     222} 
     223 
    224224.tab dt.selected:hover { 
    225     background:#efefef url(../images/expanded.gif) no-repeat scroll 0px 4px;  
    226 
    227                 
    228                 
     225    background:#efefef url(../images/expanded.gif) no-repeat scroll 0px 4px; 
     226
     227 
    229228a.button { 
    230229    background: transparent url('../images/button-right.png') no-repeat scroll top right; 
     
    250249    background-position: bottom right; 
    251250    color: #122c4d; 
    252     outline: none;  
     251    outline: none; 
    253252} 
    254253 
    255254a.button:active span { 
    256255    background-position: bottom left; 
    257     padding: 6px 0 4px 18px;  
     256    padding: 6px 0 4px 18px; 
    258257} 
    259258 
     
    299298 
    300299.tableprop .title { 
    301   font-weight: bold;   
     300  font-weight: bold; 
    302301} 
    303302 
     
    319318  font-weight: bold; 
    320319} 
     320 
     321/* Alternate row color in rule list */ 
     322table.rulestable tr.odd td { 
     323  background-color:#F4F7FB; 
     324}