Changeset 5f660cd in github


Ignore:
Timestamp:
Oct 2, 2008 4:39:49 AM (5 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
58f786f
Parents:
a2740628
Message:
  • Minimize "inline" javascript use (#1485433)
Files:
1 added
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rfd51e0f r5f660cd  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/10/02 (alec) 
     5---------- 
     6- Minimize "inline" javascript scripts use (#1485433) 
    37 
    482008/10/01 (alec) 
  • skins/default/templates/addcontact.html

    r0dbac32 r5f660cd  
    2121</div> 
    2222 
    23  
    2423</body> 
    2524</html> 
  • skins/default/templates/compose.html

    r4e9349d r5f660cd  
    66<link rel="stylesheet" type="text/css" href="/mail.css" /> 
    77<link rel="stylesheet" type="text/css" href="/googiespell.css" /> 
    8 <script type="text/javascript"> 
    9 <!-- 
    10  
    11 function rcmail_show_header_form(id, link) 
    12 { 
    13   var row, parent, ns, ps, links; 
    14  
    15   if (link) 
    16   { 
    17     var parent = link.parentNode; 
    18  
    19     if ((ns = rcmail_next_sibling(link))) 
    20       parent.removeChild(ns); 
    21     else if ((ps = rcmail_prev_sibling(link))) 
    22       parent.removeChild(ps); 
    23      
    24     parent.removeChild(link); 
    25  
    26     if(!parent.getElementsByTagName('A').length) 
    27       document.getElementById('compose-links').style.display = 'none'; 
    28   } 
    29  
    30   if (row = document.getElementById(id)) 
    31     { 
    32     var div = document.getElementById('compose-div'); 
    33     var headers_div = document.getElementById('compose-headers-div'); 
    34     row.style.display = (document.all && !window.opera) ? 'block' : 'table-row'; 
    35     div.style.top = (parseInt(headers_div.offsetHeight)) + 'px'; 
    36     } 
    37  
    38   return false; 
    39 } 
    40  
    41 function rcmail_next_sibling(elm) 
    42 { 
    43   var ns = elm.nextSibling; 
    44   while (ns && ns.nodeType == 3) 
    45     ns = ns.nextSibling; 
    46   return ns; 
    47 } 
    48  
    49 function rcmail_prev_sibling(elm) 
    50 { 
    51   var ps = elm.previousSibling; 
    52   while (ps && ps.nodeType == 3) 
    53     ps = ps.previousSibling; 
    54   return ps; 
    55 } 
    56  
    57 //--> 
    58 </script> 
     8<script type="text/javascript" src="/functions.js"></script> 
    599</head> 
    60 <body> 
     10<body onload="rcmail_init_compose_form()"> 
    6111 
    6212<roundcube:include file="/includes/taskbar.html" /> 
     
    14898<roundcube:object name="composeAttachmentForm" id="attachment-form" /> 
    14999 
    150 <script type="text/javascript"> 
    151 <!-- 
    152  
    153 var cc_field = document.getElementById('rcmcomposecc'); 
    154 if (cc_field && cc_field.value!='') 
    155   rcmail_show_header_form('compose-cc', document.getElementById('addcclink')); 
    156 var bcc_field = document.getElementById('rcmcomposebcc'); 
    157 if (bcc_field && bcc_field.value!='') 
    158   rcmail_show_header_form('compose-bcc', document.getElementById('addbcclink')); 
    159  
    160 //--> 
    161 </script> 
    162  
    163  
    164100</body> 
    165101</html> 
  • skins/default/templates/editcontact.html

    red132ed r5f660cd  
    2121</div> 
    2222 
    23  
    2423</body> 
    2524</html> 
  • skins/default/templates/editidentity.html

    r106d057 r5f660cd  
    55<roundcube:include file="/includes/links.html" /> 
    66<link rel="stylesheet" type="text/css" href="/settings.css" /> 
     7<script type="text/javascript" src="/functions.js"></script> 
    78</head> 
    8 <body> 
     9<body onload="rcube_init_settings_tabs()"> 
    910 
    1011<roundcube:include file="/includes/taskbar.html" /> 
    1112<roundcube:include file="/includes/header.html" /> 
    1213<roundcube:include file="/includes/settingstabs.html" /> 
    13  
    1414 
    1515<div id="identities-list"> 
     
    3434</div> 
    3535 
    36 <roundcube:include file="/includes/settingscripts.html" /> 
    37  
    3836</body> 
    3937</html> 
  • skins/default/templates/identities.html

    rf645ce1 r5f660cd  
    55<roundcube:include file="/includes/links.html" /> 
    66<link rel="stylesheet" type="text/css" href="/settings.css" /> 
     7<script type="text/javascript" src="/functions.js"></script> 
    78</head> 
    8 <body> 
     9<body onload="rcube_init_settings_tabs()"> 
    910 
    1011<roundcube:include file="/includes/taskbar.html" /> 
     
    2627</div> 
    2728 
    28 <roundcube:include file="/includes/settingscripts.html" /> 
    29  
    3029</body> 
    3130</html> 
  • skins/default/templates/mail.html

    ra1f7220e r5f660cd  
    66<link rel="stylesheet" type="text/css" href="/mail.css" /> 
    77<script type="text/javascript" src="/splitter.js"></script> 
    8 <script type="text/javascript"> 
    9  
    10 function rcube_mail_ui() 
    11 { 
    12   this.markmenu = new rcube_layer('markmessagemenu'); 
    13 } 
    14  
    15 rcube_mail_ui.prototype = { 
    16  
    17 show_markmenu: function(show) 
    18 { 
    19   if (typeof show == 'undefined') 
    20     show = this.markmenu.visible ? false : true; 
    21    
    22   var ref = rcube_find_object('markreadbutton'); 
    23   if (show && ref) 
    24     this.markmenu.move(ref.offsetLeft, ref.offsetTop + ref.offsetHeight); 
    25    
    26   this.markmenu.show(show); 
    27 }, 
    28  
    29 body_mouseup: function(evt, p) 
    30 { 
    31   if (this.markmenu && this.markmenu.visible && evt.target != rcube_find_object('markreadbutton')) 
    32     this.show_markmenu(false); 
    33 }, 
    34  
    35 body_keypress: function(evt, p) 
    36 { 
    37   if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.visible) 
    38     this.show_markmenu(false); 
    39 } 
    40  
    41 }; 
    42  
    43 </script> 
     8<script type="text/javascript" src="/functions.js"></script> 
    449<style type="text/css"> 
    4510<roundcube:if condition="config:preview_pane == true" /> 
     
    5924</style> 
    6025</head> 
    61 <body> 
     26<body onload="rcube_init_mail_ui()"> 
    6227 
    6328<roundcube:include file="/includes/taskbar.html" /> 
     
    139104<roundcube:button command="checkmail" imageSel="/images/buttons/inbox_sel.png" imageAct="/images/buttons/inbox_act.png" imagePas="/images/buttons/inbox_pas.png" width="32" height="32" title="checkmail" /> 
    140105<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" /> 
    141 <roundcube:button name="markreadbutton" id="markreadbutton" image="/images/buttons/markread_act.png" width="32" height="32" title="markmessages" onclick="rcmailUI.show_markmenu();return false" /> 
     106<roundcube:button name="markreadbutton" id="markreadbutton" image="/images/buttons/markread_act.png" width="32" height="32" title="markmessages" onclick="rcmail_ui.show_markmenu();return false" /> 
    142107<roundcube:button command="reply" imageSel="/images/buttons/reply_sel.png" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" /> 
    143108<roundcube:button command="reply-all" imageSel="/images/buttons/replyall_sel.png" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" /> 
     
    160125</div> 
    161126 
    162 <script type="text/javascript"> 
    163  
    164 var rcmailUI = new rcube_mail_ui(); 
    165 rcube_event.add_listener({ object:rcmailUI, method:'body_mouseup', event:'mouseup' }); 
    166 rcube_event.add_listener({ object:rcmailUI, method:'body_keypress', event:'keypress' }); 
    167    
    168 </script> 
    169127</body> 
    170128</html> 
  • skins/default/templates/managefolders.html

    ra8d23d8 r5f660cd  
    55<roundcube:include file="/includes/links.html" /> 
    66<link rel="stylesheet" type="text/css" href="/settings.css" /> 
     7<script type="text/javascript" src="/functions.js"></script> 
    78</head> 
    8 <body> 
     9<body onload="rcube_init_settings_tabs()"> 
    910 
    1011<roundcube:include file="/includes/taskbar.html" /> 
     
    3738</form> 
    3839 
    39 <roundcube:include file="/includes/settingscripts.html" /> 
    40  
    4140</body> 
    4241</html> 
  • skins/default/templates/settings.html

    rffae15e5 r5f660cd  
    55<roundcube:include file="/includes/links.html" /> 
    66<link rel="stylesheet" type="text/css" href="/settings.css" /> 
    7 <script type="text/javascript"> 
    8 function show_adv(box) 
    9 { 
    10     var rows = document.getElementsByTagName('TR'); 
    11     for(var i=0; i<rows.length; i++) 
    12         if(rows[i].className && rows[i].className.match(/advanced/)) 
    13             rows[i].style.display = box.checked ? (bw.ie ? 'block' : 'table-row') : 'none'; 
    14 } 
    15 </script> 
     7<script type="text/javascript" src="/functions.js"></script> 
    168</head> 
    17 <body> 
     9<body onload="rcube_init_settings_tabs()"> 
    1810 
    1911<roundcube:include file="/includes/taskbar.html" /> 
     
    3527<div class="advswitch"> 
    3628<label for="advswitch"><roundcube:label name="advancedoptions"><label> 
    37 <input type="checkbox" id="advswitch" name="_advanced" value="0" onclick="show_adv(this)" /> 
     29<input type="checkbox" id="advswitch" name="_advanced" value="0" onclick="rcube_show_advanced(this.checked)" /> 
    3830</div> 
    39  
    40 <roundcube:include file="/includes/settingscripts.html" /> 
    4131 
    4232</body> 
Note: See TracChangeset for help on using the changeset viewer.