[CLOSED] Callout change in SVN causes code break

  1. #1

    [CLOSED] Callout change in SVN causes code break

    I have a callout on a grid that loads a widget on hover. I was able to use the following code to pass a record id in to the Show direct event, using the lib that installed with nuget for MVC5 version 2.5.2.

    de.Show.ExtraParams.Add(new Parameter()
    {
        Name = "packageId",
        Value = "this.triggerElement.dom.parentNode.dataset.recordid",
        Mode = ParameterMode.Raw
    });
    I recently updated the dll's with the version from SVN (revision 5999) to fix a different issue. Now, the param code does not work, as dataset is no longer a property on parentNode.

    Was this change done on purpose? I just want to make sure that the new change is going to be permanent - otherwise, getting the recordid in the original way was more efficient.
    Last edited by Daniil; Oct 10, 2014 at 3:35 PM. Reason: [CLOSED]
  2. #2
    Hi @jpadgett,

    Please clarify is that a ToolTip you deal with?

    Could you, please, provide a test case? I would test in both the versions and investigate in details.
  3. #3
    Sorry - here is more of the code. Line 80 is the code that was working previously.

    Html.X().GridPanel()
        .ID("GridPanel1")
        .Title("Grid")
        .ForceFit(true)
        .Resizable(false)
        .Store(
            Html.X().Store()
                .ID("Store1")
                .PageSize(20)
                .DataSource(Model.PackageList)
                .Model(
                    Html.X().Model()
                        .IDProperty("PackageId")
                        .Fields("PackageId",
                                "FirstName",
                                "LastName",
                                "IsSent")
                )
                .ServerProxy(
                    Html.X().AjaxProxy()
                        .Url(Url.Action("LoadGrid", "Distribution", new { area = "Report", id = Model.DistributionId }))
                )
        )
        .ColumnModel(
            Html.X().Column().DataIndex("FirstName").Text("First Name"),
            Html.X().Column().DataIndex("LastName").Text("LastName"),
            Html.X().Column()
                .DataIndex("IsSent")
                .ItemID("ColumnIsSent")
                .Text("Status")
                .Width(30)
                .Renderer(new Renderer() { Fn = "statusColumnRenderer" })
        )
        .SelectionModel(
            Html.X().RowSelectionModel()
                .ID("RowSelectionModel1")
                .Mode(SelectionMode.Simple)
        )
        .View(
            Html.X().GridView().TrackOver(false)
        )
        .Callouts(cos =>
        {
            cos.Add(
                Html.X().Callout()
                    .Title("Sends")
                    .Icon(Icon.EmailGo)
                    .Trigger(CalloutTrigger.Hover)
                    .Alignment(AnchorPoint.Left)
                    .Delegate(".x-grid-cell-ColumnIsSent")
                    .BodyStyle("padding:1px;")
                    .BodyWidget(bw =>
                    {
                        bw.Add(
                            Html.X().GridPanel()
                                .ID("GridPanelSends")
                                .Header(false)
                                .ForceFit(true)
                                .Width(250)
                                .Store(
                                    Html.X().StoreFor(m => m.DistributionPackageSends)
                                        .ID("StoreSends")
                                )
                                .ColumnModel(
                                    Html.X().Column().DataIndex("Sender").Text("Sender").Width(80),
                                    Html.X().DateColumn().DataIndex("Timestamp").Text("Timestamp").Format("MM/dd/yyyy hh:mm:ss tt")
                                )
                        );
                    })
                    .DirectEvents(de =>
                    {
                        de.Show.Action = "LoadSends";
                        de.Show.EventMask.ShowMask = true;
                        de.Show.EventMask.Msg = "Loading...";
                        de.Show.EventMask.Target = MaskTarget.CustomTarget;
                        de.Show.EventMask.CustomTarget = "GridPanelSends";
                        de.Show.ExtraParams.Add(new Parameter()
                        {
                            Name = "packageId",
                            Value = "this.triggerElement.dom.parentNode.dataset.recordid",
                            Mode = ParameterMode.Raw
                        });
                    })
                    .Listeners(l =>
                    {
                        l.BeforeShow.Handler = "return this.calloutOwner.view.getRecord(this.triggerElement.dom.parentNode).data.IsSent;";
                    })
            );
        })
    I have changed to the code to
    Value = "this.calloutOwner.view.getRecord(this.triggerElement.dom.parentNode).data.PackageId",
    and it works fine. But I was a little concerned that the property, and resulting functionality, was removed. I was lucky to have been testing the particular page, otherwise, the breakage in my page's functionality would've gone into production.
  4. #4
    Unfortunately, I cannot run the code that you posted.

    Do you mean that the "dataset" property has been removed? It is a DOM property. I guess it comes from ExtJS, but it is unlikely that it is in ExtJS API. So, I would not rely on that.
    Last edited by Daniil; Oct 02, 2014 at 12:08 PM.

Similar Threads

  1. [CLOSED] [#458] Hover callout displays only once
    By ATLAS in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 04, 2014, 2:05 PM
  2. [CLOSED] Callout hover triggering and lingering issues
    By ATLAS in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 28, 2014, 12:02 AM
  3. [CLOSED] Bug on the callout component
    By Akpenob in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 06, 2014, 8:00 AM
  4. [CLOSED] Did Charts break
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Sep 05, 2013, 7:18 PM
  5. Change default line break key of TextArea
    By Vinci in forum 2.x Help
    Replies: 1
    Last Post: Jun 19, 2013, 3:15 AM

Posting Permissions