Changeset 3065 for trunk


Ignore:
Timestamp:
10/28/10 14:36:10 (9 years ago)
Author:
jukka
Message:

Fixing stylesheets for edit pages.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LearningResource.py

    r3052 r3065  
    133133            also anything that has no history past the author's changes in ten minutes. """ 
    134134        if self.isJustCreated(): 
     135            return True 
     136        history=self.getHistory() 
     137        if not history: 
    135138            return True 
    136139        summary=history[0].get('_summary','') 
  • trunk/Schemata.py

    r3061 r3065  
    138138                label='Rights', 
    139139                label_msgid='label_rights', 
    140                 i18n_domain="lemill" 
     140                i18n_domain="lemill", 
     141                use_label=0 
    141142           ), 
    142143       ), 
  • trunk/skins/lemill/field.pt

    r2782 r3065  
    1010 
    1111    <!-- Base Field Widgets --> 
    12     <metal:base_view_macro 
    13         define-macro="base_view" 
    14         tal:define="widget_view python:here.widget(field.getName(), mode=mode, use_label=1); 
     12    <metal:base_view_macro define-macro="base_view" tal:define="widget_view python:here.widget(field.getName(), mode=mode, use_label=1); 
    1513                    field_macros here/widgets/field/macros; 
    16                     label_macro view_macros/label | label_macro | field_macros/label; 
    1714                    data_macro view_macros/data | data_macro | field_macros/data; 
    1815                    visState python:widget.isVisible(here, mode); 
     
    2421            condition="python:'view' in widget.modes and 'r' in field.mode and field.checkPermission('r',here)"> 
    2522          <tal:if_use_label condition="use_label | nothing"> 
    26             <metal:use_label use-macro="label_macro" /> 
     23              <label class="field_title"><span i18n:translate="" tal:content="python:widget.Label(here)">Field</span>:</label> 
    2724          </tal:if_use_label> 
    2825          <metal:use_data use-macro="data_macro|default" /> 
     
    3027      </tal:condition> 
    3128    </metal:base_view_macro> 
    32  
    33     <metal:label_macro define-macro="label"> 
    34       <label><span i18n:translate="" tal:content="python:widget.Label(here)">Field</span>:</label> 
    35       <br /> 
    36     </metal:label_macro> 
    3729 
    3830    <metal:data_macro define-macro="data"> 
     
    6557                             id python: 'archetypes-fieldname-' + field.getName()"> 
    6658          <span metal:define-slot="widget_body_label_prefix"></span> 
    67  
    6859          <div class="translatedText"  
    6960              tal:condition="python: translation and not copied_in_translation"> 
    70               <label i18n:translate="original_label"> 
     61              <label class="field_title" i18n:translate="original_label"> 
    7162              Original  
    7263                     <span i18n:name="field_label" tal:replace="python:widget.Label(here).lower()" /> 
     
    7667              </div> 
    7768          </div> 
    78  
    79  
    80           <label i18n:translate="" 
     69          <label class="field_title" i18n:translate="" 
    8170                 tal:content="python:widget.Label(here)" 
    8271                 tal:attributes="for python:field.getName()"> 
     
    10493        </div> 
    10594      </tal:condition> 
    106  
    10795      <tal:condition condition="python: visState == 'hidden'"> 
    10896        <metal:hiddenmacro 
  • trunk/skins/lemill/form_template.pt

    r2873 r3065  
    99  <head><metal:block metal:use-macro="here/header/macros/html_header" /><metal:block metal:define-slot="css_slot" /><metal:block metal:define-slot="javascript_head_slot" /></head> 
    1010  <body dir='ltr' tal:define="section_name here/getSectionFromURL;" tal:attributes="class section_name;"> 
    11 <table id="tb-portal-header" summary="Header" width="760" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: 25px;"> 
    12     <tr> 
    13         <td width="200" class="logo"><img tal:attributes="src string:${portal_url}/images/logo_${section_name}.png" alt="" /></td> 
    14         <td width="560">&nbsp;</td> 
    15     </tr> 
    16 </table> 
    17 <table id="tb-portal-columns" summary="Main content" width="760"  border="0" align="center" cellpadding="0" cellspacing="0"> 
    18     <tr> 
    19         <td id="tb-portal-column-content" tal:define="tabindex python:Iterator(pos=0)" width="760" valign="top"> 
    20               <metal:block define-slot="content"> <tal:block 
    21                      metal:define-macro="content" 
    22                      tal:define="show_border python:0;"> 
    23                     <div metal:use-macro="here/global_statusmessage/macros/portal_message" /> 
    24                     <metal:bodytext metal:define-slot="main" tal:content="nothing" /> 
    25                </tal:block></metal:block> 
    26         </td> 
    27     </tr> 
    28 </table> 
     11 
     12<div class="portlets grid"> 
     13</div> 
     14 
     15<div class="main grid"> 
     16<div class="logo grid" style="margin-left:0"><img tal:attributes="src python:'%s/images/logo_%s.png' % (portal_url, section_name or 'content')" alt="" /></div> 
     17 
     18<div class="clear"></div> 
     19 
     20    <div metal:use-macro="here/global_statusmessage/macros/portal_message"/> 
     21    <metal:bodytext metal:define-slot="main" tal:content="nothing" /> 
     22</div> 
     23<div class="clear" height="24px"></div>  
    2924 
    3025</body> 
  • trunk/skins/lemill/lemill_community_view.pt

    r3063 r3065  
    2727 
    2828  <div class="browse_links grid" tal:define="lang_filter context/getLanguageFilter"> 
    29     <div class="column-left"> 
     29    <div class="column-left" tal:define="people_results python: here.portal_catalog.browsingSearch(REQUEST=request, type='MemberFolder');"> 
    3030    <h1 i18n:translate="heading_people">People</h1> 
    3131    <dl> 
    3232        <dt><a i18n:translate="label_languages" href="cloud?base=language&amp;type=MemberFolder">Languages</a></dt> 
    33         <dd><span tal:repeat="result context/top3people_languages | nothing"> 
    34             <a href="" tal:attributes="href python:'browse?language=%s' % here.url_quote(result)" tal:content="python:here.script_getPrettyLanguage(result)">PLACEHOLDER</a>, </span><a href="rebuildTop3s" tal:condition="context/amIManager">( rebuild top results )</a><a href="cloud?base=language&amp;type=MemberFolder">...</a> 
     33        <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(people_results,'getLanguage_skills', 'browse?type=MemberFolder&amp;language=')"> 
     34            <a href="" tal:attributes="href python:result[1]" tal:content="python:here.script_getPrettyLanguage(result[0])">PLACEHOLDER</a>, </span><a href="cloud?base=language&amp;type=MemberFolder">...</a> 
    3535        </dd> 
    3636        <dt><a i18n:translate="label_country" href="" tal:attributes="href string:cloud?type=MemberFolder&amp;base=country">Country</a></dt> 
    37         <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(results,'getLocation_country', 'browse?type=MemberFolder&amp;country=')"> 
     37        <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(people_results,'getLocation_country', 'browse?type=MemberFolder&amp;country=')"> 
    3838                <a href="" tal:attributes="href python:result[1]" tal:content="python:result[0]" i18n:translate="">PLACEHOLDER</a>, 
    3939            </span><a href="" tal:attributes="href string:cloud?type=MemberFolder&amp;base=country">...</a> 
    4040        </dd> 
    4141        <dt><a i18n:translate="label_subject_areas" href="" tal:attributes="href string:cloud?type=MemberFolder&amp;base=subject_area">Subject areas</a></dt> 
    42         <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(results,'getSubject_area', 'browse?type=MemberFolder&amp;subject_area=')"> 
     42        <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(people_results,'getSubject_area', 'browse?type=MemberFolder&amp;subject_area=')"> 
    4343                <a href="" tal:attributes="href python:result[1]" tal:content="python:result[0]" i18n:translate="">PLACEHOLDER</a>, 
    4444            </span><a href="" tal:attributes="href string:cloud?type=MemberFolder&amp;base=subject_area">...</a> 
     
    4747    </dl> 
    4848    </div> 
    49     <div class="column-right"> 
     49    <div class="column-right" tal:define="group_results python: here.portal_catalog.browsingSearch(REQUEST=request, type='GroupBlog');"> 
    5050    <h1 i18n:translate="heading_groups">Groups</h1> 
    5151    <dl> 
    5252        <dt><a i18n:translate="label_languages" href="cloud?base=language&amp;type=GroupBlog">Languages</a></dt> 
    53         <dd><span tal:repeat="result context/top3group_languages | nothing"> 
    54             <a href="" tal:attributes="href python:'browse?type=GroupBlog&amp;language=%s' % here.url_quote(result)" tal:content="python:here.script_getPrettyLanguage(result)">PLACEHOLDER</a>, </span><a href="rebuildTop3s" tal:condition="context/amIManager">( rebuild top results )</a><a href="cloud?base=language&amp;type=GroupBlog">...</a> 
     53        <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(group_results,'getLanguage_skills', 'browse?type=GroupBlog&amp;language=', cache_key='group_languages')"> 
     54            <a href="" tal:attributes="href python:result[1]" tal:content="python:here.script_getPrettyLanguage(result[0])">PLACEHOLDER</a>, </span><a href="cloud?base=language&amp;type=GroupBlog">...</a> 
    5555        </dd> 
    5656        <dt><a i18n:translate="label_subject_areas" href="" tal:attributes="href string:cloud?type=GroupBlog&amp;base=subject_area">Subject areas</a></dt> 
    57         <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(results,'getSubject_area', 'browse?type=GroupBlog&amp;subject_area=', cache_key='group_subjects')"> 
     57        <dd><span tal:repeat="result python:context.portal_catalog.getTopFive(group_results,'getSubject_area', 'browse?type=GroupBlog&amp;subject_area=', cache_key='group_subjects')"> 
    5858                <a href="" tal:attributes="href python:result[1]" tal:content="python:result[0]" i18n:translate="">PLACEHOLDER</a>, 
    5959            </span><a href="" tal:attributes="href string:cloud?type=GroupBlog&amp;base=subject_area">...</a> 
  • trunk/skins/lemill/lemill_grid.css

    r3057 r3065  
    2424} 
    2525 
    26 input[type="text"] { 
    27     font-size: 13px; 
    28 } 
    2926 
    3027ul { 
     
    547544} 
    548545 
     546 
     547/* General editing */ 
     548 
     549input[type="text"], textarea { 
     550    font-size: 13px; 
     551    border: 1px solid #8cacbb;     
     552} 
     553 
     554.fieldRequired { 
     555    background: url(images/required.gif) center left no-repeat; 
     556    padding: 0 0 0 8px; 
     557    color: White; 
     558} 
     559 
     560.formHelp { 
     561    font-size: 11px; 
     562    color: #76797c; 
     563    margin: 0 0 0.2em 0; 
     564} 
     565 
     566div.formControls { 
     567    margin-top: 1em; 
     568    } 
     569 
     570div.field { 
     571    margin-top: 1em; 
     572    }  
     573 
     574#archetypes-fieldname-title input { 
     575    font-family:"Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif; 
     576    font-size:25px; 
     577    font-weight:normal; 
     578    width:100%; 
     579} 
     580 
     581.formControls input[type='submit'] { 
     582    font-family: "Trebuchet MS", Geneva, Arial, Helvetica, sans-serif;    
     583    font-size: 16px; 
     584    width:100px; 
     585    background-color:#77BB22; 
     586    color: white; 
     587    margin-top: 4px; 
     588    border: 2px solid white; 
     589    border-right-color: #ddffdd;  
     590    border-bottom-color: #eaffea;  
     591    border-radius: 5px; 
     592    -moz-border-radius: 5px; 
     593} 
     594 
     595div.field label { 
     596    font-weight:normal; 
     597    } 
     598 
     599div.field label.field_title { 
     600    font-weight:bold; 
     601    } 
     602 
     603/* Chapter editor */ 
     604div.handle { 
     605    height:22px; 
     606    margin-left: 0em; 
     607    margin-right: 0em; 
     608    cursor: move; 
     609    padding: 2px; 
     610    padding-right: 2em;     
     611    background:#eeeeff; 
     612} 
     613 
     614.sortable_row { 
     615    position:relative; 
     616} 
     617 
     618fieldset { 
     619    border: 1px solid #8cacbb; 
     620    /* margin: 1em 0em 1em 0em; 
     621    padding: 0em 1em 1em 1em; 
     622    line-height: 1.5em; 
     623    width: auto; */ 
     624} 
     625 
     626 
     627/* tinyMCE editor style */ 
     628 
     629/* Reset */ 
     630.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000} 
     631 
     632/* Containers */ 
     633.defaultSkin {position:relative} 
     634/*.defaultSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;} */ 
     635.defaultSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;} 
     636.defaultSkin .mceToolbar {height:24px;} 
     637 
     638/* Layout */ 
     639.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} 
     640.defaultSkin .mceIcon {background:url(images/icons.gif) no-repeat 20px 20px} 
     641 
     642/* Button */ 
     643/*.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px} */ 
     644/*.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0} */ 
     645.defaultSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0} 
     646.defaultSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:alpha(opacity=30); filter:alpha(opacity=30)} 
     647 
     648/* Separator */ 
     649.defaultSkin .mceSeparator {display:block; background:url(images/icons.gif) -280px 0; width:2px; height:20px; margin:0 2px 0 4px} 
     650 
     651/* Theme */ 
     652.defaultSkin span.mce_bold {background-position:0 0} 
     653.defaultSkin span.mce_italic {background-position:-60px 0} 
     654.defaultSkin span.mce_underline {background-position:-120px 0} 
     655.defaultSkin span.mce_strikethrough {background-position:-120px 0} 
     656.defaultSkin span.mce_undo {background-position:-140px 0} 
     657.defaultSkin span.mce_redo {background-position:-100px 0} 
     658.defaultSkin span.mce_cleanup {background-position:-40px 0} 
     659.defaultSkin span.mce_insertunorderedlist {background-position:-20px 0} 
     660.defaultSkin span.mce_insertorderedlist {background-position:-80px 0} 
     661.defaultSkin span.mce_subscript {background-position:-160px 0} 
     662.defaultSkin span.mce_superscript {background-position:-180px 0} 
     663.defaultSkin span.mce_link {background-position:-200px 0} 
     664.defaultSkin span.mce_unlink {background-position:-220px 0} 
     665.defaultSkin span.mce_table {background-position:-240px 0} 
     666.defaultSkin span.mce_html {background-position:-260px 0} 
     667 
     668/* ListBox */ 
     669.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} 
     670.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} 
     671.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(images/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} 
     672.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF} 
     673.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0} 
     674.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;} 
     675.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden} 
     676.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px} 
     677.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;} 
     678.defaultSkin select.mceNativeListBox {font-family:Verdana,Arial; font-size:11px; background:#F0F0EE; border:1px solid gray; margin-right:2px;} 
     679 
     680/* Menu */ 
     681.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8} 
     682.defaultSkin .mceNoIcons span.mceIcon {width:0;} 
     683.defaultSkin .mceNoIcons a .mceText {padding-left:10px} 
     684.defaultSkin .mceMenu table {background:#FFF} 
     685.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block} 
     686.defaultSkin .mceMenu td {height:20px} 
     687.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0} 
     688.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block} 
     689.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px} 
     690.defaultSkin .mceMenu pre.mceText {font-family:Monospace} 
     691.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;} 
     692.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3} 
     693.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px} 
     694.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD} 
     695.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px} 
     696.defaultSkin .mceMenuItemDisabled .mceText {color:#888} 
     697.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)} 
     698.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center} 
     699.defaultSkin .mceMenu span.mceMenuLine {display:none} 
     700.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;} 
     701 
     702 
     703.defaultSkin span.mceText {color: black; text-decoration: none; font-size: 13px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;} 
     704.defaultSkin .preview_heading span.mceText {font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;font-size: 21px;font-weight: bold;} 
     705.defaultSkin .preview_code span.mceText {font-family: Monaco, "Courier New", Courier, monospace;font-size: 100%; color: black; background-color: #dee7ec;} 
     706 
  • trunk/skins/lemill/widget_twocolumn.pt

    r2873 r3065  
    4040            tal:define="vocab python:field.Vocabulary(here); 
    4141            format python:test(widget.format, widget.format, 'select'); 
    42             vlen  python: len(vocab)"> 
     42            half python: (len(vocab)+1)/2;"> 
    4343 
    4444      <input type="hidden" 
     
    4848         <table tal:condition="python:format=='checkbox'"> 
    4949             <tr> 
    50                  <td> 
    51                      <span tal:repeat="item python:vocab.keys()[:int((vlen + 1)/2)]" tal:omit-tag=""> 
    52                          <tal:block tal:define="tabindex tabindex/next" metal:define-macro="checkbox"> 
    53                          <input 
     50                 <td tal:define="add python:0"> 
     51                     <span tal:repeat="item python:vocab.keys()[:half]" tal:omit-tag=""> 
     52                         <tal:block tal:define="tabindex tabindex/next; iter_num repeat/item/number; index python: iter_num+add; " metal:define-macro="checkbox"> 
     53                         <input                              
    5454                             tal:attributes="type string:checkbox; 
    5555                             name string:$fieldName:list; 
    56                              id string:${fieldName}_${repeat/item/number}; 
     56                             id string:${fieldName}_${index}; 
    5757                             tabindex tabindex; 
    5858                             checked python:test(here.unicodeTestIn(item, value), 'checked', None); 
     
    6161                         <label tal:content="python:vocab.getValue(item)" 
    6262                             i18n:translate="" 
    63                              tal:attributes="for string:${fieldName}_${repeat/item/number}" /> 
     63                             tal:attributes="for string:${fieldName}_${index}" /> 
    6464                         <br /> 
    6565                         </tal:block> 
     
    6767                 </td> 
    6868        <td width="100"></td> 
    69                  <td> 
    70                      <span tal:repeat="item python:vocab.keys()[int((vlen + 1)/2):]" tal:omit-tag=""> 
     69                 <td tal:define="add half"> 
     70                     <span tal:repeat="item python:vocab.keys()[half:]" tal:omit-tag=""> 
    7171                             <tal:block metal:use-macro="here/widget_twocolumn/macros/checkbox"/> 
    7272                     </span> 
Note: See TracChangeset for help on using the changeset viewer.