diff options
author | B. Stack <bgstack15@gmail.com> | 2022-08-11 10:51:14 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-08-11 10:51:14 -0400 |
commit | fd362c6b8acc3e37a18da075fde655df7cd87ebb (patch) | |
tree | a8e98c68a8b1f497824a85486975c4fb38ce25af /radicale_infcloud | |
parent | WIP: uploaded event is visible but not clickable (diff) | |
download | radicaleinfcloud-fd362c6b8acc3e37a18da075fde655df7cd87ebb.tar.gz radicaleinfcloud-fd362c6b8acc3e37a18da075fde655df7cd87ebb.tar.bz2 radicaleinfcloud-fd362c6b8acc3e37a18da075fde655df7cd87ebb.zip |
WIP: newEvent has full UID now
But the globalEventList.events[rid] still does not have this entry.
Somehow I still need to add the new event to that!
Diffstat (limited to 'radicale_infcloud')
-rw-r--r-- | radicale_infcloud/web/data_process.js | 9 | ||||
-rw-r--r-- | radicale_infcloud/web/forms.js | 2 | ||||
-rw-r--r-- | radicale_infcloud/web/interface.js | 9 | ||||
-rw-r--r-- | radicale_infcloud/web/webdav_protocol.js | 6 |
4 files changed, 16 insertions, 10 deletions
diff --git a/radicale_infcloud/web/data_process.js b/radicale_infcloud/web/data_process.js index e71f23e..3862e73 100644 --- a/radicale_infcloud/web/data_process.js +++ b/radicale_infcloud/web/data_process.js @@ -7886,9 +7886,9 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew) vcalendar=vcalendar.replace(vcalendar_element[0],''); */ var recurrence_id_array=new Array(); - /* FINDTHIS matching for BEGIN:VEVENT */ - // this one works, but has 3 replace calls! - vcalendarOrig = vcalendarOrig.replace(/^\n/gm,'').replace('\n','\r\n').replace(/\r*\n/gm,'\r\n'); + /* FINDTHIS matching for BEGIN:VEVENT */ + // this one works, but has 3 replace calls! + vcalendarOrig = vcalendarOrig.replace(/^\n/gm,'').replace('\n','\r\n').replace(/\r*\n/gm,'\r\n'); while(vcalendarOrig.match(vCalendar.pre['vevent'])!=null) { if(vcalendarOrig.substring(vcalendarOrig.indexOf('BEGIN:VEVENT')-2, vcalendarOrig.indexOf('BEGIN:VEVENT'))=='\r\n') @@ -8524,6 +8524,7 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew) } var repeatCount=0, realRepeatCount=0; + //if(!inputEvent.isDrawn) if(true) { if(alertTime.length>0) @@ -8575,6 +8576,6 @@ function stringToVevent(inputCollection, vstring, uid, etag, isNew) } } //inputEvent.isDrawn=true; - return tmpObj; + return tmpObj; } /* END stackrpms functions */ diff --git a/radicale_infcloud/web/forms.js b/radicale_infcloud/web/forms.js index 4fd8d6b..2cb5612 100644 --- a/radicale_infcloud/web/forms.js +++ b/radicale_infcloud/web/forms.js @@ -58,7 +58,7 @@ function dropHandler(event) { //dataToVcalendar('EDIT' var calEvent = uploadFile(reader.result); // This lets it appear right away, but it is still not clickable. - console.log(`Using {newEvent.id} as uid`); + console.log(`Using ${newEvent.id} as uid`); $('#uid').val(calEvent.id); $('#etag').val(calEvent.etag); refetchCalendarEvents(); diff --git a/radicale_infcloud/web/interface.js b/radicale_infcloud/web/interface.js index da298a6..7f9b06f 100644 --- a/radicale_infcloud/web/interface.js +++ b/radicale_infcloud/web/interface.js @@ -1327,10 +1327,11 @@ function uploadFile(fileContents) //refetchCalendarEvents(); //rerenderCalendar(true); //dataToVcalendar('EDIT',origUID, inputUID, $('#etag').val(), '', isFormHidden, deleteMode); - putVcalendarToCollection(coll.accountUID, inputUID, "", fileContents, "", 'vevent', false, false, ""); - // If this newUID were instead the etag (which is internal to putVcalendarToCollection), the new event would be - // immediately clickable! - newEvent.id = inputUID + newUID + ".ics"; + // When returnFullUID is true (last parameter), it returns "http://username@server/radicale/username/CALID/hex.ics" + // But unfortunately the globalEventList.events[rid] still does not populate with this. + //newEvent.id = inputUID + newUID + ".ics"; + newEvent.id = putVcalendarToCollection(coll.accountUID, inputUID, "", fileContents, "", 'vevent', false, false, "", true); + console.log("FINDTHIS"); return newEvent; } /* STOP stackrpms */ diff --git a/radicale_infcloud/web/webdav_protocol.js b/radicale_infcloud/web/webdav_protocol.js index 285c0b7..b2b8efc 100644 --- a/radicale_infcloud/web/webdav_protocol.js +++ b/radicale_infcloud/web/webdav_protocol.js @@ -2319,7 +2319,7 @@ function moveVcalendarToCollection(accountUID, inputUID, inputEtag, inputVcalend }); } -function putVcalendarToCollection(accountUID, inputUID, inputEtag, inputVcalendar, delUID,inputForm,isFormHidden,deleteMode,textArray) +function putVcalendarToCollection(accountUID, inputUID, inputEtag, inputVcalendar, delUID,inputForm,isFormHidden,deleteMode,textArray,returnFullUID) { var resultTimestamp=new Date().getTime(); if(inputForm=='vtodo') @@ -2574,6 +2574,10 @@ function putVcalendarToCollection(accountUID, inputUID, inputEtag, inputVcalenda return true; } }); + if(returnFullUID) + { + return inputUID; + } } /* |