PDA

View Full Version : UIClasses in Alpha



Zakaroonikov
27 May 2007, 2:22 PM
Just a couple of comments/questions. Everything in there looks great. I have looked at a previous incarnation of the code DWT and added a couple of features. I am not sure if these ideas would be useful in your code.

1. the UIView class I split up so it could also be used to get a Ext.View representation of a ReadViewEntries (an option in the init routine to create a grid or view). That way I could use Ext's builtin View.Template merging to format notes views in a non-grid format.

To create a grid I broke it down into 3 steps (1. Setup domino view (your init2), 2. Get View Data Store (first 20 lines of your createGrid), 3. create Grid (the last bit of your createGrid)).

To perform the View.Template merge I use steps 1 & 2 like the grid but then call a new Ext.View() on the newly created datastore with a some stored HTML.

2. Adapt the layout to use a ReaderLayout instead of the borderLayout so that you could instead use a preview pane like a normal Notes application. When you single click on an item in the grid it appears in the preview pane. When you double click it opens in a new tab (like this alpha does now).

jratcliff
27 May 2007, 4:05 PM
These are actually great ideas. Would you be interesting in sharing the code?

Jack

Zakaroonikov
31 May 2007, 9:34 PM
These are actually great ideas. Would you be interesting in sharing the code?

Jack

Here it is. I have used the extnd database as a basis. I have a notes database with examples but cannot upload it here because of a 90k limit.

RWaters
1 Jun 2007, 12:48 PM
Awesome, I just whipped up my first View a couple days ago for a non-Domino app and see a lot of possibilites for them. I'll definitely check out the code :)

galdaka
2 Jun 2007, 2:27 AM
Any link for test?

Zakaroonikov
3 Jun 2007, 1:42 PM
Sorry there is no link. I don't have any external web hosting. I put together a .nsf file showing the examples but it is bigger than the 90k limit here.

Zakaroonikov
3 Jun 2007, 1:52 PM
Here is the javascript object used by the Ext.MasterTemplate to generate screen shot 2 (with some css of course).


WagnetProfile : {
Content: ['<div class="cwoForumPost">',
' <div class="cwoForumPostHeader">',
' <div class="cwoForumPostDate">',
' {pubDate}',
' </div>',
' <div class="cwoForumPostAuthor">',
' <a href="#" class="cwoForumPostUserName">{author}</a>',
' </div>',
' </div>',
' <div class="cwoForumPostContent">',
' <div class="cwoForumPostSubject">',
' <img border="0" alt="Default" src="images/cwoForumPost/icon1.gif" class="inlineimg" title="Default"/>',
' <strong>{title}</strong>',
' </div>',
' <hr size="1" />',
' <div class="cwoForumPostBody">',
' {body}',
' </div>',
' <div class="cwoForumPostAttachments">',
' <fieldset class="fieldset">',
' <legend>Attached Files</legend>',
' {attachments}',
' </fieldset>',
' </div>',
' <div class="cwoForumPostBtnSpacer">',
' <div class="cwoForumPostButtons">',
' <a rel="nofollow" href="newreply.php?do=newreply&p=33860"><img border="0" alt="Reply With Quote" src="images/cwoForumPost/quote.gif" title="Reply With Quote"/></a>',
' <a onclick="return false" rel="nofollow" href="newreply.php?do=newreply&p=33860"><img border="0" id="mq_33860" alt="Multi-Quote This Message" src="images/cwoForumPost/multiquote_off.gif" title="Multi-Quote This Message"/></a>',
' <a onclick="return false" id="qr_33860" rel="nofollow" href="newreply.php?do=newreply&p=33860"><img border="0" alt="Quick reply to this message" src="images/cwoForumPost/quickreply.gif" title="Quick reply to this message"/></a>',
' </div>',
' </div>',
' </div>',
'</div>']