Page 1 of 1

PreviewRow expansion

Posted: Tue Apr 02, 2013 8:53 am
by lhardee

Hello,

I am using PreviewRow extension and set up the ability to preview row by selecting anywhere in the row to expand out the preview with following code:

if ($this->RowType == EW_ROWTYPE_VIEW) $this->RowAttrs["onclick"] = "ew_ShowDetails(this);";

I can now click anywhere in the row and the PreviewRow works great.

My question is, I created other links using function ListOptions_Load() and would like to prevent the expansion of PreviewRow when those links are clicked on.

Is there a way to exclude certain values in a row from making the row expand when clicked on?

For example, the edit and delete buttons created using ListOptions->Add ?

Thanks,

lhardee


Re: PreviewRow expansion

Posted: Tue Apr 02, 2013 9:46 am
by Webmaster

Your link's onclick event should stop event propagation. Both YUI and jQuery has functions to do that. Google for more info.


Re: PreviewRow expansion

Posted: Mon Sep 02, 2013 8:26 pm
by starquest321

I am using PreviewRow extension and set up the ability to preview row by selecting anywhere in the row to expand out the preview with following code:

if ($this->RowType == EW_ROWTYPE_VIEW) $this->RowAttrs["onclick"] = "ew_ShowDetails(this);";

Added Above Line in :: ROW_Rendered event.

But onclick event is not showing preview..

What am I doing wrong?


Re: PreviewRow expansion

Posted: Tue Sep 03, 2013 6:43 pm
by danielc

You may need to change ewpreview.min.js under phpjs subfolder.

original:
function ew_ShowDetails(){var t=jQuery,e= t(this), ...

modify as:
function ew_ShowDetails(el){var t=jQuery,e= t(el) || t(this), ...