summaryrefslogtreecommitdiff
path: root/public_html/skins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-09-07 11:24:49 (GMT)
committerAleksander Machniak <alec@alec.pl>2012-09-07 11:24:49 (GMT)
commite9ca874fc54fb6bc8429a3a6e7866e6e6e92820b (patch)
tree606e5fd164ac866f3853009a9e383af247613484 /public_html/skins
parent052ee511388c7525edd126abfcb5d7232f4bd1bb (diff)
downloadkolab-wap-e9ca874fc54fb6bc8429a3a6e7866e6e6e92820b.tar.gz
Added select widget
Added domain selector
Diffstat (limited to 'public_html/skins')
-rw-r--r--public_html/skins/default/images/domain_ico.pngbin0 -> 751 bytes
-rw-r--r--public_html/skins/default/images/user_ico.pngbin0 -> 616 bytes
-rw-r--r--public_html/skins/default/style.css74
-rw-r--r--public_html/skins/default/templates/main.html9
-rw-r--r--public_html/skins/default/ui.js36
5 files changed, 107 insertions, 12 deletions
diff --git a/public_html/skins/default/images/domain_ico.png b/public_html/skins/default/images/domain_ico.png
new file mode 100644
index 0000000..98d4c3b
--- /dev/null
+++ b/public_html/skins/default/images/domain_ico.png
Binary files differ
diff --git a/public_html/skins/default/images/user_ico.png b/public_html/skins/default/images/user_ico.png
new file mode 100644
index 0000000..89badba
--- /dev/null
+++ b/public_html/skins/default/images/user_ico.png
Binary files differ
diff --git a/public_html/skins/default/style.css b/public_html/skins/default/style.css
index 64d0ef1..be30a88 100644
--- a/public_html/skins/default/style.css
+++ b/public_html/skins/default/style.css
@@ -140,6 +140,12 @@ td.label {
white-space: nowrap;
}
+#topmenu > span {
+ color: #f8fcff;
+ font-size: 11px;
+ text-shadow: black 1px 1px;
+}
+
#navigation {
margin: 0 15px;
text-align: right;
@@ -243,14 +249,20 @@ td.label {
#topmenu .logout {
background: url(images/logout.png) center 10px no-repeat;
- padding: 9px 16px;
+ padding: 10px 16px;
margin: 0px 5px 0px 10px;
}
#topmenu .login {
- color: #f8fcff;
- font-size: 11px;
- text-shadow: black 1px 1px;
+ padding-left: 20px;
+ margin-right: 20px;
+ background: url(images/user_ico.png) 0 1px no-repeat;
+}
+
+#topmenu .domain {
+ padding-left: 20px;
+ margin-right: 10px;
+ background: url(images/domain_ico.png) 0 2px no-repeat;
}
#navigation ul {
@@ -515,6 +527,17 @@ pre.debug {
overflow: auto;
}
+.popup {
+ display: none;
+ position: absolute;
+ border: none;
+ border-radius: 3px;
+ box-shadow: 0 2px 6px 0 #333;
+ -moz-box-shadow: 0 2px 6px 0 #333;
+ -webkit-box-shadow: 0 2px 6px 0 #333;
+ -o-box-shadow: 0 2px 6px 0 #333;
+}
+
/********* Form smart inputs *********/
span.listarea {
@@ -523,13 +546,16 @@ span.listarea {
max-height: 209px;
overflow-y: auto;
overflow-x: hidden;
- margin: 0 0 1px;
+ margin: 0;
padding: 0;
background-color: white;
border: 1px solid #d0d0d0;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
+ text-align: left;
+ text-shadow: none;
+ color: black;
}
span.listelement {
@@ -639,6 +665,39 @@ span.listarea.autocomplete span.listelement input.autocomplete {
background-color: #f0f0f0;
}
+span.listarea.select {
+ width: 200px;
+}
+
+span.listarea.select > span.listelement input {
+ width: 180px;
+}
+
+span.listcontent {
+ display: block;
+ padding: 0;
+ margin: 0;
+ overflow: hidden;
+ max-height: 94px;
+ overflow-x: hidden;
+ overflow-y: auto;
+ border-top: 1px solid #d0d0d0;
+ background-color: #f5f5f5;
+ cursor: default;
+}
+
+span.listcontent span.listelement {
+ padding-left: 3px;
+}
+
+span.listcontent span.listelement:hover {
+ background-color: #d6efff;
+}
+
+span.listcontent span.listelement.selected {
+ background-color: #d6efff;
+}
+
/***** autocomplete list *****/
#autocompletepane
@@ -840,6 +899,11 @@ fieldset.tabbed
vertical-align: top;
}
+#domain-selector span.link {
+ color: #1E90FF;
+ text-decoration: none;
+}
+
/**** User/Group task elements ****/
#userlist table,
diff --git a/public_html/skins/default/templates/main.html b/public_html/skins/default/templates/main.html
index ed902c6..7dbdf55 100644
--- a/public_html/skins/default/templates/main.html
+++ b/public_html/skins/default/templates/main.html
@@ -13,6 +13,15 @@
<div id="logo" onclick="document.location='.'"></div>
<div id="topmenu">
<span class="login">{$user.fullname}</span>
+ <span id="domain-selector" class="domain">
+ {if count($engine->get_env('domains')) > 1}
+ <form id="domain-selector-form" method="post" style="display: inline">
+ <input data-type="select" name="domain" type="hidden" value="{$user.domain}" />
+ </form>
+ {else}
+ {$user.domain}
+ {/if}
+ </span>
<span class="logout link" title="{$engine->translate('Logout')}" onclick="kadm.main_logout()"></span>
</div>
<div id="navigation">{$main_menu}</div>
diff --git a/public_html/skins/default/ui.js b/public_html/skins/default/ui.js
index 7c598e6..94891c6 100644
--- a/public_html/skins/default/ui.js
+++ b/public_html/skins/default/ui.js
@@ -45,7 +45,7 @@ function search_init(task)
if (this.value == kadm.t('search'))
$(this).val('').removeClass('inactive');
});
-}
+};
function search_reset()
{
@@ -54,7 +54,7 @@ function search_reset()
input.val(kadm.t('search')).addClass('inactive');
kadm.command(kadm.env.search_task + '.list', {search: ''});
-}
+};
function search_details()
{
@@ -64,7 +64,7 @@ function search_details()
div.slideDown(200);
else
div.slideUp(200);
-}
+};
/**
* Fieldsets-to-tabs converter
@@ -110,7 +110,7 @@ function init_tabs(id, current)
// add the tab to container
tab.append(a).appendTo(tabs);
});
-}
+};
function show_tab(id, index)
{
@@ -122,14 +122,30 @@ function show_tab(id, index)
// Select/unselect tab
$('#tab'+idx).toggleClass('tablink-selected', idx == index);
});
-}
+};
+
+// Domain selector initializer
+function domain_selector()
+{
+ // domain selector
+ if (kadm.env.domains && kadm.env.domains.length > 1) {
+ var form = $('#domain-selector-form');
+
+ kadm.env.assoc_fields = {domain: kadm.env.domains};
+ kadm.form_init('domain-selector-form');
+
+ $('input[name="domain"]', form).change(function() {
+ window.location = '?domain=' + urlencode(this.value);
+ });
+ }
+};
// Form "onload" handler
function form_load(id)
{
if (id != 'search-form')
init_tabs(id);
-}
+};
// UI resize handler
function ui_resize()
@@ -139,8 +155,13 @@ function ui_resize()
if (h > 100) {
$('#taskcontent').height(h - 22);
}
-}
+};
+// UI loader
+function ui_load()
+{
+ domain_selector();
+}
/**
* UI Initialization
@@ -148,3 +169,4 @@ function ui_resize()
kadm.add_event_listener('form-load', form_load);
kadm.add_event_listener('http-response', ui_resize);
//$(window).resize(function() { ui_resize(); });
+$(window).load(function() { ui_load(); });