readCompleted_parameter = {
first : '(0)',
last : '(0)',
count : 20
};
function readCompleted_list_init() {
var str = '
';
str += '| prev next 0 |
';
str += '| rank | id | title | processName |
';
str += ''
str += '
';
$('#content').html(str);
$('#next').click(function() {
readCompleted_list_next();
});
$('#prev').click(function() {
readCompleted_list_prev();
});
readCompleted_parameter.first = '(0)';
readCompleted_parameter.last = '(0)';
readCompleted_list_next();
}
function readCompleted_list_next(id) {
var id = (id ? id : readCompleted_parameter.last);
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/next/' + readCompleted_parameter.count,
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.first = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_list_prev(id) {
var id = (id ? id : readCompleted_parameter.first);
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/prev/' + readCompleted_parameter.count,
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.last = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listWithApplication_init() {
$('#result').html('');
var str = '';
$('#content').html(str);
$('#next').click(function() {
readCompleted_listWithApplication_next();
});
$('#prev').click(function() {
readCompleted_listWithApplication_prev();
});
readCompleted_parameter.first = '(0)';
readCompleted_parameter.last = '(0)';
}
function readCompleted_listWithApplication_next(id) {
var id = (id ? id : readCompleted_parameter.last);
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + readCompleted_parameter.last + '/next/' + readCompleted_parameter.count + '/application/' + $('#applicationFlag').val(),
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.first = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listWithApplication_prev(id) {
var id = (id ? id : readCompleted_parameter.first);
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/prev/' + readCompleted_parameter.count + '/application/' + $('#applicationFlag').val(),
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.last = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listWithProcess_init() {
$('#result').html('');
var str = '';
$('#content').html(str);
$('#next').click(function() {
readCompleted_listWithProcess_next();
});
$('#prev').click(function() {
readCompleted_listWithProcess_prev();
});
readCompleted_parameter.first = '(0)';
readCompleted_parameter.last = '(0)';
}
function readCompleted_listWithProcess_next(id) {
var id = (id ? id : readCompleted_parameter.last);
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/next/' + readCompleted_parameter.count + '/process/' + $('#processFlag').val(),
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.first = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listWithProcess_prev(id) {
var id = (id ? id : readCompleted_parameter.first);
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/prev/' + readCompleted_parameter.count + '/process/' + $('#processFlag').val(),
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.last = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_list_grid(json) {
if (json.data && json.data.length > 0) {
str = '';
$.each(json.data, function(index, item) {
str += '';
str += '| ' + item.rank + ' | ';
str += '' + item.id + ' | ';
str += '' + item.title + ' | ';
str += '' + item.processName + ' | ';
str += '
';
});
$('#total').html(json.count);
$('#grid').html(str);
} else {
$('#total').html('0');
$('#grid').html('');
}
}
function readCompleted_listCountWithApplication() {
$('#result').html('');
$('#content').html('');
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/count/application',
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listCountWithProcess_init() {
$('#result').html('');
str = '';
$('#content').html(str);
$('#get').click(function() {
readCompleted_listCountWithProcess($('#applicationFlag').val());
});
}
function readCompleted_listCountWithProcess(applicationFlag) {
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/count/application/' + applicationFlag + '/process',
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_countWithPerson_init() {
$('#result').html('');
str = '';
$('#content').html(str);
$('#get').click(function() {
readCompleted_countWithPerson($('#person').val());
});
}
function readCompleted_countWithPerson(person) {
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/count/' + person,
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_reference_init() {
$('#result').html('');
str = '';
$('#content').html(str);
$('#get').click(function() {
readCompleted_reference($('#id').val());
});
}
function readCompleted_reference(id) {
$('#result').html('');
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/' + id + '/reference',
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listFilter_init() {
$('#result').html('');
var str = '';
$('#content').html(str);
$('#next').click(function() {
readCompleted_listFilter_next();
});
$('#prev').click(function() {
readCompleted_listFilter_prev();
});
$('#clear').click(function() {
readCompleted_parameter.first = '(0)';
readCompleted_parameter.last = '(0)';
});
readCompleted_parameter.first = '(0)';
readCompleted_parameter.last = '(0)';
$.ajax({
type : 'get',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/filter/attribute',
xhrFields : {
'withCredentials' : true
},
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
txt = '';
if (json.data.applicationList) {
$.each(json.data.applicationList, function(index, item) {
txt += '';
});
}
$('#applicationFilter').html(txt);
txt = '';
if (json.data.processList) {
$.each(json.data.processList, function(index, item) {
txt += '';
});
}
$('#processFilter').html(txt);
txt = '';
if (json.data.creatorCompanyList) {
$.each(json.data.creatorCompanyList, function(index, item) {
txt += '';
});
}
$('#creatorCompanyFilter').html(txt);
txt = '';
if (json.data.creatorDepartmentList) {
$.each(json.data.creatorDepartmentList, function(index, item) {
txt += '';
});
}
$('#creatorDepartmentFilter').html(txt);
txt = '';
if (json.data.completedTimeMonthList) {
$.each(json.data.completedTimeMonthList, function(index, item) {
txt += '';
});
}
$('#completedTimeMonthFilter').html(txt);
txt = '';
if (json.data.activityNameList) {
$.each(json.data.activityNameList, function(index, item) {
txt += '';
});
}
$('#activityNameFilter').html(txt);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listFilter_next(id) {
var id = (id ? id : readCompleted_parameter.last);
$.ajax({
type : 'post',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/next/' + readCompleted_parameter.count + '/filter',
xhrFields : {
'withCredentials' : true
},
data : JSON.stringify({
application : $('#applicationFilter').val(),
process : $('#processFilter').val(),
creatorCompany : $('#creatorCompanyFilter').val(),
creatorDepartment : $('#creatorDepartmentFilter').val(),
completedTimeMonth : $('#completedTimeMonthFilter').val(),
activityName : $('#activityNameFilter').val(),
key : $('#keyFilter').val()
}),
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.first = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}
function readCompleted_listFilter_prev(id) {
var id = (id ? id : readCompleted_parameter.first);
$.ajax({
type : 'post',
dataType : 'json',
contentType : 'application/json; charset=utf-8',
url : '../jaxrs/readcompleted/list/' + id + '/prev/' + readCompleted_parameter.count + '/filter',
xhrFields : {
'withCredentials' : true
},
data : JSON.stringify({
application : $('#applicationFilter').val(),
process : $('#processFilter').val(),
creatorCompany : $('#creatorCompanyFilter').val(),
creatorDepartment : $('#creatorDepartmentFilter').val(),
completedTimeMonth : $('#completedTimeMonthFilter').val(),
activityName : $('#activityNameFilter').val(),
key : $('#keyFilter').val()
}),
crossDomain : true
}).done(function(json) {
if (json.type == 'success') {
if (json.data.length > 0) {
readCompleted_parameter.first = json.data[0].id;
readCompleted_parameter.last = json.data[json.data.length - 1].id;
} else {
readCompleted_parameter.last = '(0)';
}
readCompleted_list_grid(json);
}
}).always(function(json) {
$('#result').html(JSON.stringify(json, null, 4));
});
}