summaryrefslogtreecommitdiff
path: root/public_html
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-02-27 10:31:39 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-02-27 10:31:39 (GMT)
commit181e61d2d947e5487694b0b8d5a709125245db48 (patch)
treeecb14eaa1dacf525edf00c07d09803ab36e46693 /public_html
parent21b6f160fdb3afec0906082767de317af43d4737 (diff)
downloadkolab-wap-181e61d2d947e5487694b0b8d5a709125245db48.tar.gz
Implemented OU structure management (Request #1745)
Diffstat (limited to 'public_html')
-rw-r--r--public_html/js/kolab_admin.js52
-rw-r--r--public_html/skins/default/templates/ou.html17
2 files changed, 69 insertions, 0 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index 87f355b..c9836c8 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -1583,6 +1583,58 @@ function kolab_admin()
this.response_handler(response, 'group.edit', 'group.list');
};
+ this.ou_info = function(id)
+ {
+ this.http_post('ou.info', {id: id});
+ };
+
+ this.ou_list = function(props)
+ {
+ this.list_handler('ou', props);
+ };
+
+ this.ou_delete = function(id)
+ {
+ this.delete_handler(id, 'ou');
+ };
+
+ this.ou_save = function(reload, section)
+ {
+ var data = this.serialize_form('#'+this.env.form_id),
+ action = data.id ? 'edit' : 'add';
+
+ if (reload) {
+ data.section = section;
+ this.http_post('ou.' + action, {data: data});
+ return;
+ }
+
+ this.form_error_clear();
+
+ if (!this.check_required_fields(data)) {
+ this.display_message('form.required.empty', 'error');
+ return;
+ }
+
+ this.set_busy(true, 'saving');
+ this.api_post('ou.' + action, data, 'ou_' + action + '_response');
+ };
+
+ this.ou_delete_response = function(response)
+ {
+ this.response_handler(response, 'ou.delete', 'ou.list');
+ };
+
+ this.ou_add_response = function(response)
+ {
+ this.response_handler(response, 'ou.add', 'ou.list');
+ };
+
+ this.ou_edit_response = function(response)
+ {
+ this.response_handler(response, 'ou.edit', 'ou.list');
+ };
+
this.resource_info = function(id)
{
this.http_post('resource.info', {id: id});
diff --git a/public_html/skins/default/templates/ou.html b/public_html/skins/default/templates/ou.html
new file mode 100644
index 0000000..6928c6c
--- /dev/null
+++ b/public_html/skins/default/templates/ou.html
@@ -0,0 +1,17 @@
+<div id="toc" class="ou">
+ <div id="search">
+ <div class="searchinput">
+ <input type="text" id="searchinput" name="search" value="{$engine->translate('search')}" />
+ <script type="text/javascript">search_init('ou.list')</script>
+ <span class="searchactions">
+ <span id="search-details" title="{$engine->translate('search.criteria')}" onclick="search_details()"></span>
+ <span id="search-reset" title="{$engine->translate('search.reset')}" onclick="search_reset()"></span>
+ </span>
+ </div>
+ <div class="searchdetails">{$engine->search_form()}</div>
+ </div>
+ <div id="oulist"></div>
+</div>
+<div class="vsplitter">&nbsp;</div>
+<div id="taskcontent" class="ou"></div>
+<div class="clear"></div>