summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-01 15:17:32 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-01 15:17:32 (GMT)
commitda73d1841cac84057b85e16004bbaf5f6e4f1fbe (patch)
tree534af4ee2397761f7e53824d41900a8cfbb1bd3c
parentd2c15c8de68cab0b07f9c0590e8fefe8c9c219bb (diff)
downloadkolab-wap-da73d1841cac84057b85e16004bbaf5f6e4f1fbe.tar.gz
Hide the epoch field that is not yet implemented
-rw-r--r--public_html/js/kolab_admin.js35
1 files changed, 23 insertions, 12 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index ed4feb7..8c3df3c 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -1862,7 +1862,8 @@ function kolab_admin()
.on('change', function() {
rights_div[$(this).val() == 'custom' ? 'show' : 'hide']();
}),
- epoch_input = $('<input id="acl-epoch" type="text" size="13" />'),
+// Not yet implemented
+// epoch_input = $('<input id="acl-epoch" type="text" size="13" />'),
subjects = 'user,anyone,anonymous'.split(','),
options = 'all,read-only,read-write,semi-full,full,custom'.split(','),
rights = 'l,r,s,w,i,p,k,x,t,n,e,a'.split(',');
@@ -1886,8 +1887,9 @@ function kolab_admin()
$('td.value', rows[0]).append(subject_select).append(subject_input);
$('td.label', rows[1]).text(this.t('acl.rights'));
$('td.value', rows[1]).append(select).append(rights_div.append(spans));
- $('td.label', rows[2]).text(this.t('acl.expire'));
- $('td.value', rows[2]).append(epoch_input);
+// Not yet implemented
+// $('td.label', rows[2]).text(this.t('acl.expire'));
+// $('td.value', rows[2]).append(epoch_input);
dialog.hide().appendTo('body');
@@ -1896,12 +1898,13 @@ function kolab_admin()
// reset form elements
subject_select.val(acl.subject.match(/^(anyone|anonymous)$/i) ? acl.subject : 'user').change();
subject_input.val(subject_select.val() == 'user' ? acl.subject : '');
- epoch_input.val(this.unix_to_date(acl.epoch, true));
+// Not yet implemented
+/* epoch_input.val(this.unix_to_date(acl.epoch, true));
epoch_input.datetimepicker({
lang: 'en',
format: 'Y-m-d H:i'
});
-
+*/
var v = $.inArray(acl.rights, options) != -1 ? acl.rights : 'custom';
select.val(v).change();
$.each(rights, function() {
@@ -1927,7 +1930,8 @@ function kolab_admin()
user_input = $('#acl-subject-user'),
user = $.trim(user_input.val()),
rights = $('#acl-type').val(),
- epoch = $.trim($('#acl-epoch').val()),
+// Not yet implemented
+// epoch = $.trim($('#acl-epoch').val()),
acl_list = $('#acl' + this.acl_dialog_name);
// sanity checks
@@ -1962,7 +1966,8 @@ function kolab_admin()
}
}
- if (epoch) {
+// Not yet implemented
+/* if (epoch) {
if (epoch.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2})$/))
epoch = Date.UTC(RegExp.$1, RegExp.$2 - 1, RegExp.$3, RegExp.$4, RegExp.$5) / 1000;
else if (epoch.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/))
@@ -1972,8 +1977,10 @@ function kolab_admin()
return false;
}
}
+*/
- acl = {subject: subject, rights: rights, epoch: epoch};
+// acl = {subject: subject, rights: rights, epoch: epoch};
+ acl = {subject: subject, rights: rights};
// this.log(acl);
// this.log(this.build_acl([acl]));
@@ -3145,8 +3152,11 @@ function kolab_admin()
// Syntax subject, rights[, epoch]
var entry = self.explode_quoted_str(str, ',');
- if (entry.length == 2 || entry.length == 3)
- acl.push({subject: entry[0], rights: entry[1], epoch: entry[2] || 0});
+ if (entry.length == 2 || entry.length == 3) {
+// Not yet implemented
+// acl.push({subject: entry[0], rights: entry[1], epoch: entry[2] || 0});
+ acl.push({subject: entry[0], rights: entry[1] || 0});
+ }
});
return acl;
@@ -3169,8 +3179,9 @@ function kolab_admin()
tokens.push(subject);
tokens.push(entry.rights);
- if (entry.epoch)
- tokens.push(entry.epoch);
+// Not yet implemented
+// if (entry.epoch)
+// tokens.push(entry.epoch);
result.push(tokens.join(', '));
});