Add RegEx

This commit is contained in:
Alexandre Cloutier
2014-07-18 10:14:38 -04:00
parent cdf4cc1acb
commit b892b3f794
2 changed files with 7 additions and 4 deletions
@@ -544,6 +544,7 @@ vtodo_class2 = "(Confidential task)";
"DestinationCalendarError" = "The source and destination calendars are the same. Please try to copy to a different calendar.";
"EventCopyError" = "The copy failed. Please try to copy to a difference calendar.";
"Please select at least one calendar" = "Please select at least one calendar";
"An error as occurred please try again" = "An error as occurred please try again";
"Open Task..." = "Open Task...";
+6 -4
View File
@@ -3191,12 +3191,14 @@ function dropSelectedEvents(action, toId) {
if (eventIds[i].search(toId+"-") == -1) {
var x = eventIds[i].indexOf('-');
if (eventIds[i].indexOf('-') == 4) {
fromId = eventIds[i].substr(0,25);
eventICS = eventIds[i].substr(26);
var regEx = new RegExp(/\w+\-\w+\-\w+\-\w+/);
var fromId = regEx.exec(eventIds[i]);
var eventICS = eventIds[i].substr(fromId[0].length + 1);
}
else {
fromId = eventIds[i].substr(0, x);
eventICS = eventIds[i].slice(x + 1);
var regEx = new RegExp(/\w+/);
var fromId = regEx.exec(eventIds[i]);
var eventICS = eventIds[i].substr(fromId[0].length + 1);
}
var destinationCalendar = "destination=" + toId;
var params = destinationCalendar + "&days=0&start=0&duration=0";