Author: hansbak
Date: Thu Jul 16 09:03:53 2009 New Revision: 794601 URL: http://svn.apache.org/viewvc?rev=794601&view=rev Log: edit portal page and inline string editor fix Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml ofbiz/trunk/framework/images/webapp/images/prototypejs/controls.js Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml?rev=794601&r1=794600&r2=794601&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml Thu Jul 16 09:03:53 2009 @@ -73,10 +73,6 @@ <field-to-result field="newEntity.portletSeqId" result-name="portletSeqId"/> <set-nonpk-fields map="parameters" value-field="newEntity"/> <create-value value-field="newEntity"/> - <make-value entity-name="PortalPageColumn" value-field="newEntity1"/> - <set-pk-fields map="parameters" value-field="newEntity1"/> - <make-next-seq-id value-field="newEntity1" seq-field-name="columnSeqId"/> - <create-value value-field="newEntity1"/> </simple-method> <simple-method method-name="deletePortalPagePortlet" short-description="Delete a PortalPortlet from a PortalPageColumn"> Modified: ofbiz/trunk/framework/images/webapp/images/prototypejs/controls.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/prototypejs/controls.js?rev=794601&r1=794600&r2=794601&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/prototypejs/controls.js (original) +++ ofbiz/trunk/framework/images/webapp/images/prototypejs/controls.js Thu Jul 16 09:03:53 2009 @@ -596,8 +596,24 @@ if (this.options.loadTextURL) this.loadExternalText(); this._form.appendChild(this._controls.editor); - }, - createForm: function() { + },createHiddenFieldParam: function() { + var allparam=this.url.substring(this.url.indexOf('?')+1,this.url.length); + var strparam=allparam.split('&'); + if(strparam.length>0){ + var fldhd; + for(var i=0;i<strparam.length;i++){ + var strvalues=strparam[i]; + if(strvalues.indexOf('=')!=0){ + var fieldValue=strvalues.split('='); + fldhd = document.createElement('input'); + fldhd.type = 'hidden'; + fldhd.name=fieldValue[0]; + fldhd.value=fieldValue[1]; + this._form.appendChild(fldhd); + } + } + } + },createForm: function() { var ipe = this; function addText(mode, condition) { var text = ipe.options['text' + mode + 'Controls']; @@ -609,6 +625,10 @@ this._form.addClassName(this.options.formClassName); this._form.onsubmit = this._boundSubmitHandler; this.createEditField(); + if(this.url.indexOf('?')!=-1){ + this.createHiddenFieldParam(); + this.url=this.url.substring(0,this.url.indexOf('?')); + } if ('textarea' == this._controls.editor.tagName.toLowerCase()) this._form.appendChild(document.createElement('br')); if (this.options.onFormCustomization) @@ -676,7 +696,7 @@ }); new Ajax.Updater({ success: this.element }, this.url, options); } else { - var options = Object.extend({ method: this.options.method || 'get' }, this.options.ajaxOptions); + var options = Object.extend({ method: this.options.method || 'post' }, this.options.ajaxOptions); Object.extend(options, { parameters: params, onComplete: this._boundWrapperHandler, |
Free forum by Nabble | Edit this page |