Changeset 1510
- Timestamp:
- 08/11/07 23:56:26
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/default/default/default.xsl
r1508 r1510 1667 1667 </select> 1668 1668 <xsl:text> </xsl:text> 1669 1669 1670 1670 <select name="tzid" id="rdateTzid" class="timezones"> 1671 1671 <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> … … 1696 1696 store as UTC 1697 1697 </div> 1698 1698 1699 1699 <!-- if there are no recurence dates, the following table will show --> 1700 <table cellspacing="0" id="bwCurrentRdates ">1700 <table cellspacing="0" id="bwCurrentRdatesNone"> 1701 1701 <tr><th>Recurrence Dates</th></tr> 1702 1702 <tr><td>No recurrence dates</td></tr> 1703 1703 </table> 1704 1704 1705 1705 <!-- if there are no recurence dates, the following table will show --> 1706 1706 <table cellspacing="0" id="bwCurrentRdates"> … … 1715 1715 </tr> 1716 1716 </table> 1717 1717 1718 1718 <!-- if there are no recurence dates, the following table will show --> 1719 1719 <table cellspacing="0" id="bwCurrentExdatesNone"> … … 1721 1721 <tr><td>No exception dates</td></tr> 1722 1722 </table> 1723 1723 1724 1724 <!-- if there are no recurence dates, the following table will show --> 1725 1725 <table cellspacing="0" id="bwCurrentExdates"> … … 5128 5128 </table> 5129 5129 </form> 5130 5130 5131 5131 <div id="sharingBox"> 5132 5132 <xsl:apply-templates select="acl" mode="currentAccess"> … … 5243 5243 <xsl:when test="contains($who,/bedeworkadmin/syspars/userPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedeworkadmin/syspars/userPrincipalRoot)),'/')"/></xsl:when> 5244 5244 <xsl:when test="contains($who,/bedeworkadmin/syspars/groupPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedeworkadmin/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 5245 <xsl:otherwise></xsl:otherwise> 5245 <xsl:otherwise></xsl:otherwise> 5246 5246 </xsl:choose> 5247 5247 </xsl:variable> trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js
r1508 r1510 59 59 } 60 60 61 /* row: current table row 61 /* varName: NOT GOOD - name of object 62 * reqPar: request par for hidden field 63 * row: current table row 62 64 * rdi: index of rdate fro delete 63 65 */ 64 this.toFormRow = function( reqPar, row, rdi) {66 this.toFormRow = function(varName, reqPar, row, rdi) { 65 67 row.insertCell(0).appendChild(document.createTextNode(this.date)); 66 68 row.insertCell(1).appendChild(document.createTextNode(this.time)); 67 69 row.insertCell(2).appendChild(document.createTextNode(this.tzid)); 68 row.insertCell(3).innerHTML = "<a href=\"javascript: bwRdates.deleteRdate('" +70 row.insertCell(3).innerHTML = "<a href=\"javascript:" + varName + ".deleteDate('" + 69 71 rdi + "')\">" + rdateDeleteStr + "</a>" + 70 "<input type='hidden' name='" + reqPar + 72 "<input type='hidden' name='" + reqPar + 71 73 "' value='" + this.format() + "'/>"; 72 74 } 73 75 74 76 this.format= function() { 75 77 var res = this.date + "\t" + this.time + "\t"; 76 78 77 79 if (this.tzid != null) { 78 80 res += "\t" + this.tzid; 79 81 } 80 82 81 83 return res; 82 84 } 83 85 84 86 this.equals = function(that) { 85 return (that.val = this.val) && (that.tzid = this.tzid); 86 } 87 } 88 89 var bwRdates = new BwREXdates("rdate", "bwCurrentRdates", "bwCurrentRdatesNone", "visible", "invisible", 2); 90 var bwExdates = new BwREXdates("exdate", "bwCurrentExdates", "bwCurrentExdatesNone", "visible", "invisible", 2); 91 92 function BwREXdates(reqPar, tableId, noDatesId, visibleClass, invisibleClass, numHeaderRows) { 93 var rdates = new Array(); 94 87 return this.compareTo(that) == 0; 88 } 89 90 this.compareTo = function(that) { 91 var res = compareTo(that.date, this.date); 92 if (res != 0) { 93 return res; 94 } 95 96 res = compareTo(that.time, this.time); 97 if (res != 0) { 98 return res; 99 } 100 101 return compareTo(that.tzid, this.tzid); 102 } 103 } 104 105 function compareTo(thys, that) { 106 if (that < thys) { 107 return -1; 108 } 109 110 if (that > thys) { 111 return 1; 112 } 113 114 return 0; 115 } 116 117 function sortCompare(thys, that) { 118 return thys.compareTo(that); 119 } 120 121 var bwRdates = new BwREXdates("bwRdates", "rdate", "bwCurrentRdates", "bwCurrentRdatesNone", 122 "visible", "invisible", 2); 123 var bwExdates = new BwREXdates("bwExdates", "exdate", "bwCurrentExdates", "bwCurrentExdatesNone", 124 "visible", "invisible", 2); 125 126 /** Manipulate table of exception or recurrence dates. 127 * 128 * @param varName: NOT GOOD - name of object 129 * @param reqPar: request parameter we gernate (multi-valued) 130 * @param tableId: id of table we are manipulating 131 * @param noDatesId: some info to display when we have nothing 132 * @param visibleClass: class to set to make something visible 133 * @param invisibleClass: class to set to make something invisible 134 * @param numHeaderRows: Number of header rows in the table. 135 */ 136 function BwREXdates(varName, reqPar, tableId, noDatesId, 137 visibleClass, invisibleClass, numHeaderRows) { 138 var dates = new Array(); 139 140 this.varName = varName; 95 141 this.reqPar = reqPar; 96 142 this.tableId = tableId; 143 this.noDatesId = noDatesId; 144 this.visibleClass = visibleClass; 145 this.invisibleClass = invisibleClass; 146 this.numHeaderRows = numHeaderRows; 97 147 98 148 /* val: String: internal date … … 104 154 105 155 if (!this.contains(newRdate)) { 106 rdates.push(newRdate);156 dates.push(newRdate); 107 157 } 108 158 } 109 159 110 160 this.contains = function(rdate) { 111 for (var j = 0; j < rdates.length; j++) {112 var curRdate = rdates[j];161 for (var j = 0; j < dates.length; j++) { 162 var curRdate = dates[j]; 113 163 if (curRdate.equals(rdate)) { 114 164 return true; … … 119 169 } 120 170 121 // Update the list - expects the browser form object171 // Update the list - 122 172 this.update = function(date, time, allDay, floating, utc, tzid) { 123 173 this.addRdate(date, time, allDay, floating, utc, tzid); … … 127 177 } 128 178 129 this.delete Rdate = function(index) {130 rdates.splice(index, 1);179 this.deleteDate = function(index) { 180 dates.splice(index, 1); 131 181 132 182 // redraw the display … … 138 188 try { 139 189 // get the table body 140 var rdTableBody = document.getElementById(t his.tableId).tBodies[0];190 var rdTableBody = document.getElementById(tableId).tBodies[0]; 141 191 142 192 // remove existing rows 143 for (i = rdTableBody.rows.length - 1; i >= 0; i--) {193 for (i = rdTableBody.rows.length - 1; i >= numHeaderRows; i--) { 144 194 rdTableBody.deleteRow(i); 145 195 } 146 196 197 dates.sort(sortCompare); 198 147 199 // recreate the table rows 148 for (var j = 0; j < rdates.length; j++) { 149 var curRdate = rdates[j]; 150 var tr = rdTableBody.insertRow(j); 151 152 curRdate.toFormRow(this.reqPar, tr, j); 200 for (var j = 0; j < dates.length; j++) { 201 var curRdate = dates[j]; 202 var tr = rdTableBody.insertRow(j + numHeaderRows); 203 204 curRdate.toFormRow(varName, reqPar, tr, j); 205 } 206 207 if (dates.length == 0) { 208 changeClass(tableId, invisibleClass); 209 changeClass(noDatesId, visibleClass); 210 } else { 211 changeClass(tableId, visibleClass); 212 changeClass(noDatesId, invisibleClass); 153 213 } 154 214 } catch (e) { … … 164 224 setDates(formObj); 165 225 setRecurrence(formObj); 226 setAccessHow(formObj,1); 227 //setAccessAcl(formObj); 166 228 } 167 229 function setDates(formObj) {
