nightly commit
This commit is contained in:
@@ -49,6 +49,7 @@ ccn-calendar-shared-list=Shared
|
||||
ccn-calendar-sharing-ownedList=Owned
|
||||
ccn-calendar-sharing-sharingTargetList=Sharing target
|
||||
ccn-calendar-sharing-sharingTargetEditing=Editing:
|
||||
ccn-calendar-sharedItem-sharedBy=Shared by:
|
||||
|
||||
ccn-admin-tabcontrol-tabProfile=My Profile
|
||||
ccn-admin-tabcontrol-tabUserList=Manager User
|
||||
|
||||
@@ -49,6 +49,7 @@ ccn-calendar-shared-list=被共享的集合
|
||||
ccn-calendar-sharing-ownedList=我的集合
|
||||
ccn-calendar-sharing-sharingTargetList=分享目标
|
||||
ccn-calendar-sharing-sharingTargetEditing=正在编辑集合:
|
||||
ccn-calendar-sharedItem-sharedBy=共享人:
|
||||
|
||||
ccn-admin-tabcontrol-tabProfile=我的资料
|
||||
ccn-admin-tabcontrol-tabUserList=管理用户
|
||||
|
||||
@@ -66,7 +66,7 @@ function ccn_admin_userList_RefreshCacheList() {
|
||||
}
|
||||
}
|
||||
|
||||
function ccn_admin_userList_RenderItem(item, index, listDOM, renderdata) {
|
||||
function ccn_admin_userList_RenderItem(item, index, listDOM) {
|
||||
var renderdata = {
|
||||
uuid: index, // use index for uuid. there are no uuid for user
|
||||
username: item[0]
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
// 3 used cache list
|
||||
var ccn_calendar_sharingListCache = [];
|
||||
var ccn_calendar_sharingTargetListCache = [];
|
||||
var ccn_calendar_sharedListCache = [];
|
||||
|
||||
// current editing sharing collection
|
||||
var ccn_calendar_editingSharing = undefined; // the uuid of owned collection
|
||||
|
||||
// 2 list which will store sharing and shared collection's display mode.
|
||||
// key is uuid, value is bool
|
||||
var ccn_calendar_sharing_displayCache = [];
|
||||
var ccn_calendar_shared_displayCache = [];
|
||||
|
||||
$(document).ready(function() {
|
||||
ccn_pages_currentPage = ccn_pages_enumPages.calendar;
|
||||
|
||||
@@ -48,39 +57,216 @@ function ccn_calendar_LoadCalendarBody() {
|
||||
|
||||
function ccn_calendar_sharing_Refresh() {
|
||||
ccn_calendar_sharingListCache = new Array();
|
||||
ccn_calendar_sharing_displayCache = 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];
|
||||
ccn_calendar_sharing_displayCache[result[index][0]] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// render
|
||||
$('#ccn-admin-userList').empty();
|
||||
$('#ccn-calendar-sharingList').empty();
|
||||
|
||||
var listDOM = $('#ccn-admin-userList');
|
||||
var listDOM = $('#ccn-calendar-sharingList');
|
||||
for(var index in ccn_calendar_sharingListCache) {
|
||||
ccn_admin_userList_RenderItem(
|
||||
ccn_calendar_sharingListCache[index],
|
||||
listDOM
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function ccn_calendar_sharing_RenderItem(item, listDOM) {
|
||||
var renderdata = {
|
||||
uuid: item[0],
|
||||
name: item[1]
|
||||
}
|
||||
|
||||
// render
|
||||
listDOM.append(ccn_template_sharingItem.render(renderdata));
|
||||
|
||||
// set mode
|
||||
var uuid = renderdata.uuid;
|
||||
ccn_calendar_sharing_ChangeDisplayMode(uuid, true, false);
|
||||
|
||||
// bind event
|
||||
$('#ccn-calendar-sharingItem-btnEdit-' + uuid).click(ccn_calendar_sharingList_ItemEdit);
|
||||
$('#ccn-calendar-sharingItem-btnDelete-' + uuid).click(ccn_calendar_sharingList_ItemDelete);
|
||||
$('#ccn-calendar-sharingItem-btnShare-' + uuid).click(ccn_calendar_sharingList_ItemShare);
|
||||
$('#ccn-calendar-sharingItem-btnHide-' + uuid).click(ccn_calendar_sharingList_ItemSwitchDisplay);
|
||||
$('#ccn-calendar-sharingItem-btnShow-' + uuid).click(ccn_calendar_sharingList_ItemSwitchDisplay);
|
||||
$('#ccn-calendar-sharingItem-btnUpdate-' + uuid).click(ccn_calendar_sharingList_ItemUpdate);
|
||||
$('#ccn-calendar-sharingItem-btnCancelUpdate-' + uuid).click(ccn_calendar_sharingList_ItemCancelUpdate);
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharing_ChangeDisplayMode(uuid, isShow, isEdit) {
|
||||
if (typeof(isShow) != 'undefined') {
|
||||
if (isShow) {
|
||||
$('#ccn-calendar-sharingItem-btnHide-' + uuid).show();
|
||||
$('#ccn-calendar-sharingItem-btnShow-' + uuid).hide();
|
||||
} else {
|
||||
$('#ccn-calendar-sharingItem-btnHide-' + uuid).hide();
|
||||
$('#ccn-calendar-sharingItem-btnShow-' + uuid).show();
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof(isEdit) != 'undefined') {
|
||||
if (isEdit) {
|
||||
$('#ccn-calendar-sharingItem-btnEdit-' + uuid).hide();
|
||||
$('#ccn-calendar-sharingItem-btnShare-' + uuid).hide();
|
||||
$('#ccn-calendar-sharingItem-btnDelete-' + uuid).hide();
|
||||
|
||||
$('#ccn-calendar-sharingItem-btnUpdate-' + uuid).show();
|
||||
$('#ccn-calendar-sharingItem-btnCancelUpdate-' + uuid).show();
|
||||
|
||||
$('#ccn-admin-userItem-textName-' + uuid).hide();
|
||||
$('#ccn-admin-userItem-boxName-' + uuid).show();
|
||||
} else {
|
||||
$('#ccn-calendar-sharingItem-btnEdit-' + uuid).show();
|
||||
$('#ccn-calendar-sharingItem-btnShare-' + uuid).show();
|
||||
$('#ccn-calendar-sharingItem-btnDelete-' + uuid).show();
|
||||
|
||||
$('#ccn-calendar-sharingItem-btnUpdate-' + uuid).hide();
|
||||
$('#ccn-calendar-sharingItem-btnCancelUpdate-' + uuid).hide();
|
||||
|
||||
$('#ccn-admin-userItem-textName-' + uuid).show();
|
||||
$('#ccn-admin-userItem-boxName-' + uuid).hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function ccn_calendar_sharingTarget_Refresh() {
|
||||
ccn_calendar_sharingTargetListCache = new Array();
|
||||
|
||||
if (typeof(ccn_calendar_editingSharing) != 'undefined') {
|
||||
var result = ccn_api_collection_getSharing(ccn_calendar_editingSharing);
|
||||
if (typeof(result) != 'undefined') {
|
||||
for(var index in result) {
|
||||
ccn_calendar_sharingTargetListCache[index] = result[index];
|
||||
// also, sharingTarget don't have uuid, use index instead
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var listDOM = $('#ccn-calendar-sharingTargetList');
|
||||
listDOM.empty();
|
||||
for(var index in ccn_admin_userListCache) {
|
||||
ccn_admin_userList_RenderItem(
|
||||
ccn_admin_userListCache[index],
|
||||
ccn_calendar_sharingTargetListCache[index],
|
||||
index,
|
||||
listDOM
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function ccn_calendar_sharing_RenderItem() {
|
||||
function ccn_calendar_sharingTarget_RenderItem(item, index, listDOM) {
|
||||
var renderdata = {
|
||||
uuid: index,
|
||||
username: item
|
||||
}
|
||||
|
||||
// render
|
||||
listDOM.append(ccn_template_sharingTargetItem.render(renderdata));
|
||||
|
||||
// bind event
|
||||
var uuid = index;
|
||||
$("#ccn-calendar-sharingTargetItem-btnDelete-" + uuid).click(ccn_calendar_sharingTargetList_ItemDelete);
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingTarget_Refresh() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingTarget_RenderItem() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_shared_Refresh() {
|
||||
ccn_calendar_sharedListCache = new Array();
|
||||
ccn_calendar_shared_displayCache = new Array();
|
||||
|
||||
var result = ccn_api_collection_getShared();
|
||||
if (typeof(result) != 'undefined') {
|
||||
for(var index in result) {
|
||||
ccn_calendar_sharedListCache[result[index][0]] = result[index];
|
||||
ccn_calendar_shared_displayCache[result[index][0]] = true;
|
||||
}
|
||||
}
|
||||
|
||||
var renderdata = {
|
||||
uuid: undefined,
|
||||
name: undefined,
|
||||
username: undefined
|
||||
}
|
||||
|
||||
var listDOM = $('#ccn-calendar-sharedList');
|
||||
listDOM.empty();
|
||||
for(var index in ccn_calendar_sharedListCache) {
|
||||
var item = ccn_calendar_sharedListCache[index];
|
||||
renderdata.uuid = item[0];
|
||||
renderdata.name = item[1];
|
||||
renderdata.username = item[2];
|
||||
|
||||
listDOM.append(ccn_template_sharedItem.render(renderdata));
|
||||
|
||||
// bind event
|
||||
var uuid = renderdata.uuid;
|
||||
$('#ccn-admin-userItem-btnHide-' + uuid).click(ccn_calendar_sharedList_ItemSwitchDisplay);
|
||||
$('#ccn-admin-userItem-btnShow-' + uuid).click(ccn_calendar_sharedList_ItemSwitchDisplay);
|
||||
}
|
||||
|
||||
ccn_i18n_ApplyLanguage2Content(listDOM);
|
||||
}
|
||||
|
||||
function ccn_calendar_shared_ChangeDisplayMode(uuid, isShow) {
|
||||
if (isShow) {
|
||||
$('#ccn-admin-userItem-btnHide-' + uuid).show();
|
||||
$('#ccn-admin-userItem-btnShow-' + uuid).hide();
|
||||
} else {
|
||||
$('#ccn-admin-userItem-btnHide-' + uuid).hide();
|
||||
$('#ccn-admin-userItem-btnShow-' + uuid).show();
|
||||
}
|
||||
}
|
||||
|
||||
// ========================= input operation
|
||||
|
||||
function ccn_calendar_sharingList_Add() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingList_ItemEdit() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingList_ItemDelete() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingList_ItemUpdate() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingList_ItemCancelUpdate() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingList_ItemSwitchDisplay() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingList_ItemShare() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ccn_calendar_sharingTargetList_Add() {
|
||||
|
||||
}
|
||||
|
||||
function ccn_calendar_sharingTargetList_ItemDelete() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
function ccn_calendar_sharedList_ItemSwitchDisplay() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<div class="collection-item card">
|
||||
<div id="ccn-calendar-sharedItem-{{:uuid}}" class="collection-item card">
|
||||
<div class="collection-item-words">
|
||||
<b>this is a
|
||||
namewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</b>
|
||||
<p><span>Shared by: </span><span>Diablo</span></p>
|
||||
<b>{{>name}}</b>
|
||||
<p>
|
||||
<span i18n-name="ccn-calendar-sharedItem-sharedBy"></span>
|
||||
<span>{{>username}}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-admin-userItem-btnHide-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-eye"></i></span></a>
|
||||
</div>
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-admin-userItem-btnShow-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-eye-slash"></i></span></a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,20 +1,30 @@
|
||||
<div class="collection-item card">
|
||||
<div id="ccn-calendar-sharingItem-{{:uuid}}" class="collection-item card">
|
||||
<div class="collection-item-words">
|
||||
<p>this is a
|
||||
namewwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
|
||||
</p>
|
||||
<p id="ccn-admin-userItem-textName-{{:uuid}}">{{>name}}</p>
|
||||
<div id="ccn-admin-userItem-boxName-{{:uuid}}" class="control">
|
||||
<input id="ccn-admin-userItem-inputName-{{:uuid}}" class="input" type="text"></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-calendar-sharingItem-btnEdit-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-pen"></i></span></a>
|
||||
</div>
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-calendar-sharingItem-btnShare-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-share"></i></a>
|
||||
</div>
|
||||
<div id="ccn-calendar-sharingItem-btnDelete-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-calendar-sharingItem-btnHide-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-eye"></i></span></a>
|
||||
</div>
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-calendar-sharingItem-btnShow-{{:uuid}}" uuid="{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-eye-slash"></i></span></a>
|
||||
</div>
|
||||
<div id="ccn-calendar-sharingItem-btnUpdate-{{:uuid}}" uuid="{{:uuid}}" class="todo-item-icon control">
|
||||
<button class="button"><span class="icon is-small"><i class="fas fa-check"></i></span></button>
|
||||
</div>
|
||||
<div id="ccn-calendar-sharingItem-btnCancelUpdate-{{:uuid}}" uuid="{{:uuid}}" class="todo-item-icon control">
|
||||
<button class="button"><span class="icon is-small"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="collection-item card">
|
||||
<div id="ccn-calendar-sharingTargetItem-{{:uuid}}" class="collection-item card">
|
||||
<div class="collection-item-words">
|
||||
<p>boluo</p>
|
||||
<p>{{>username}}</p>
|
||||
</div>
|
||||
|
||||
<div class="collection-item-icon control">
|
||||
<div id="ccn-calendar-sharingTargetItem-btnDelete-{{:uuid}}" class="collection-item-icon control">
|
||||
<a class="button"><span class="icon is-small"><i class="fas fa-trash"></i></span></a>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user