Changeset 457 for trunk/calendar_new/js/common_functions.js
- Timestamp:
- 09/22/08 16:44:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar_new/js/common_functions.js
r437 r457 112 112 var showDetailLink = document.createElement('a'); 113 113 showDetailLink.id = "details_" + eventDiv.id; 114 showDetailLink.href = "javascript: alert('show details');";114 showDetailLink.href = "javascript:showDetails("+eventDiv.id+");"; 115 115 showDetailLink.innerHTML = '<img onmouseover="this.setAttribute(\'width\', \'15\');"'+ 116 116 'onmouseout="this.setAttribute(\'width\', \'10\');"'+ … … 128 128 lnk2.style.visibility="visible"; 129 129 } 130 } 131 function showDetails(eventId){ 132 var handler_getDetails = function (data) 133 { 134 var xtools = new XTools; 135 var divAddDialog = document.getElementById("divAddDialog"); 136 var xsl = XMLTools.load('xsl/detailsDialog.xsl?'+ Date.parse(new Date)); 137 if(!divAddDialog) { 138 divAddDialog = document.createElement("DIV"); 139 divAddDialog.id = 'divAddDialog'; 140 divAddDialog.style.zIndex = "10"; 141 divAddDialog.style.position = "absolute"; 142 divAddDialog.style.display = "none"; 143 document.body.appendChild(divAddDialog); 144 } 145 divAddDialog.style.left = "300px"; 146 divAddDialog.style.top = "200px"; 147 divAddDialog.innerHTML = xtools.parse(data, xsl); 148 divAddDialog.style.display = "block"; 149 } 150 XMLTools.__RETURN_MODE__ = 'XML'; 151 XMLTools.request('$this.uicalendar.getDetails&id='+eventId.id.substr(6), 'GET', handler_getDetails); 130 152 } 131 153 function removeButtons(eventDiv){ … … 161 183 } 162 184 163 function quickAddEvent ( description, startTime, endTime)185 function quickAddEvent (title, startTime, endTime) 164 186 { 165 187 var endDate = new Date(); … … 178 200 var eventDiv = document.createElement('DIV'); 179 201 eventDiv.id = "event_" + serverRet.substr(6,serverRet.length); 180 eventDiv.innerHTML = description;202 eventDiv.innerHTML = title; 181 203 var endDateDiv = document.createElement('DIV'); 182 204 var startDateDiv = document.createElement('DIV'); … … 191 213 192 214 } 193 XMLTools.request('$this.uicalendar.quickAdd&start='+parseInt(id2timeStamp(startTime)/1000)+'&end='+parseInt(endDate.getTime()/1000)+'& desc='+description, 'GET', handler_quickAdd);215 XMLTools.request('$this.uicalendar.quickAdd&start='+parseInt(id2timeStamp(startTime)/1000)+'&end='+parseInt(endDate.getTime()/1000)+'&title='+title, 'GET', handler_quickAdd); 194 216 } 195 217
Note: See TracChangeset
for help on using the changeset viewer.