Show
Ignore:
Timestamp:
03/19/08 18:48:30 (10 months ago)
Author:
coderanger
Message:

Working on getting the theme picker to work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • themeengineplugin/0.11/setup.py

    r3366 r3402  
    2727            'themeengine.api = themeengine.api', 
    2828            'themeengine.admin = themeengine.admin', 
    29         ] 
     29        ], 
    3030    }, 
    3131) 
  • themeengineplugin/0.11/themeengine/admin.py

    r3364 r3402  
    2222    def get_admin_panels(self, req): 
    2323        if req.perm.has_permission('THEME_ADMIN'): 
    24             yield 'general', 'General', 'theme', 'Theme' 
     24            yield 'theme', 'Theme', 'simple', 'Simple' 
     25            yield 'theme', 'Theme', 'advanced', 'Advanced' 
    2526 
    2627    def render_admin_panel(self, req, cat, page, path_info): 
     28        if req.method == 'POST': 
     29            self.config.set('theme', 'theme', req.args['theme']) 
     30            self.config.save() 
     31             
     32            req.redirect(req.href.admin(cat, page))  
     33         
    2734        data = { 
    2835            'themeengine': { 
  • themeengineplugin/0.11/themeengine/htdocs/skins/tango/skin.css

    r3364 r3402  
    66 
    77.jcarousel-skin-tango.jcarousel-container-horizontal { 
    8     width: 640px; 
     8    width: 420px; 
    99    padding: 20px 40px; 
    1010} 
     
    1717 
    1818.jcarousel-skin-tango .jcarousel-clip-horizontal { 
    19     width:  640px; 
    20     height: 400px; 
     19    width:  420px; 
     20    height: 240px; 
    2121} 
    2222 
     
    2727 
    2828.jcarousel-skin-tango .jcarousel-item { 
    29     width: 640px; 
    30     height: 400px; 
     29    width: 420px; 
     30    height: 240px; 
    3131} 
    3232 
  • themeengineplugin/0.11/themeengine/templates/admin_theme.html

    r3364 r3402  
    1919        <h2>Theme</h2> 
    2020         
    21         <div id="carousel"><!-- 
     21        <div id="carousel"><!--! 
    2222         <img src="${href.chrome('themeengine', 'img', 'prev.gif')}" border="0" class="jcarousel-prev" /> 
    2323         <img src="${href.chrome('themeengine', 'img', 'next.gif')}" border="0" class="jcarousel-next" />--> 
    2424         <ul id="foo" class="jcarousel-skin-tango"> 
    2525          <li py:for="name, theme in themeengine.info.iteritems()"> 
    26             <img height="400" width="640" src="${href.themeengine('screenshot', name)}" id="$name" /> 
     26            <img height="240" width="420" src="${href.themeengine('screenshot', name)}" id="${name}_theme" /> 
    2727          </li> 
    2828         </ul> 
     
    4444 
    4545          function change_handler(car, elm, ind, state) { 
    46               var theme = $(elm).find('img').attr('id'); 
    47               $('#theme_name').html(theme); 
    48               $('#form_theme_name').val(theme); 
    49               $('#theme_desc').html(descriptions[theme]); 
     46              console.log(elm.getAttribute('id')); 
     47              var theme = jQuery(elm).find('img').attr('id'); 
     48              theme = theme.substr(0, theme.length-6); 
     49              jQuery('#theme_name').html(theme); 
     50              jQuery('#form_theme_name').val(theme); 
     51              jQuery('#theme_desc').html(descriptions[theme] || ''); 
    5052          } 
    51  
    52           $(function() { 
    53               $('#foo').jcarousel({ 
     53         
     54          jQuery(function() { 
     55              jQuery('#foo').jcarousel({ 
    5456                  start: $themeengine.current_index, 
    5557                  visible: 1,