Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Calendar's backgroundClick & eventClick behaviour

    Hello.
    I'm using SmartClient 8.3 nightly build and i'm trying to override default editing event dialog form.
    But i suppose, backgroundClick returning false blocks further eventClick calling.
    testcase: in Simple Calendar example let's use this code:
    Code:
    isc.Calendar.create({
        ID: "eventCalendar", 
        data: eventData,
        backgroundClick: function (startDate, endDate) {
            modalCreateNew.show();
            return false;
        },
        eventClick:function (event, viewName) {
            modalEdit.show();
            return false;
        }
    });
    
    isc.Window.create({
        ID: "modalCreateNew",
        title: "Create new event",
        autoSize:true,
        autoCenter: true,
        isModal: true,
        showModalMask: true,
        autoDraw: false,
        items: [
            isc.DynamicForm.create({
                autoDraw: false,
                height: 48,
                padding:4,
                fields: [
                    {name: "field11", type: "select", valueMap: ["foo", "bar"]},
                    {name: "field21", type: "date"},
                    {type: "button", title: "Done",
                     click: "modalCreateNew.hide();" }
                ]
            })
        ]
    });
    
    isc.Window.create({
        ID: "modalEdit",
        title: "Editing event",
        autoSize:true,
        autoCenter: true,
        isModal: true,
        showModalMask: true,
        autoDraw: false,
        items: [
            isc.DynamicForm.create({
                autoDraw: false,
                height: 48,
                padding:4,
                fields: [
                    {name: "field12", type: "select", valueMap: ["foo", "bar"]},
                    {name: "field22", type: "date"},
                    {type: "button", title: "Done",
                     click: "modalEdit.hide();" }
                ]
            })
        ]
    });
    so if we click first on event - ok, form modalEdit is showing. If we click on other space - ok, modalCreateNew form is showing, and after that we can click everywhere (on existing events too) - only modalCreateNew will be shown.
    Is it a bug or i don't understand correct behaviour?

    Nicholas

    #2
    well, is it a bug? I suppose, it can be verified quickly with my testcase.

    Comment


      #3
      Well, dear Isomorphic, please, check my question?
      Thank you.

      Comment


        #4
        Smartclient v8.3p_2013-01-11
        All I can say, I tried overriding the backgroundClick and I was getting the same behavior.
        Thanks for the solution.

        Comment

        Working...
        X