Changeset 3628 in products


Ignore:
Timestamp:
Feb 13, 2013 10:47:21 AM (11 years ago)
Author:
kroman0
Message:

Fixed html validation of mobile layout, Cleanup templates

Location:
quintagroup.dropdownmenu/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.dropdownmenu/trunk/docs/HISTORY.txt

    r3627 r3628  
    99 
    1010* Fixed empty class attributes [kroman0] 
     11 
     12* Fixed html validation of mobile layout [kroman0] 
     13 
     14* Cleanup templates [kroman0] 
    1115 
    12161.2.11 - August 10,2012 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/templates/sections.pt

    r3627 r3628  
    11<tal:tabs tal:define="menu view/createMenu" 
    22          tal:condition="menu" 
    3           i18n:domain="plone"> 
    4     <p class="hiddenStructure" i18n:translate="heading_sections">Navigation</p> 
    5     <ul id="portal-globalnav" tal:attributes="class python:view.conf.mobile_menu and 'mobileMenuOn' or nothing"> 
    6         <li tal:replace="structure menu"> 
    7             DropDown Menu 
    8         </li> 
    9     </ul> 
    10     <select id="portal-globalnav-mobile" 
    11             tal:condition="view/conf/mobile_menu" 
    12             tal:content="structure view/createMenuMobile" 
    13             onchange="location = this.options[this.selectedIndex].value;"> 
    14         <option value="" selected="selected">Menu</option> 
    15     </select> 
    16 </tal:tabs> 
     3          i18n:domain="plone" 
     4    ><p class="hiddenStructure" 
     5        i18n:translate="heading_sections" 
     6        >Navigation</p 
     7    ><ul id="portal-globalnav" 
     8         tal:attributes="class python:view.conf.mobile_menu and 'mobileMenuOn' or nothing" 
     9        ><li tal:replace="structure menu" 
     10            >DropDown Menu</li 
     11        ></ul 
     12    ><select id="portal-globalnav-mobile" 
     13             tal:condition="view/conf/mobile_menu" 
     14             tal:content="structure view/createMenuMobile" 
     15             onchange="location = this.options[this.selectedIndex].value;" 
     16        ><option value="" selected="selected" 
     17            >Menu</option 
     18        ></select 
     19    ></tal:tabs> 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/templates/sections_mobile.pt

    r3491 r3628  
    22                    children options/children | nothing; 
    33                    plonefour view/is_plone_four" 
    4             i18n:domain="plone"> 
    5  
    6 <metal:main define-macro="sections_main"> 
    7 <tal:navitem repeat="node children"> 
    8 <tal:option tal:define="show_children   node/show_children; 
    9                         children        node/children; 
    10                         item_url        node/getURL; 
    11                         is_current      node/currentItem;"> 
    12     <option tal:attributes="value python:item_url; 
    13                             title node/Description;" 
    14             tal:condition="not:is_current" 
    15             ><span tal:repeat="l python:range(level-2)">&nbsp;&nbsp;</span><span tal:condition="python:level>1">&minus;&nbsp;</span><span tal:content="node/Title">Selected Item Title</span></option> 
    16     <option tal:attributes="value python:item_url; 
    17                             title node/Description;" 
    18             selected="selected" 
    19             tal:condition="is_current" 
    20             ><span tal:repeat="l python:range(level-2)">&nbsp;&nbsp;</span><span tal:condition="python:level>1">&minus;&nbsp;</span><span tal:content="node/Title">Selected Item Title</span></option> 
    21     <option tal:condition="python: len(children) > 0 and show_children" tal:replace="structure python:view.mobile(children=children, level=level+1)">SubMenu</option> 
    22 </tal:option> 
    23 </tal:navitem> 
    24 </metal:main> 
    25 </tal:master> 
     4            i18n:domain="plone" 
     5    ><metal:main define-macro="sections_main" 
     6        ><tal:navitem repeat="node children" 
     7            ><tal:option tal:define="show_children   node/show_children; 
     8                                     children        node/children; 
     9                                     item_url        node/getURL; 
     10                                     is_current      node/currentItem;" 
     11                ><option tal:attributes="value python:item_url; 
     12                                         title node/Description;" 
     13                         tal:condition="not:is_current" 
     14                    ><tal:span tal:repeat="l python:range(level-2)" 
     15                        >&nbsp;&nbsp;</tal:span 
     16                    ><tal:span tal:condition="python:level>1" 
     17                        >&minus;&nbsp;</tal:span 
     18                    ><tal:span tal:content="node/Title" 
     19                        >Selected Item Title</tal:span 
     20                ></option 
     21            ><option tal:attributes="value python:item_url; 
     22                                     title node/Description;" 
     23                     selected="selected" 
     24                     tal:condition="is_current" 
     25                ><tal:span tal:repeat="l python:range(level-2)" 
     26                    >&nbsp;&nbsp;</tal:span 
     27                ><tal:span tal:condition="python:level>1" 
     28                    >&minus;&nbsp;</tal:span 
     29                ><tal:span tal:content="node/Title" 
     30                    >Selected Item Title</tal:span 
     31                ></option 
     32            ><option tal:condition="python: len(children) > 0 and show_children" 
     33                     tal:replace="structure python:view.mobile(children=children, level=level+1)" 
     34                >SubMenu</option 
     35            ></tal:option 
     36        ></tal:navitem 
     37    ></metal:main 
     38></tal:master> 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/templates/sections_recurse.pt

    r3627 r3628  
    22                    children options/children | nothing; 
    33                    plonefour view/is_plone_four" 
    4             i18n:domain="plone"> 
    5  
    6 <metal:main define-macro="sections_main"> 
    7 <tal:navitem repeat="node children"> 
    8 <li tal:define="is_current      node/currentItem; 
    9                 is_in_path      node/currentParent; 
    10                 li_curr_class   python:is_current and 'selected' or ''; 
    11                 li_extr_class   python:(is_in_path and not is_current) and 'selected' or ''; 
    12                 li_extr_class   python:(not (is_in_path or is_current)) and li_extr_class + 'plain' or li_extr_class; 
    13                 li_class string:${li_curr_class}${li_extr_class}; 
    14                 li_class python:li_class or nothing" 
    15     tal:attributes="class li_class"> 
    16  
    17     <tal:level define="show_children node/show_children; 
    18                        children node/children; 
    19                        show_icons view/conf/show_icons; 
    20                        item_icon node/item_icon; 
    21                        item_type node/normalized_portal_type | nothing; 
    22                        a_class python:children and 'hasChildrens' or nothing"> 
    23  
    24     <a tal:attributes="href node/getURL; 
    25                        title node/Description|nothing; 
    26                        class a_class"> 
    27         <img tal:condition="python: show_icons and not plonefour" 
    28              tal:replace="structure item_icon/html_tag | nothing" /> 
    29         <span tal:content="node/Title" 
    30               tal:attributes="class python: plonefour and show_icons and item_type and 'contenttype-'+ item_type or nothing">Selected Item Title</span> 
    31     </a> 
    32  
    33     <ul tal:attributes="class python:'globalSectionsLevel'+str(level)" 
    34         tal:condition="python: len(children) > 0 and show_children"> 
    35         <li tal:replace="structure python:view.recurse(children=children, level=level+1)"> 
    36             SubMenu 
    37         </li> 
    38     </ul> 
    39     </tal:level> 
    40  
    41 </li> 
    42 </tal:navitem> 
    43 </metal:main> 
    44 </tal:master> 
     4            i18n:domain="plone" 
     5    ><metal:main define-macro="sections_main" 
     6        ><tal:navitem repeat="node children" 
     7            ><li tal:define="is_current      node/currentItem; 
     8                             is_in_path      node/currentParent; 
     9                             li_curr_class   python:is_current and 'selected' or ''; 
     10                             li_extr_class   python:(is_in_path and not is_current) and 'selected' or ''; 
     11                             li_extr_class   python:(not (is_in_path or is_current)) and li_extr_class + 'plain' or li_extr_class; 
     12                             li_class string:${li_curr_class}${li_extr_class}; 
     13                             li_class python:li_class or nothing" 
     14                 tal:attributes="class li_class" 
     15                ><tal:level define="show_children node/show_children; 
     16                            children node/children; 
     17                            show_icons view/conf/show_icons; 
     18                            item_icon node/item_icon; 
     19                            item_type node/normalized_portal_type | nothing; 
     20                            a_class python:children and 'hasChildrens' or nothing" 
     21                    ><a tal:attributes="href node/getURL; 
     22                                        title node/Description|nothing; 
     23                                        class a_class" 
     24                        ><img tal:condition="python: show_icons and not plonefour" 
     25                              tal:replace="structure item_icon/html_tag | nothing" 
     26                        /><span tal:content="node/Title" 
     27                                tal:attributes="class python: plonefour and show_icons and item_type and 'contenttype-'+ item_type or nothing" 
     28                            >Selected Item Title</span 
     29                    ></a 
     30                ><ul tal:attributes="class python:'globalSectionsLevel'+str(level)" 
     31                       tal:condition="python: len(children) > 0 and show_children" 
     32                    ><li tal:replace="structure python:view.recurse(children=children, level=level+1)" 
     33                        >SubMenu</li 
     34                    ></ul 
     35                ></tal:level 
     36            ></li 
     37        ></tal:navitem 
     38    ></metal:main 
     39></tal:master> 
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/viewlets.py

    r3514 r3628  
    258258    def createMenuMobile(self): 
    259259        html = self.mobile(children=self.portal_tabs(), level=1) 
    260         return xhtmlslimmer.compress(html).strip('\n') 
     260        return xhtmlslimmer.compress(html).strip(' \n') 
    261261 
    262262    @dropdowncache 
    263263    def createMenu(self): 
    264264        html = self.recurse(children=self.portal_tabs(), level=1) 
    265         return xhtmlslimmer.compress(html).strip('\n') 
     265        return xhtmlslimmer.compress(html).strip(' \n') 
    266266 
    267267    @memoize 
Note: See TracChangeset for help on using the changeset viewer.