On 4/27/07, <b class="gmail_sendername">David Koontz</b> &lt;<a href="mailto:david@koontzfamily.org">david@koontzfamily.org</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I noticed in the literature for Masterview that the offline pages are<br>capable of having javascript links for the forms so that they are<br>navigable.&nbsp;&nbsp;I haven&#39;t been able to find any information on actually<br>enabling this.&nbsp;&nbsp;Am I totally off base on this?
<br><br></blockquote></div><br><br>Yes MasterView has some javascript that can be used to make offline pages navigate as if they were running in rails. If you generate some pages using the generator, then you can see how these are used. It isn&#39;t necessary to use the generator to use the javascript, but it will give you an example of how it is used.
<br><br>Here is roughly how it works. <br><br>First, for the links, we just put the href to the other view, so they work as you would think, nothing fancy there.<br><br>Second, for the buttons, we use javascript to register onclick events with the buttons so that they also go to the proper offline page. The generator uses specific crud based class names that it looks for and what to link it to.
<br><br>Third, we copy and remove sections, and finally we adjust some of the messages on the pages.<br><br>You&#39;ll see this activated by a javascript inclusion at the bottom of the pages.<br><br>&nbsp;&nbsp;&nbsp; &lt;script mv:replace=&quot;&quot; src=&quot;../../masterview/extra/mvpreview.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
<br>&nbsp;&nbsp;&nbsp; &lt;script mv:replace=&quot;&quot; type=&quot;text/javascript&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mvpreview.preparePage( &#39;products&#39;, {} );<br>&nbsp;&nbsp;&nbsp; &lt;/script&gt;<br><br>The script also changes some messages, copies sections, removes sections, etc., all things to help the prototype look more like it would when running.
<br><br>You are right that we haven&#39;t documented this as we should have. I will put this as a todo item. In the meantime, I&#39;d recommend that you try out the generator (script/generator masterview Foo Bar) and see what it creates and post up any additional questions you have. We&#39;ll take these and use them for the new documentation.
<br><br>Thanks,<br><br>Jeff<br><br><br><br><br>