From 5f660cd7c4662c30921b76b04a7b9d92e82182df Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 2 Oct 2008 08:39:49 +0000 Subject: - Minimize "inline" javascript use (#1485433) --- CHANGELOG | 4 + skins/default/functions.js | 135 +++++++++++++++++++++++++++++ skins/default/includes/settingscripts.html | 14 --- skins/default/templates/addcontact.html | 1 - skins/default/templates/compose.html | 68 +-------------- skins/default/templates/editcontact.html | 1 - skins/default/templates/editidentity.html | 6 +- skins/default/templates/identities.html | 5 +- skins/default/templates/mail.html | 48 +--------- skins/default/templates/managefolders.html | 5 +- skins/default/templates/settings.html | 16 +--- 11 files changed, 153 insertions(+), 150 deletions(-) create mode 100644 skins/default/functions.js delete mode 100644 skins/default/includes/settingscripts.html diff --git a/CHANGELOG b/CHANGELOG index f370ea8f2..29024a70c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ CHANGELOG RoundCube Webmail --------------------------- +2008/10/02 (alec) +---------- +- Minimize "inline" javascript scripts use (#1485433) + 2008/10/01 (alec) - Fix spellchecking when switching to html editor (#1485362) - Fix compose window width/height (#1485396) diff --git a/skins/default/functions.js b/skins/default/functions.js new file mode 100644 index 000000000..1d8ac0290 --- /dev/null +++ b/skins/default/functions.js @@ -0,0 +1,135 @@ +/** + * RoundCube functions for default skin interface + */ + +/** + * Settings + */ + +function rcube_init_settings_tabs() +{ + if (window.rcmail && rcmail.env.action) + { + var action = rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action); + var tab = document.getElementById('settingstab'+action); + } + else + var tab = document.getElementById('settingstabdefault'); + + if (tab) + tab.className = 'tablink-selected'; +} + +function rcube_show_advanced(visible) +{ + var rows = document.getElementsByTagName('TR'); + for(var i=0; i - -if (window.rcmail && rcmail.env.action) - { - var action = rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action); - var tab = document.getElementById('settingstab'+action); - } -else - var tab = document.getElementById('settingstabdefault'); - -if (tab) - tab.className = 'tablink-selected'; - - \ No newline at end of file diff --git a/skins/default/templates/addcontact.html b/skins/default/templates/addcontact.html index 10a121a2f..38151c9e4 100644 --- a/skins/default/templates/addcontact.html +++ b/skins/default/templates/addcontact.html @@ -20,6 +20,5 @@ - diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html index 2f156c3cb..beabe9867 100644 --- a/skins/default/templates/compose.html +++ b/skins/default/templates/compose.html @@ -5,59 +5,9 @@ - + - + @@ -147,19 +97,5 @@ function rcmail_prev_sibling(elm) - - - diff --git a/skins/default/templates/editcontact.html b/skins/default/templates/editcontact.html index b92f709d9..6cef903e5 100644 --- a/skins/default/templates/editcontact.html +++ b/skins/default/templates/editcontact.html @@ -20,6 +20,5 @@ - diff --git a/skins/default/templates/editidentity.html b/skins/default/templates/editidentity.html index e89f0a60c..bac7579dd 100644 --- a/skins/default/templates/editidentity.html +++ b/skins/default/templates/editidentity.html @@ -4,14 +4,14 @@ <roundcube:object name="pagetitle" /> + - + -
@@ -33,7 +33,5 @@ - - diff --git a/skins/default/templates/identities.html b/skins/default/templates/identities.html index 1dc42d0ea..bb29c61e6 100644 --- a/skins/default/templates/identities.html +++ b/skins/default/templates/identities.html @@ -4,8 +4,9 @@ <roundcube:object name="pagetitle" /> + - + @@ -25,7 +26,5 @@ - - diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html index 24f851a20..71bad46c4 100644 --- a/skins/default/templates/mail.html +++ b/skins/default/templates/mail.html @@ -5,42 +5,7 @@ - + - + @@ -138,7 +103,7 @@ body_keypress: function(evt, p)
- + @@ -159,12 +124,5 @@ body_keypress: function(evt, p)
- diff --git a/skins/default/templates/managefolders.html b/skins/default/templates/managefolders.html index 16379723e..8808f5130 100644 --- a/skins/default/templates/managefolders.html +++ b/skins/default/templates/managefolders.html @@ -4,8 +4,9 @@ <roundcube:object name="pagetitle" /> + - + @@ -36,7 +37,5 @@ - - diff --git a/skins/default/templates/settings.html b/skins/default/templates/settings.html index 0bc0f1853..f30d093bb 100644 --- a/skins/default/templates/settings.html +++ b/skins/default/templates/settings.html @@ -4,17 +4,9 @@ <roundcube:object name="pagetitle" /> - + - + @@ -34,10 +26,8 @@ function show_adv(box)
- - -- cgit v1.2.3