Following your advices to not use several FCKEditor with the relevant options, I have been working on doing the same but with xxforms:dialog. First of all, I have updated FCKEditor from 2.4.2 (default in OPS) to 2.4.3 and it works much better! The upgrade is very simple : I just opened ops-resources-public.jar with 7zip and copy-paste the new files! I would encourage you all to do the same. Here is part of my code : <xxforms:dialog level="modal" close="true" id="addNews" class="addNews"> <xforms:label>Add News</xforms:label> <xforms:group ref="instance('news-template')/item"> <div class="addNewsInput" style="width:800px"> <xforms:input ref="subject"> <xforms:label class="news-label">Subject: </xforms:label> </xforms:input> <br /> <xforms:textarea mediatype="text/html" ref="content"> <xforms:label class="news-label">Content</xforms:label> </xforms:textarea> <br /> <xforms:trigger id="addNewsCloseTrigger"> <xforms:label>Cancel</xforms:label> <xforms:action ev:event="DOMActivate"> <xxforms:hide dialog="addNews" /> </xforms:action> </xforms:trigger> <xforms:trigger id="addNewsSaveTrigger"> <xforms:label>Save</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:insert context="instance('news-instance')" nodeset="item" at="1" position="before" origin="instance('news-template')/*" /> <xforms:send submission="save-submission" /> <xforms:setvalue ref="subject" value="''" /> <xforms:setvalue ref="content" value="''" /> <xxforms:hide dialog="addNews" /> </xforms:action> </xforms:trigger> </div> </xforms:group> </xxforms:dialog> <xxforms:dialog level="modal" close="true" id="editNews" class="editNews"> <xforms:label>Edit News</xforms:label> <xforms:group ref="instance('news-instance')/item[index('item-repeat')]"> <div class="editNewsInput"> <xforms:input ref="subject"> <xforms:label class="news-label">Subject: </xforms:label> </xforms:input> <br /> <xforms:textarea mediatype="text/html" ref="content"> <xforms:label class="news-label">Content</xforms:label> </xforms:textarea> <br /> <xforms:trigger id="editNewsCloseTrigger"> <xforms:label>Cancel</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:send submission="list-submission" /> <xxforms:hide dialog="editNews" /> </xforms:action> </xforms:trigger> <xforms:trigger id="editNewsSaveTrigger"> <xforms:label>Save</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:send submission="save-submission" /> <xxforms:hide dialog="editNews" /> </xforms:action> </xforms:trigger> </div> </xforms:group> </xxforms:dialog> <xforms:group class="addNews" ref="instance('news-template') "> <xforms:trigger appearance="minimal" ref="."> <xforms:label> /design/images/add.gif </xforms:label> <xforms:action ev:event="DOMActivate"> <xxforms:show dialog="addNews"/> <xforms:setfocus control="addNewsSaveTrigger"/> </xforms:action> </xforms:trigger> </xforms:group> <xforms:group class="viewNews" ref="instance('news-instance') "> <xforms:repeat nodeset="item" id="item-repeat"> <p class="news-p"> <strong><xforms:output ref="subject" /> - </strong><xforms:output ref="date" /> / <xforms:output ref="contributors" /> <xforms:trigger appearance="minimal"> <xforms:label> /design/images/cancel.png </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:delete context="instance('news-instance')" nodeset="item" at="index('item-repeat')" /> <xforms:send submission="save-submission" /> </xforms:action> </xforms:trigger> <xforms:trigger appearance="minimal" ref="."> <xforms:label> /design/images/edit.gif </xforms:label> <xforms:action ev:event="DOMActivate"> <xxforms:show dialog="editNews"/> <xforms:setfocus control="editNewsCloseTrigger"/> </xforms:action> </xforms:trigger> <hr /> <xforms:output appearance="xxforms:html" ref="content" /> </p> </xforms:repeat> </xforms:group> 1) I would appreciate if you could tell me if my code is well done ... or if I'm doing some stupid things :)! 2) Let's say I have 3 news. I will have 4 <hr /> on my client. I believe I read somewhere that node-repeat does one more node than in reality. Is this true? How could I remove the blank news (but the hr is seen) ? Can somebody point me where I might have read this in the documentation (I can't find it again) 3) Maybe this is an OPS bug : When I edit a news, a dialog will popup with my FCKEditor in it. All the data is there, and I modify my news. Then I press on save. Let's say I had just to work "test" and when I edited it, I wanted to put it in bold. Well when the dialog closes, I see the html data : <p style="font-weight:bold;">test</p> even though I put appearance="xxforms:html" in my output. If I refresh my page, then the word test is correctly showed in bold. How come the page is not refresh correctly? What can I do about it? (Check attached image) 4) I cannot find out how to remove the yellow background for the selected news (check attached image). What css code should I put ? Thanks for your help ! -- View this message in context: http://www.nabble.com/FCKEditor-%2B-xxforms%3Adialog-%2B-refresh-page-tf4826178.html#a13808082 Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |