summaryrefslogtreecommitdiff
path: root/skins/default
diff options
context:
space:
mode:
Diffstat (limited to 'skins/default')
-rw-r--r--skins/default/common.css7
-rw-r--r--skins/default/functions.js30
-rw-r--r--skins/default/includes/settingstabs.html2
-rw-r--r--skins/default/includes/taskbar.html1
-rw-r--r--skins/default/mail.css2
-rw-r--r--skins/default/splitter.js40
-rw-r--r--skins/default/templates/addressbook.html4
-rw-r--r--skins/default/templates/identities.html2
-rw-r--r--skins/default/templates/mail.html1
-rw-r--r--skins/default/templates/managefolders.html2
-rw-r--r--skins/default/templates/message.html1
-rw-r--r--skins/default/templates/plugin.html24
-rw-r--r--skins/default/templates/settings.html6
13 files changed, 76 insertions, 46 deletions
diff --git a/skins/default/common.css b/skins/default/common.css
index 34ea1d2b8..631321c72 100644
--- a/skins/default/common.css
+++ b/skins/default/common.css
@@ -246,6 +246,13 @@ a.button-logout
border: 1px solid #CCCCCC;
}
+#pagecontent
+{
+ position: absolute;
+ top: 95px;
+ left: 20px;
+}
+
.splitter
{
user-select: none;
diff --git a/skins/default/functions.js b/skins/default/functions.js
index 9e71f6f9a..fd6e612ee 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -8,24 +8,16 @@
function rcube_init_settings_tabs()
{
+ var tab = '#settingstabdefault';
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';
+ tab = '#settingstab' + (rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, '')));
+
+ $(tab).addClass('tablink-selected');
}
function rcube_show_advanced(visible)
{
- var rows = document.getElementsByTagName('TR');
- for(var i=0; i<rows.length; i++)
- if(rows[i].className && rows[i].className.match(/advanced/))
- rows[i].style.display = visible ? (bw.ie ? 'block' : 'table-row') : 'none';
+ $('tr.advanced').css('display', (visible ? (bw.ie ? 'block' : 'table-row') : 'none'));
}
/**
@@ -128,7 +120,7 @@ function rcmail_init_compose_form()
function rcube_mail_ui()
{
- this.markmenu = new rcube_layer('markmessagemenu');
+ this.markmenu = $('#markmessagemenu');
}
rcube_mail_ui.prototype = {
@@ -136,24 +128,24 @@ rcube_mail_ui.prototype = {
show_markmenu: function(show)
{
if (typeof show == 'undefined')
- show = this.markmenu.visible ? false : true;
+ show = this.markmenu.is(':visible') ? false : true;
var ref = rcube_find_object('markreadbutton');
if (show && ref)
- this.markmenu.move(ref.offsetLeft, ref.offsetTop + ref.offsetHeight);
+ this.markmenu.css({ left:ref.offsetLeft, top:(ref.offsetTop + ref.offsetHeight) });
- this.markmenu.show(show);
+ this.markmenu[show?'show':'hide']();
},
body_mouseup: function(evt, p)
{
- if (this.markmenu && this.markmenu.visible && rcube_event.get_target(evt) != rcube_find_object('markreadbutton'))
+ if (this.markmenu && this.markmenu.is(':visible') && rcube_event.get_target(evt) != rcube_find_object('markreadbutton'))
this.show_markmenu(false);
},
body_keypress: function(evt, p)
{
- if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.visible)
+ if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.is(':visible'))
this.show_markmenu(false);
}
diff --git a/skins/default/includes/settingstabs.html b/skins/default/includes/settingstabs.html
index 5121ba19b..ce6d23407 100644
--- a/skins/default/includes/settingstabs.html
+++ b/skins/default/includes/settingstabs.html
@@ -2,4 +2,6 @@
<span id="settingstabdefault" class="tablink"><roundcube:button command="preferences" type="link" label="preferences" title="editpreferences" /></span>
<span id="settingstabfolders" class="tablink"><roundcube:button command="folders" type="link" label="folders" title="managefolders" class="tablink" /></span>
<span id="settingstabidentities" class="tablink"><roundcube:button command="identities" type="link" label="identities" title="manageidentities" class="tablink" /></span>
+<roundcube:container name="tabs" id="tabsbar" />
+<script type="text/javascript"> if (window.rcmail) rcmail.add_onload(rcube_init_settings_tabs); </script>
</div>
diff --git a/skins/default/includes/taskbar.html b/skins/default/includes/taskbar.html
index ef1aa8268..c2841a606 100644
--- a/skins/default/includes/taskbar.html
+++ b/skins/default/includes/taskbar.html
@@ -1,4 +1,5 @@
<div id="taskbar">
+<roundcube:container name="taskbar" id="taskbar" />
<roundcube:button command="mail" label="mail" class="button-mail" />
<roundcube:button command="addressbook" label="addressbook" class="button-addressbook" />
<roundcube:button command="settings" label="settings" class="button-settings" />
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 5a4e57bfe..ab4579eb9 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -49,7 +49,7 @@
top: 32px;
left: 90px;
width: auto;
- visibility: hidden;
+ display: none;
background-color: #F9F9F9;
border: 1px solid #CCC;
padding: 1px;
diff --git a/skins/default/splitter.js b/skins/default/splitter.js
index 3ed0eb62a..fae3ca5cb 100644
--- a/skins/default/splitter.js
+++ b/skins/default/splitter.js
@@ -22,18 +22,18 @@ function rcube_splitter(attrib)
this.p2 = document.getElementById(this.p2id);
// create and position the handle for this splitter
- this.p1pos = rcube_get_object_pos(this.p1, this.relative);
- this.p2pos = rcube_get_object_pos(this.p2, this.relative);
+ this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset();
+ this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset();
if (this.horizontal)
{
- var top = this.p1pos.y + this.p1.offsetHeight;
+ var top = this.p1pos.top + this.p1.offsetHeight;
this.layer = new rcube_layer(this.id, {x: 0, y: top, height: 10,
width: '100%', vis: 1, parent: this.p1.parentNode});
}
else
{
- var left = this.p1pos.x + this.p1.offsetWidth;
+ var left = this.p1pos.left + this.p1.offsetWidth;
this.layer = new rcube_layer(this.id, {x: left, y: 0, width: 10,
height: '100%', vis: 1, parent: this.p1.parentNode});
}
@@ -70,18 +70,18 @@ function rcube_splitter(attrib)
if (this.horizontal)
{
var lh = this.layer.height - this.offset * 2;
- this.p1.style.height = Math.floor(this.pos - this.p1pos.y - lh / 2) + 'px';
+ this.p1.style.height = Math.floor(this.pos - this.p1pos.top - lh / 2) + 'px';
this.p2.style.top = Math.ceil(this.pos + lh / 2) + 'px';
- this.layer.move(this.layer.x, Math.round(this.pos - lh / 2 + 1));
+ this.layer.move(this.layer.x, Math.round(this.pos - lh / 2 + 1));
if (bw.ie)
- {
+ {
var new_height = (parseInt(this.p2.parentNode.offsetHeight) - parseInt(this.p2.style.top));
this.p2.style.height = (new_height > 0 ? new_height : 0) +'px';
}
}
else
{
- this.p1.style.width = Math.floor(this.pos - this.p1pos.x - this.layer.width / 2) + 'px';
+ this.p1.style.width = Math.floor(this.pos - this.p1pos.left - this.layer.width / 2) + 'px';
this.p2.style.left = Math.ceil(this.pos + this.layer.width / 2) + 'px';
this.layer.move(Math.round(this.pos - this.layer.width / 2 + 1), this.layer.y);
if (bw.ie)
@@ -94,8 +94,8 @@ function rcube_splitter(attrib)
*/
this.onDragStart = function(e)
{
- this.p1pos = rcube_get_object_pos(this.p1, this.relative);
- this.p2pos = rcube_get_object_pos(this.p2, this.relative);
+ this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset();
+ this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset();
this.drag_active = true;
// start listening to mousemove events
@@ -119,8 +119,8 @@ function rcube_splitter(attrib)
// I don't use the add_listener function for this one because I need to create closures to fetch
// the position of each iframe when the event is received
var s = this;
- var id = iframes[n].id;
- this.iframe_events[n] = function(e){ e._offset = rcube_get_object_pos(document.getElementById(id)); return s.onDrag(e); }
+ var id = '#'+iframes[n].id;
+ this.iframe_events[n] = function(e){ e._offset = $(id).offset(); return s.onDrag(e); }
if (iframedoc.addEventListener)
iframedoc.addEventListener('mousemove', this.iframe_events[n], false);
@@ -145,14 +145,14 @@ function rcube_splitter(attrib)
if (this.relative)
{
- var parent = rcube_get_object_pos(this.p1.parentNode);
- pos.x -= parent.x;
- pos.y -= parent.y;
+ var parent = $(this.p1.parentNode).offset();
+ pos.x -= parent.left;
+ pos.y -= parent.top;
}
if (this.horizontal)
{
- if (((pos.y - this.layer.height * 1.5) > this.p1pos.y) && ((pos.y + this.layer.height * 1.5) < (this.p2pos.y + this.p2.offsetHeight)))
+ if (((pos.y - this.layer.height * 1.5) > this.p1pos.top) && ((pos.y + this.layer.height * 1.5) < (this.p2pos.top + this.p2.offsetHeight)))
{
this.pos = pos.y;
this.resize();
@@ -160,15 +160,15 @@ function rcube_splitter(attrib)
}
else
{
- if (((pos.x - this.layer.width * 1.5) > this.p1pos.x) && ((pos.x + this.layer.width * 1.5) < (this.p2pos.x + this.p2.offsetWidth)))
+ if (((pos.x - this.layer.width * 1.5) > this.p1pos.left) && ((pos.x + this.layer.width * 1.5) < (this.p2pos.left + this.p2.offsetWidth)))
{
this.pos = pos.x;
this.resize();
}
}
- this.p1pos = rcube_get_object_pos(this.p1, this.relative);
- this.p2pos = rcube_get_object_pos(this.p2, this.relative);
+ this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset();
+ this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset();
return false;
};
@@ -198,7 +198,7 @@ function rcube_splitter(attrib)
if (this.iframe_events[n]) {
if (iframedoc.removeEventListener)
iframedoc.removeEventListener('mousemove', this.iframe_events[n], false);
- else if (iframedoc.detachEvent)
+ else if (iframedoc.detachEvent)
iframedoc.detachEvent('onmousemove', this.iframe_events[n]);
else
iframedoc['onmousemove'] = null;
diff --git a/skins/default/templates/addressbook.html b/skins/default/templates/addressbook.html
index ce295567b..431c0589e 100644
--- a/skins/default/templates/addressbook.html
+++ b/skins/default/templates/addressbook.html
@@ -7,7 +7,7 @@
<script type="text/javascript" src="/splitter.js"></script>
<style type="text/css">
-<roundcube:if condition="config:ldap_public == false" />
+<roundcube:if condition="count(env:address_sources) &lt;= 1" />
#abookcountbar { left: 20px;}
#mainscreen { left:20px; /* IE hack */ width:expression((parseInt(document.documentElement.clientWidth)-40)+'px') }
#addresslist { width: <roundcube:exp expression="!empty(cookie:addressviewsplitter) ? cookie:addressviewsplitter-5 : 245" />px; }
@@ -44,7 +44,7 @@
<roundcube:object name="searchform" id="quicksearchbox" /><roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
</div>
-<roundcube:if condition="config:ldap_public" />
+<roundcube:if condition="count(env:address_sources) &gt; 1" />
<div id="directorylist">
<div id="groups-title"><roundcube:label name="groups" /></div>
<roundcube:object name="directorylist" id="directories-list" />
diff --git a/skins/default/templates/identities.html b/skins/default/templates/identities.html
index 9799bc576..30d33a38b 100644
--- a/skins/default/templates/identities.html
+++ b/skins/default/templates/identities.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="/settings.css" />
<script type="text/javascript" src="/functions.js"></script>
</head>
-<body onload="rcube_init_settings_tabs()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index 96be0f65e..4e1d7ce3a 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -119,6 +119,7 @@
<roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" />
<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" />
<roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
+<roundcube:container name="toolbar" id="messagetoolbar" />
<div id="markmessagemenu">
<ul class="toolbarmenu">
diff --git a/skins/default/templates/managefolders.html b/skins/default/templates/managefolders.html
index 5da5c22f1..925bc2c81 100644
--- a/skins/default/templates/managefolders.html
+++ b/skins/default/templates/managefolders.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="/settings.css" />
<script type="text/javascript" src="/functions.js"></script>
</head>
-<body onload="rcube_init_settings_tabs()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
diff --git a/skins/default/templates/message.html b/skins/default/templates/message.html
index b8d66c1be..7d42ef73f 100644
--- a/skins/default/templates/message.html
+++ b/skins/default/templates/message.html
@@ -36,6 +36,7 @@
<roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
<roundcube:button command="viewsource" imageSel="/images/buttons/source_sel.png" imageAct="/images/buttons/source_act.png" imagePas="/images/buttons/source_pas.png" width="32" height="32" title="viewsource" />
<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" />
+<roundcube:container name="toolbar" id="messagetoolbar" />
</div>
<div id="mainscreen">
diff --git a/skins/default/templates/plugin.html b/skins/default/templates/plugin.html
new file mode 100644
index 000000000..9725fe4d8
--- /dev/null
+++ b/skins/default/templates/plugin.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<link rel="stylesheet" type="text/css" href="/<roundcube:var name='env:task'/>.css" />
+<script type="text/javascript" src="/functions.js"></script>
+</head>
+<body>
+
+<roundcube:include file="/includes/taskbar.html" />
+<roundcube:include file="/includes/header.html" />
+<roundcube:if condition="env:task == 'settings'" />
+ <roundcube:include file="/includes/settingstabs.html" />
+<roundcube:endif />
+
+<div id="pagecontent">
+<roundcube:object name="plugin.body" />
+</div>
+
+<roundcube:object name="plugin.footer" />
+
+</body>
+</html>
diff --git a/skins/default/templates/settings.html b/skins/default/templates/settings.html
index a3f5298cd..0abe7fa41 100644
--- a/skins/default/templates/settings.html
+++ b/skins/default/templates/settings.html
@@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="/settings.css" />
<script type="text/javascript" src="/functions.js"></script>
</head>
-<body onload="rcube_init_settings_tabs()">
+<body>
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
@@ -17,7 +17,7 @@
<div id="userprefs-box">
<div id="userprefs-title"><roundcube:label name="userpreferences" /></div>
-<div style="padding:15px 0 15px 15px">
+<div id="userprefscontainer" style="padding:15px 0 15px 15px">
<div class="userprefs-block">
<roundcube:object name="userprefs" form="form" parts="general,mailbox,mailview" />
</div>
@@ -25,6 +25,8 @@
<roundcube:object name="userprefs" form="form" parts="compose,folders,server" />
</div>
<div style="clear:left"></div>
+
+<roundcube:container name="userprefs" id="userprefscontainer" />
</div>
</div>