Changeset 2755 in products


Ignore:
Timestamp:
Aug 17, 2010 12:39:41 PM (9 years ago)
Author:
fenix
Message:
  • added tests;
  • fixed style bug (None class was added when no portlet style is selected);
  • removed trailing characters;
  • removed unnecessary pice of code;
  • some javascript optimizations;
Location:
quintagroup.portlet.collection/trunk/quintagroup/portlet/collection
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.portlet.collection/trunk/quintagroup/portlet/collection/browser/resources/batch.js

    r2749 r2755  
    1818 
    1919    var bind_prev_handler = function(link, index){ 
    20       if (index == 0) { 
    21         jq(link).hide(); 
    22       } 
     20      if (index == 0) jq(link).hide(); 
    2321      jq(link).unbind(); 
    2422      jq(link).click(function(e) { 
     
    3331    }; 
    3432    var bind_next_handler = function(link, index){ 
    35       if (index == nav_links.size()-1) { 
    36         jq(link).hide(); 
    37       } 
     33      if (index == nav_links.size()-1) jq(link).hide(); 
    3834      jq(link).unbind(); 
    3935      jq(link).click(function(e) { 
  • quintagroup.portlet.collection/trunk/quintagroup/portlet/collection/collection.pt

    r2740 r2755  
    33    tal:define="collection_url view/collection_url; 
    44                styling view/data/styling" 
    5     tal:attributes="class string:${attrs/class} ${styling}"> 
     5    tal:attributes="class python: styling and '%s %s'% (attrs['class'], styling) or attrs['class']"> 
    66 
    77    <dt class="portletHeader"> 
  • quintagroup.portlet.collection/trunk/quintagroup/portlet/collection/vocabularies.py

    r1572 r2755  
    2121    implements(IVocabularyFactory) 
    2222 
    23      
     23 
    2424    def __call__(self, context): 
    2525        styles = getStylesVocabulary(context) 
     
    3434                value = value.decode(charset) 
    3535            items.append(SimpleTerm(value, value, _(title))) 
    36         return SimpleVocabulary(items) 
    37  
    38         items = [SimpleTerm(value, value, title) for value, title in PORTLET_CSS_STYLES] 
    3936        return SimpleVocabulary(items) 
    4037 
Note: See TracChangeset for help on using the changeset viewer.