PDA

View Full Version : [CLOSED] ToolTip Listener doesn't fire the event



sisa
Sep 04, 2012, 2:56 PM
Hi,

I have a Tooltip on a UserControl. The UserControl is on a Page with a MasterPage.

The Makup on the MasterPage:


<ext:Viewport ID="Viewport1" runat="server" Layout="fit">
<Items>
<ext:Panel ID="PanelMaster" runat="server" Layout="border" Border="true" Region="Center">
<Content><
asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server" />
</Content><
/ext:Panel>
</Items>
</ext:Viewport>

on aspx-page


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
<uc1:OrderEvent ID="ucOrderEvent" unat="server" />
</asp:Content>

on usercontrol


<ext:FitLayout ID="FitLayout1" runat="server">
<Items>
<ext:Panel ID="Panel1" runat="server" Layout="FitLayout"><
Items><ext:GridPanel ID="GridPanel1" runat="server" TrackMouseOver="true" Title="Expander Rows with control" Collapsible="true" AnimCollapse="true" Width="600" Height="450">
<ColumnModel ID="ColumnModel1" runat="server">

<ext:ToolTip ID="RowTip" runat="server" Target="={#{GridPanel1}.getView().el}" Delegate=".x-grid3-cell" TrackMouse="true" ShowDelay="10" Anchor="bottom" NoCache="true" Closable="true" Icon="PageWhite"><
Listeners>
<Show Handler="showToolTip(this,#{GridPanel1});" />
</Listeners>
</ext:ToolTip>
</Items>
</ext:Panel><
/Items>
</ext:FitLayout>



var showToolTip = function (toolTip, grid) {
var cellIndex = grid.view.findCellIndex(toolTip.triggerElement);
var fieldName = grid.getColumnModel().getDataIndex(cellIndex);
if (fieldName == "EventText") {
var rowIndex = grid.view.findRowIndex(toolTip.triggerElement);
var record = StoreEventList.getAt(rowIndex);
if (typeof (record) != 'undefined' && record.get('Error') != 'ERROR') {
// toolTip.update(data);
url = "../_ContactAndAddress/EventTexts.aspx?Usage=Internal";
toolTip.load({ url: url, mode: 'iframe' });
} else {
toolTip.hide();
}
}
else {
toolTip.hide(); }
return false; };






On the Browser I see the smal hand but no ToolTip comes up.

On a Testside Without MasterPage and ViewPort it works well.

Thanks for your help

Daniil
Sep 04, 2012, 3:01 PM
Hi,

Unfortunately, the code sample is unreadable. Please see #3:
More Information Required (http://forums.ext.net/showthread.php?10205)

Daniil
Sep 04, 2012, 3:20 PM
No success. Please follow the recommendations from the #3 item of the link I mentioned. In particular, it says

Please do not repost the same code block in a new post... just EDIT your original post.

Daniil
Sep 07, 2012, 7:02 PM
Does replacing

StoreEventList
with

grid.getStore()
within the showToolTip function help?

sisa
Sep 10, 2012, 10:01 AM
Does replacing

StoreEventList
with

grid.getStore()
within the showToolTip function help?


Thanks, this helps.

I have an additional question.

How can I set a second Tooltip which is closable = true and how can I set the target to an special column.

A nice week Elke

Daniil
Sep 10, 2012, 10:56 AM
How can I set a second Tooltip which is closable = true

Please set

Closable="true"
for the ToolTip.

I think you should also set

AutoHide="false"
and remove

TrackMouse="true"


how can I set the target to an special column.

I would analyze a field name within a ToolTip BeforeShow listener to determine this ToolTip should be shown or not. Returning false from a BeforeShow listener prevents the ToolTip from appearing. I think there is no better way to achieve it.