2021-02-03 16:08:40 +08:00
|
|
|
var ccn_calendar_sharingListCache = [];
|
|
|
|
|
var ccn_calendar_sharingTargetListCache = [];
|
|
|
|
|
var ccn_calendar_sharedListCache = [];
|
|
|
|
|
|
2021-01-19 22:20:11 +08:00
|
|
|
$(document).ready(function() {
|
|
|
|
|
ccn_pages_currentPage = ccn_pages_enumPages.calendar;
|
2021-01-24 14:38:08 +08:00
|
|
|
|
|
|
|
|
// template process
|
|
|
|
|
ccn_template_Load();
|
|
|
|
|
|
|
|
|
|
// nav process
|
2021-01-30 17:30:28 +08:00
|
|
|
ccn_headerNav_Insert();
|
|
|
|
|
ccn_headerNav_BindEvents();
|
|
|
|
|
ccn_headerNav_LoggedRefresh();
|
2021-01-19 22:20:11 +08:00
|
|
|
|
2021-01-30 17:30:28 +08:00
|
|
|
// messagebox process
|
|
|
|
|
ccn_messagebox_Insert();
|
|
|
|
|
ccn_messagebox_BindEvent();
|
|
|
|
|
|
2021-01-19 22:20:11 +08:00
|
|
|
// process calendar it self
|
|
|
|
|
ccn_calendar_LoadCalendarBody();
|
|
|
|
|
|
2021-01-23 18:37:12 +08:00
|
|
|
// bind tab control switcher and set current tab
|
|
|
|
|
$("#tabcontrol-tab-1-1").click(function(){
|
|
|
|
|
ccn_tabcontrol_SwitchTab(1, 1);
|
|
|
|
|
});
|
|
|
|
|
$("#tabcontrol-tab-1-2").click(function(){
|
|
|
|
|
ccn_tabcontrol_SwitchTab(1, 2);
|
|
|
|
|
});
|
|
|
|
|
$("#tabcontrol-tab-1-3").click(function(){
|
|
|
|
|
ccn_tabcontrol_SwitchTab(1, 3);
|
|
|
|
|
});
|
|
|
|
|
ccn_tabcontrol_SwitchTab(1, 1);
|
|
|
|
|
|
2021-01-19 22:20:11 +08:00
|
|
|
// apply i18n
|
2021-02-03 16:08:40 +08:00
|
|
|
ccn_i18n_LoadLanguage();
|
2021-01-19 22:20:11 +08:00
|
|
|
ccn_i18n_ApplyLanguage();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function ccn_calendar_LoadCalendarBody() {
|
2021-01-25 20:42:06 +08:00
|
|
|
$('#ccn-calendar-calendarBbody').append(ccn_template_calendarItem.render());
|
2021-01-19 22:20:11 +08:00
|
|
|
}
|
2021-02-03 16:08:40 +08:00
|
|
|
|
|
|
|
|
// ================== calendar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ================== collection
|
|
|
|
|
|
|
|
|
|
function ccn_calendar_sharing_Refresh() {
|
|
|
|
|
ccn_calendar_sharingListCache = new Array();
|
|
|
|
|
|
|
|
|
|
var result = ccn_api_collection_getFullOwn();
|
|
|
|
|
if(typeof(result) != 'undefined') {
|
|
|
|
|
for(var index in result) {
|
|
|
|
|
ccn_calendar_sharingListCache[result[index][0]] = result[index];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// render
|
|
|
|
|
$('#ccn-admin-userList').empty();
|
|
|
|
|
|
|
|
|
|
var listDOM = $('#ccn-admin-userList');
|
|
|
|
|
for(var index in ccn_admin_userListCache) {
|
|
|
|
|
ccn_admin_userList_RenderItem(
|
|
|
|
|
ccn_admin_userListCache[index],
|
|
|
|
|
index,
|
|
|
|
|
listDOM
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ccn_calendar_sharing_RenderItem() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ccn_calendar_sharingTarget_Refresh() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ccn_calendar_sharingTarget_RenderItem() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ccn_calendar_shared_Refresh() {
|
|
|
|
|
|
|
|
|
|
}
|