Changeset 1848
- Timestamp:
- 04/21/08 10:20:25
- Files:
-
- trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js (modified) (1 diff)
- trunk/deployment/webadmin/webapp/resources/resources/bedeworkXProperties.js (modified) (4 diffs)
- trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl (modified) (5 diffs)
- trunk/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkEventForm.js (modified) (2 diffs)
- trunk/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkXProperties.js (modified) (4 diffs)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkEventForm.js (modified) (1 diff)
- trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkXProperties.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webadmin/webapp/resources/resources/bedeworkEventForm.js
r1841 r1848 339 339 formObj["eventEndDate.month"].value = endDate.getMonth() + 1; 340 340 formObj["eventEndDate.day"].value = endDate.getDate(); 341 } 342 function setBedeworkXProperties(formObj,submitter) { 343 // set up specific Bedework X-Properties on event form submission 344 // Depends on bedeworkXProperties.js 345 // Set application local x-properties here. 346 347 // X-BEDEWORK-IMAGE and its parameters: 348 if (formObj["xBwImageHolder"] && formObj["xBwImageHolder"].value != '') { 349 bwXProps.update(bwXPropertyImage,[[bwXParamDescription,''],[bwXParamWidth,''],[bwXParamHeight,'']],formObj["xBwImageHolder"].value,true); 350 } 351 // X-BEDEWORK-SUBMITTEDBY 352 bwXProps.update(bwXPropertySubmittedBy,[],submitter,true); 353 354 // commit all xproperties back to the form 355 bwXProps.generate(formObj); 341 356 } 342 357 function swapAllDayEvent(obj) { trunk/deployment/webadmin/webapp/resources/resources/bedeworkXProperties.js
r1843 r1848 38 38 var bwXPropertySubmittedBy = "X-BEDEWORK-SUBMITTEDBY"; 39 39 var bwXPropertySubmitComment = "X-BEDEWORK-SUBMIT-COMMENT"; 40 40 var bwXParamLocationAddress = "X-BEDEWORK-PARAM-LOCATION-ADDRESS"; 41 var bwXParamLocationSubAddress = "X-BEDEWORK-PARAM-LOCATION-SUBADDRESS"; 42 var bwXParamLocationURL = "X-BEDEWORK-PARAM-LOCATION-URL"; 43 var bwXParamContactName = "X-BEDEWORK-PARAM-CONTACT-NAME"; 44 var bwXParamContactPhone = "X-BEDEWORK-PARAM-CONTACT-PHONE"; 45 var bwXParamContactURL = "X-BEDEWORK-PARAM-CONTACT-URL"; 46 var bwXParamContactEmail = "X-BEDEWORK-PARAM-CONTACT-EMAIL"; 47 var bwXParamCategories = "X-BEDEWORK-PARAM-CATEGORIES"; 41 48 42 49 // ======================================================================== … … 61 68 if (this.params.length) { 62 69 for (var i = 0; i < this.params.length; i++) { 63 curXparams += ";" + this.params[i][0] + "=" + this.params[i][1]; 70 if (this.params[i][1] != "") { 71 curXparams += ";" + this.params[i][0] + "=\"" + this.params[i][1] + "\""; 72 } 64 73 } 65 74 } … … 77 86 78 87 this.update = function(name, params, value, isUnique) { 88 // strip out any double quotes in the parameter values: 89 if (params.length) { 90 for (var i = 0; i < params.length; i++) { 91 var strippedParamValue = ""; 92 for (var j = 0; j < params[i][1].length; j++) { 93 var c = params[i][1][j]; 94 if (c != '"') { 95 strippedParamValue += c; 96 } 97 } 98 params[i][1] = strippedParamValue; 99 } 100 } 101 // add or update the xproperty: 79 102 var xprop = new BwXProperty(name, params, value); 80 103 if (isUnique && this.contains(name)) { … … 117 140 118 141 } 119 120 function setBedeworkXProperties(formObj,submitter) {121 // set up specific Bedework X-Properties on event form submission122 123 // X-BEDEWORK-IMAGE and its parameters:124 if (formObj["xBwImageHolder"] && formObj["xBwImageHolder"].value != '') {125 bwXProps.update(bwXPropertyImage,[[bwXParamDescription,''],[bwXParamWidth,''],[bwXParamHeight,'']],formObj["xBwImageHolder"].value,true);126 }127 // X-BEDEWORK-SUBMITTEDBY128 bwXProps.update(bwXPropertySubmittedBy,[],submitter,true);129 130 // commit all xproperties back to the form131 bwXProps.generate(formObj);132 }trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl
r1841 r1848 105 105 </head> 106 106 <body> 107 <xsl:if test="/bedework/page = 'editEvent' and 108 normalize-space(/bedework/formElements/form/xproperties/xproperty[@name='X-BEDEWORK-SUBMIT-COMMENT']/value) != ''"> 109 <xsl:attribute name="onload">initRXDates();initXProperties();getComments('standardForm','<xsl:value-of select="/bedework/formElements/form/xproperties/xproperty[@name='X-BEDEWORK-SUBMIT-COMMENT']/value"/>');</xsl:attribute> 107 <xsl:if test="/bedework/page = 'editEvent'"> 108 <xsl:attribute name="onload">initRXDates();initXProperties();</xsl:attribute> 110 109 </xsl:if> 111 110 <div id="bedework"><!-- main wrapper div --> … … 906 905 <p> 907 906 <label for="commentLocationAddress">Address: </label> 908 <input type="text" name="commentLocationAddress" id="bwCommentLocationAddress"/> 907 <input type="text" name="commentLocationAddress" id="bwCommentLocationAddress"> 908 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-LOCATION-ADDRESS']"/></xsl:attribute> 909 </input> 909 910 </p> 910 911 <p> 911 <label for="commentLocationSubaddress"><em>Sub-address:</em> </label><input type="text" name="commentLocationSubaddress"/> 912 <label for="commentLocationSubaddress"><em>Sub-address:</em> </label> 913 <input type="text" name="commentLocationSubaddress" id="commentLocationSubaddress"> 914 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-LOCATION-SUBADDRESS']"/></xsl:attribute> 915 </input> 912 916 <span class="note"> optional</span> 913 917 </p> 914 918 <p> 915 <label for="commentLocationURL"><em>URL:</em> </label><input type="text" name="commentLocationURL"/> 919 <label for="commentLocationURL"><em>URL:</em> </label> 920 <input type="text" name="commentLocationURL" id="commentLocationURL"> 921 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-LOCATION-URL']"/></xsl:attribute> 922 </input> 916 923 <span class="note"> optional</span> 917 924 </p> … … 937 944 <p> 938 945 <label for="commentContactName">Organization Name: </label> 939 <input type="text" name="commentContactName" id="bwCommentContactName" size="40"/> 946 <input type="text" name="commentContactName" id="bwCommentContactName" size="40"> 947 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-NAME']"/></xsl:attribute> 948 </input> 940 949 <span class="note"> Please limit contacts to organizations, not individuals.</span> 941 950 </p> 942 951 <p> 943 <label for="commentContactPhone"><em>Phone:</em> </label><input type="text" name="commentContactPhone"/> 952 <label for="commentContactPhone"><em>Phone:</em> </label> 953 <input type="text" name="commentContactPhone"> 954 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-PHONE']"/></xsl:attribute> 955 </input> 944 956 <span class="note"> optional</span> 945 957 </p> 946 958 <p> 947 <label for="commentContactURL"><em>URL:</em> </label><input type="text" name="commentContactURL"/> 959 <label for="commentContactURL"><em>URL:</em> </label> 960 <input type="text" name="commentContactURL"> 961 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-URL']"/></xsl:attribute> 962 </input> 948 963 <span class="note"> optional</span> 949 964 </p> 950 965 <p> 951 <label for="commentContactEmail"><em>Email:</em> </label><input type="text" name="commentContactEmail"/> 966 <label for="commentContactEmail"><em>Email:</em> </label> 967 <input type="text" name="commentContactEmail"> 968 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CONTACT-EMAIL']"/></xsl:attribute> 969 </input> 952 970 <span class="note"> optional</span> 953 971 </p> … … 994 1012 <p> 995 1013 <label for="commentCategories">Category suggestion: </label> 996 <input type="text" name="commentCategories" size="30"/> 1014 <input type="text" name="commentCategories" size="30"> 1015 <xsl:attribute name="value"><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/parameters/node()[name()='X-BEDEWORK-PARAM-CATEGORIES']"/></xsl:attribute> 1016 </input> 997 1017 </p> 998 1018 </div> … … 1010 1030 <div id="bwCommentNotes"> 1011 1031 Please supply any final notes or instructions regarding your event:<br/> 1012 <textarea name="commentNotes" cols="60" rows="4"> </textarea> 1032 <!-- note: don't remove the #160 from the textarea or browsers will see it as a closed tag when empty --> 1033 <textarea name="commentNotes" cols="60" rows="4"><!-- 1034 --><xsl:value-of select="form/xproperties/node()[name()='X-BEDEWORK-SUBMIT-COMMENT']/values/text"/> <!-- 1035 --></textarea> 1013 1036 </div> 1014 1037 <div class="eventSubmitButtons"> trunk/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkEventForm.js
r1841 r1848 245 245 } 246 246 setComments(formObj); 247 setRecurrence(formObj);247 //setRecurrence(formObj); 248 248 setBedeworkXProperties(formObj,submitter); 249 setAccessHow(formObj,1);249 //setAccessHow(formObj,1); 250 250 //setAccessAcl(formObj); 251 251 } … … 265 265 function setComments(formObj) { 266 266 // set the submission comments (location, contact, and category suggestions) 267 // in a parsable format that can be filtered on output.268 269 var comment = ""; 270 comment += formObj["commentLocationAddress"].value + "\t"; 271 comment += formObj["commentLocationSubaddress"].value + "\t"; 272 comment += formObj["commentLocationURL"].value + "\t";273 comment += formObj["commentContactName"].value + "\t";274 comment += formObj["commentContactPhone"].value + "\t";275 comment += formObj["commentContactURL"].value + "\t"; 276 comment += formObj["commentContactEmail"].value + "\t";277 comment += formObj["commentCategories"].value + "\t";278 comment += formObj["commentNotes"].value;279 280 formObj["xbwsubmitcomment"].value = comment;281 } 282 function getComments(formId,comment) { 283 // get the submission comments (location, contact, and category suggestions)284 // and load them into the form285 var formObj = document.getElementById(formId);286 287 var commentVals = comment.split("\t"); 288 formObj["commentLocationAddress"].value = (commentVals[0] == undefined) ? "" : commentVals[0];289 formObj["commentLocationSubaddress"].value = (commentVals[1] == undefined) ? "" : commentVals[1];290 formObj["commentLocationURL"].value = (commentVals[2] == undefined) ? "" : commentVals[2];291 formObj["commentContactName"].value = (commentVals[3] == undefined) ? "" : commentVals[3];292 formObj["commentContactPhone"].value = (commentVals[4] == undefined) ? "" : commentVals[4];293 formObj["commentContactURL"].value = (commentVals[5] == undefined) ? "" : commentVals[5];294 formObj["commentContactEmail"].value = (commentVals[6] == undefined) ? "" : commentVals[6]; 295 formObj["commentCategories"].value = (commentVals[7] == undefined) ? "" : commentVals[7];296 formObj["commentNotes"].value = (commentVals[8] == undefined) ? "" : commentVals[8];267 // as an xproperty. Relies on bedeworkXProperties.js 268 269 270 } 271 function setBedeworkXProperties(formObj,submitter) { 272 // set up specific Bedework X-Properties on event form submission 273 // Depends on bedeworkXProperties.js 274 // Set application x-properties here. 275 276 // X-BEDEWORK-SUBMIT-COMMENT and its parameters 277 bwXProps.update(bwXPropertySubmitComment, 278 [[bwXParamLocationAddress,formObj["commentLocationAddress"].value], 279 [bwXParamLocationSubAddress,formObj["commentLocationSubaddress"].value], 280 [bwXParamLocationURL,formObj["commentLocationURL"].value], 281 [bwXParamContactName,formObj["commentContactName"].value], 282 [bwXParamContactPhone,formObj["commentContactPhone"].value], 283 [bwXParamContactURL,formObj["commentContactURL"].value], 284 [bwXParamContactEmail,formObj["commentContactEmail"].value], 285 [bwXParamCategories,formObj["commentCategories"].value]], 286 formObj["commentNotes"].value,true); 287 288 // X-BEDEWORK-IMAGE and its parameters: 289 if (formObj["xBwImageHolder"] && formObj["xBwImageHolder"].value != '') { 290 bwXProps.update(bwXPropertyImage,[[bwXParamDescription,''],[bwXParamWidth,''],[bwXParamHeight,'']],formObj["xBwImageHolder"].value,true); 291 } 292 // X-BEDEWORK-SUBMITTEDBY 293 bwXProps.update(bwXPropertySubmittedBy,[],submitter,true); 294 295 // commit all xproperties back to the form 296 bwXProps.generate(formObj); 297 297 } 298 298 // create table of form fields for review trunk/deployment/websubmit/webapp/resources/demoskins/resources/bedeworkXProperties.js
r1843 r1848 38 38 var bwXPropertySubmittedBy = "X-BEDEWORK-SUBMITTEDBY"; 39 39 var bwXPropertySubmitComment = "X-BEDEWORK-SUBMIT-COMMENT"; 40 40 var bwXParamLocationAddress = "X-BEDEWORK-PARAM-LOCATION-ADDRESS"; 41 var bwXParamLocationSubAddress = "X-BEDEWORK-PARAM-LOCATION-SUBADDRESS"; 42 var bwXParamLocationURL = "X-BEDEWORK-PARAM-LOCATION-URL"; 43 var bwXParamContactName = "X-BEDEWORK-PARAM-CONTACT-NAME"; 44 var bwXParamContactPhone = "X-BEDEWORK-PARAM-CONTACT-PHONE"; 45 var bwXParamContactURL = "X-BEDEWORK-PARAM-CONTACT-URL"; 46 var bwXParamContactEmail = "X-BEDEWORK-PARAM-CONTACT-EMAIL"; 47 var bwXParamCategories = "X-BEDEWORK-PARAM-CATEGORIES"; 41 48 42 49 // ======================================================================== … … 61 68 if (this.params.length) { 62 69 for (var i = 0; i < this.params.length; i++) { 63 curXparams += ";" + this.params[i][0] + "=" + this.params[i][1]; 70 if (this.params[i][1] != "") { 71 curXparams += ";" + this.params[i][0] + "=\"" + this.params[i][1] + "\""; 72 } 64 73 } 65 74 } … … 77 86 78 87 this.update = function(name, params, value, isUnique) { 88 // strip out any double quotes in the parameter values: 89 if (params.length) { 90 for (var i = 0; i < params.length; i++) { 91 var strippedParamValue = ""; 92 for (var j = 0; j < params[i][1].length; j++) { 93 var c = params[i][1][j]; 94 if (c != '"') { 95 strippedParamValue += c; 96 } 97 } 98 params[i][1] = strippedParamValue; 99 } 100 } 101 // add or update the xproperty: 79 102 var xprop = new BwXProperty(name, params, value); 80 103 if (isUnique && this.contains(name)) { … … 117 140 118 141 } 119 120 function setBedeworkXProperties(formObj,submitter) {121 // set up specific Bedework X-Properties on event form submission122 123 // X-BEDEWORK-IMAGE and its parameters:124 if (formObj["xBwImageHolder"] && formObj["xBwImageHolder"].value != '') {125 bwXProps.update(bwXPropertyImage,[[bwXParamDescription,''],[bwXParamWidth,''],[bwXParamHeight,'']],formObj["xBwImageHolder"].value,true);126 }127 // X-BEDEWORK-SUBMITTEDBY128 bwXProps.update(bwXPropertySubmittedBy,[],submitter,true);129 130 // commit all xproperties back to the form131 bwXProps.generate(formObj);132 }trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkEventForm.js
r1841 r1848 260 260 formObj["eventEndDate.month"].value = endDate.getMonth() + 1; 261 261 formObj["eventEndDate.day"].value = endDate.getDate(); 262 } 263 function setBedeworkXProperties(formObj,submitter) { 264 // Set up specific Bedework X-Properties on event form submission 265 // Depends on bedeworkXProperties.js 266 // Set application x-properties here. 267 268 // X-BEDEWORK-IMAGE and its parameters: 269 if (formObj["xBwImageHolder"] && formObj["xBwImageHolder"].value != '') { 270 bwXProps.update(bwXPropertyImage,[[bwXParamDescription,''],[bwXParamWidth,''],[bwXParamHeight,'']],formObj["xBwImageHolder"].value,true); 271 } 272 // X-BEDEWORK-SUBMITTEDBY 273 bwXProps.update(bwXPropertySubmittedBy,[],submitter,true); 274 275 // commit all xproperties back to the form 276 bwXProps.generate(formObj); 262 277 } 263 278 function swapAllDayEvent(obj) { trunk/deployment/webuser/webapp/resources/demoskins/resources/bedeworkXProperties.js
r1843 r1848 38 38 var bwXPropertySubmittedBy = "X-BEDEWORK-SUBMITTEDBY"; 39 39 var bwXPropertySubmitComment = "X-BEDEWORK-SUBMIT-COMMENT"; 40 40 var bwXParamLocationAddress = "X-BEDEWORK-PARAM-LOCATION-ADDRESS"; 41 var bwXParamLocationSubAddress = "X-BEDEWORK-PARAM-LOCATION-SUBADDRESS"; 42 var bwXParamLocationURL = "X-BEDEWORK-PARAM-LOCATION-URL"; 43 var bwXParamContactName = "X-BEDEWORK-PARAM-CONTACT-NAME"; 44 var bwXParamContactPhone = "X-BEDEWORK-PARAM-CONTACT-PHONE"; 45 var bwXParamContactURL = "X-BEDEWORK-PARAM-CONTACT-URL"; 46 var bwXParamContactEmail = "X-BEDEWORK-PARAM-CONTACT-EMAIL"; 47 var bwXParamCategories = "X-BEDEWORK-PARAM-CATEGORIES"; 41 48 42 49 // ======================================================================== … … 61 68 if (this.params.length) { 62 69 for (var i = 0; i < this.params.length; i++) { 63 curXparams += ";" + this.params[i][0] + "=" + this.params[i][1]; 70 if (this.params[i][1] != "") { 71 curXparams += ";" + this.params[i][0] + "=\"" + this.params[i][1] + "\""; 72 } 64 73 } 65 74 } … … 77 86 78 87 this.update = function(name, params, value, isUnique) { 88 // strip out any double quotes in the parameter values: 89 if (params.length) { 90 for (var i = 0; i < params.length; i++) { 91 var strippedParamValue = ""; 92 for (var j = 0; j < params[i][1].length; j++) { 93 var c = params[i][1][j]; 94 if (c != '"') { 95 strippedParamValue += c; 96 } 97 } 98 params[i][1] = strippedParamValue; 99 } 100 } 101 // add or update the xproperty: 79 102 var xprop = new BwXProperty(name, params, value); 80 103 if (isUnique && this.contains(name)) { … … 117 140 118 141 } 119 120 function setBedeworkXProperties(formObj,submitter) {121 // set up specific Bedework X-Properties on event form submission122 123 // X-BEDEWORK-IMAGE and its parameters:124 if (formObj["xBwImageHolder"] && formObj["xBwImageHolder"].value != '') {125 bwXProps.update(bwXPropertyImage,[[bwXParamDescription,''],[bwXParamWidth,''],[bwXParamHeight,'']],formObj["xBwImageHolder"].value,true);126 }127 // X-BEDEWORK-SUBMITTEDBY128 bwXProps.update(bwXPropertySubmittedBy,[],submitter,true);129 130 // commit all xproperties back to the form131 bwXProps.generate(formObj);132 }
