
kerio.waw.ui.selectItems = {

x_m: function(x_n) {
this.x_ga = x_n; var x_2w = this.x_ga + '_';
var x_1b = kerio.lib;
var x_x = x_1b.x_x;
var x_o = (kerio.waw.status.x_p.x_q === x_r.x_s.x_t);
var x_5o = {
x_1da: false, 
x_62: function() {
var x_16 = this.x_2p;
x_16.x_1db.call(x_16);
}
};
var x_jb = 400;
var x_ja = 325;
switch (x_n) {
case 'x_cd':
x_5o.x_1p = 'userList';
x_5o.x_5x = {
x_1e: [
{
x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{
x_7s: 'x_a6',
x_23: x_x('Username', 'common'),
x_cs: false, 
x_7u: kerio.waw.shared.x_3e.x_8q.x_cv
},
{
x_7s: 'x_f7',
x_23: x_x('Full Name', 'common'),
x_cs: false },
{
x_7s: 'x_f8',
x_cs: false, x_23: x_x('Description', 'common')
}
]
};
break;
case 'x_80':
x_5o.x_1p = 'groupList';
x_5o.x_5x = {
x_1e: [
{
x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{
x_7s: 'x_a6',
x_23: x_x('Name', 'common'),
x_cs: false, 
x_7u: kerio.waw.shared.x_3e.x_8q.x_ct
},
{
x_7s: 'x_f8',
x_cs: false, x_23: x_x('Description', 'common')
}
]
};
break;
case 'x_8t':
x_5o.x_1p = 'serviceList';
x_5o.x_5x = {
x_1e: [
{	x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{	x_7s: 'x_a6',
x_23: x_x('Name', 'common'),
x_1u: 130,
x_cs: false, 
x_7u: kerio.waw.shared.x_3e.x_8q.x_8r
},
{	x_7s: 'x_f8',
x_cs: false, x_23: x_x('Description', 'common')
}
]
};
x_jb = 450;
x_ja = 400;
break;
case 'x_1dc':
x_5o.x_1p = 'ipGroupList';
x_5o.x_5x = {
x_1e: [
{	x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{	x_7s: 'x_a6',
x_23: x_x('Name', 'common'),
x_cs: false, 
x_7u: function(x_1o, x_47) {
return {
x_47: x_1o,
x_cy: 'ipGroupIcon agTypeGroup'
};
} }
]
};
break;
case 'x_1dd':
x_5o.x_1p = 'interfaceList undead';
x_5o.x_5x = {
x_1e: [
{	x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{	x_7s: 'x_a6',
x_23: x_x('Name', 'common'),
x_cs: false, 
x_7u: function (x_1o, x_47) {
return x_fi.x_kg(x_1o, x_47);
} }
]
};
break;
case 'x_1de':
x_5o.x_1p = 'interfaceList undead';
x_5o.x_5x = {
x_1e: [
{	x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{	x_7s: 'x_a6',
x_23: x_x('Name', 'common'),
x_cs: false, 
x_7u: function (x_1o, x_47) {
return x_fi.x_kg(x_1o, x_47);
} }
]
};
break;
case 'x_cc':
var x_1df = {
x_1e: ['x_ew'],
x_8e: x_r.x_3s.x_77
};
var x_63 = new kerio.waw.shared.x_17.x_es(
x_2w + 'x_3l' + '_' + 'x_1dg', x_1df);
x_5o.x_5x = {
x_1e: [
{
x_7s: 'x_1j',
x_cs: false, x_7t: true
},
{
x_7s: 'x_a6',
x_23: x_x('Name', 'common'),
x_cs: false, 
x_7u: function(x_1o, x_47) {
if (true === x_47.x_di) {
return kerio.waw.shared.x_3e.x_8q.x_ct(x_1o);
} else {
return kerio.waw.shared.x_3e.x_8q.x_cv(x_1o, x_47);
}
}
},
{	x_7s: 'x_f7',
x_23: x_x('Full Name', 'common'),
x_cs: false },
{
x_7s: 'x_f8',
x_cs: false, x_23: x_x('Description', 'common')
},
{	x_7s: 'x_di',
x_7t: true
},
{	x_7s: 'x_f3',
x_7t: true
}
]
};
break;
}if (x_63) {
x_5o.x_5v = {x_64: x_63};
}
var x_3l = new kerio.lib.x_4g(x_2w + 'x_3l', x_5o);
if (x_63) {
x_3l.x_1dg = x_63;
}
x_3l.x_4k = kerio.lib.x_6b.x_6d.x_6e;
var x_10 = {
x_1u: x_ja,
x_1v: x_jb,
x_1x: x_3l,
x_1y: x_x('Select Items', 'common'),
x_1z: [
{	x_20: true,
x_1j: 'x_jh',
x_23: x_x('OK', 'common'),
x_1m: x_o,

x_25: function(x_32) {
var x_16 = x_32.x_16;
x_16.x_1db.call(x_16);
}
},
{	x_21: true,
x_23: x_x('Cancel', 'common')
}
]
};
var x_16 = new kerio.lib.x_26(this.x_ga, x_10);
x_16.x_27({
x_3l: x_3l,
x_n: x_n });
this.x_2a(x_16);
return x_16;
},
x_2a: function(x_2b){

x_2b.x_2c = function(x_28){
var x_3l = this.x_3l;
this.x_7w = x_28.x_7w;
x_3l.x_8f();
x_3l.x_1dh = x_28.x_1dh;
this.x_1di = (false !== x_28.x_7y)
? undefined : x_28.x_2e;
if (x_3l.x_1dg) {
x_3l.x_1dg.x_ez(this);
} else {
x_3l.x_1dj();
this.x_1dk(x_28.x_7i, x_28.x_7x);
}
}; 
x_2b.x_1dk = function(x_66, x_7x) {
if (!x_66 || !x_66.x_28) {
kerio.lib.x_nq('Internal error: selectItems called without x_7i parameter!');
return;
}
this.x_ly(kerio.lib.x_x('Loading…', 'common'));
var x_n = this.x_n;
var x_28 = x_66.x_28.params || {};
if (null === x_28.query) {
delete x_28.query;
}
else {
var x_ah = x_28.query || {};
x_ah.start = 0;
x_ah.limit = -1;
x_ah.orderBy = [
{
"columnName": (x_n === 'x_cd' ? "userName" : "name"),
"direction": kerio.waw.shared.x_3r.x_3s.x_8k,
"caseSensitive": true
}
];
x_28.query = x_ah;
}
x_66.x_28.params = kerio.lib.x_6r(x_28);
x_28 = {
x_28: x_66.x_28,
x_2e: this.x_1dl,
x_2s: {
x_7x: x_7x,
x_68: x_66.x_68,
x_1j: x_66.x_1j,
x_a6: x_66.x_a6,
x_f8: x_66.x_f8
},
x_2q: this
};
if (x_n === 'x_cd') {
x_28.x_2s.x_f7 = x_66.x_f7;
}
kerio.lib.x_6t.x_6u(x_28);
};

x_2b.x_1dl = function(x_6t, x_6w, x_28) {
var
x_47 = x_6t.x_ac[x_28.x_68], x_3l = this.x_3l,
x_1j = x_28.x_1j || 'id',
x_1dh = x_3l.x_1dh;
if (x_1dh && Array === x_1dh.constructor) {
x_47 = x_1dh.concat(x_47);
}
if (0 === x_47.length) {
this.x_jt();
return; }
var x_1dm = {};
x_1dm[x_1j] = 'x_1j';
x_1dm[x_28.x_a6 || 'name'] = 'x_a6';
x_1dm[x_28.x_f7 || 'fullName'] = 'x_f7';
x_1dm[x_28.x_f8 || 'description'] = 'x_f8';
x_3l.x_7k(x_47, false, x_1dm);
this.x_1j = x_1j;
if (x_28.x_7x) {
x_3l.x_1dn(this.x_1do);
}
x_3l.x_1dp();
this.x_jt();
};

x_2b.x_1do = function(x_eo) {
var x_16 = this.x_2p;
var x_1j = x_16.x_1j;
var x_b3 = x_16.x_7w.x_1dq(x_1j, x_eo[x_1j]);
return (0 > x_b3); };

x_2b.x_1db = function() {
var x_1b = kerio.lib;
if (0 === this.x_3l.x_3v.x_46) {
x_1b.x_48(
x_1b.x_x('Select Items', 'common'),
x_1b.x_x('Please select at least one item from the list.', 'selectItems'),
this.x_3l.x_to, this.x_3l
);
this.x_jt();
return;
}
if (undefined !== this.x_1di) {
this.x_1dr();
}
else {
this.x_1ds();
}
}; 
x_2b.x_1ds = function() {
var x_47;
var x_7w = this.x_7w;
var x_1dt = this.x_3l.x_de(true);
for (var x_41 = 0, x_42 = x_1dt.length; x_41 < x_42; x_41++) {
x_47 = x_1dt[x_41];
if (-1 === x_7w.x_1dq('id', x_47.id)) {
x_7w.x_ih(x_47);
}
}
this.x_2r();
}; 
x_2b.x_1dr = function() {
var
x_1du = [],
x_1dt = this.x_3l.x_de(true),
x_1dv,
x_1dw = '';
this.x_3l.x_1dx();
x_1dv = this.x_3l.x_7i();
for (var x_41 = 0, x_42 = x_1dt.length; x_41 < x_42; x_41++) {
x_1du.push(x_1dt[x_41].x_1j);
x_1dw = x_1dt[x_41].domainName; }
this.x_1di.call(this.x_7w, x_1du, x_1dv, x_1dw, x_1dt);
this.x_2r();
}; 
x_2b.x_3l.x_to = function() {
this.x_tz([]); };
}
}; 