2021-01-24 14:38:08 +08:00
|
|
|
var ccn_template_headerNav = undefined;
|
2021-01-30 17:30:28 +08:00
|
|
|
var ccn_template_messagebox = undefined;
|
2021-01-24 14:38:08 +08:00
|
|
|
var ccn_template_calendarItem = undefined;
|
|
|
|
|
var ccn_template_scheduleItem = undefined;
|
2021-02-05 17:07:20 +08:00
|
|
|
var ccn_template_ownedItem = undefined;
|
2021-02-03 16:08:40 +08:00
|
|
|
var ccn_template_sharingItem = undefined;
|
2021-02-08 16:22:04 +08:00
|
|
|
var ccn_template_displayOwnedItem = undefined;
|
|
|
|
|
var ccn_template_displaySharedItem = undefined;
|
2021-01-24 14:38:08 +08:00
|
|
|
var ccn_template_userItem = undefined;
|
|
|
|
|
var ccn_template_todoItem = undefined;
|
2021-02-08 22:30:01 +08:00
|
|
|
var ccn_template_optionItem = undefined;
|
2021-01-24 14:38:08 +08:00
|
|
|
|
|
|
|
|
function ccn_template_Load() {
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-headerNav").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_headerNav = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-01-30 17:30:28 +08:00
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-messagebox").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_messagebox = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-01-24 14:38:08 +08:00
|
|
|
|
|
|
|
|
switch(ccn_pages_currentPage) {
|
|
|
|
|
case ccn_pages_enumPages.home:
|
|
|
|
|
break;
|
|
|
|
|
case ccn_pages_enumPages.calendar:
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-calendarItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_calendarItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-scheduleItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_scheduleItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-02-03 16:08:40 +08:00
|
|
|
$.ajax({
|
2021-02-08 16:22:04 +08:00
|
|
|
url: $("#jsrender-tmpl-displayOwnedItem").attr('src'),
|
2021-02-03 16:08:40 +08:00
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
2021-02-08 16:22:04 +08:00
|
|
|
ccn_template_displayOwnedItem = $.templates(data);
|
2021-02-03 16:08:40 +08:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$.ajax({
|
2021-02-08 16:22:04 +08:00
|
|
|
url: $("#jsrender-tmpl-displaySharedItem").attr('src'),
|
2021-02-03 16:08:40 +08:00
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
2021-02-08 16:22:04 +08:00
|
|
|
ccn_template_displaySharedItem = $.templates(data);
|
2021-02-03 16:08:40 +08:00
|
|
|
}
|
|
|
|
|
});
|
2021-01-24 14:38:08 +08:00
|
|
|
break;
|
|
|
|
|
case ccn_pages_enumPages.todo:
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-todoItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_todoItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case ccn_pages_enumPages.admin:
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-userItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_userItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case ccn_pages_enumPages.login:
|
|
|
|
|
break;
|
2021-02-08 16:22:04 +08:00
|
|
|
case ccn_pages_enumPages.collection:
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-ownedItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_ownedItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-sharingItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_sharingItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case ccn_pages_enumPages.event:
|
2021-02-08 22:30:01 +08:00
|
|
|
$.ajax({
|
|
|
|
|
url: $("#jsrender-tmpl-optionItem").attr('src'),
|
|
|
|
|
type: "GET",
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
ccn_template_optionItem = $.templates(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
2021-01-24 14:38:08 +08:00
|
|
|
}
|
|
|
|
|
}
|