Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

[FireFox] Form resizing when setValue is called.

$
0
0
SmartClient Version: 8.3
FireFox Version: 22.0

Situation: isc.Window with a single isc.DynamicForm as an item. The form has 6 fields of type "checkbox", as you can see from the code snippet.

Problem: This happens only on FireFox. Everytime setValue() is called on one of the fields, the form curiously increases its height and width by exactly 12 pixels. When I comment out the code that calls setValue() on the form fields, the size increase doesn't take place.

Attempts: I've tried setting the height/width of the form and the window to fixed numbers, instead of using resize:true on the window, and 100% values for the form's width/height; no effect. I've also tried explicitly setting the height and width of the form, after setting new values for the form items; also no effect, the form's height/width don't seem to change. (I did not however, try marking the form for redraw after calling setHeight(). Might be worth a try.)

Code snippet of the window and form creation, so you can check their attributes.
Code:

isc.Window.create({
                ID: "agentFilterOptions",
                title: CONFIG.FILTER[0],
                // autoSize: true, // bbarreto_debug: temporarily commenting this out.
                height: 141, width: 122, // bbarreto_dev: testing those out, checking if they will fix the resizing issue.
                showHeaderIcon: false,
                showCloseButton: false,
                showMinimizeButton: false,
                canDragReposition: false,
                top: agentFilterMenuButton.getPageTop() + 16,
                left: 132,
                mouseOut: function() {
                    var currentEventTarget = isc.EventHandler.getTarget();
                    if ((currentEventTarget != agentFilterOptions) &&
                        (currentEventTarget != agentFilterMenuButton) &&
                        (!agentFilterOptions.contains(currentEventTarget))) {
                       
                        updateLocalStorageAgentFilterInfo();
                        agentStatusList.filterData(getAgentFilterCriteria());
                        agentFilterOptions.closeClick();
                       
                        agentFilterMenuButton.setSrc(CONFIG.AGUI_IMG_PATH + "agent_info_arrow.png");
                   
                    }
                },
                items: [
                    isc.DynamicForm.create({
                        ID: "agentFilterByStatusForm",
                        itemLayout: "absolute",
                        // width: 110, // bbarreto_debug: temporarily commenting this out.
                        height: 112, width: 110, // bbarreto_dev: testing those out, checking if they will fix the resizing issue.
                        fields: [
                            {
                                top: 2,
                                name: "waitingField",
                                title: CONFIG.STATUS_SHORT[3],
                                type: "checkbox",
                                defaultValue: dataElement._agentFilterInfo.waitingField
                            },{
                                top: 20, // previous + 18
                                name: "workingOfflineField",
                                title: CONFIG.STATUS[4],
                                type: "checkbox",
                                defaultValue: dataElement._agentFilterInfo.workingOfflineField
                            },{
                                top: 38, // previous + 18
                                name: "busyField",
                                title: CONFIG.STATUS_SHORT[6],
                                type: "checkbox",
                                defaultValue: dataElement._agentFilterInfo.busyField
                            },{
                                top: 56, // previous + 18
                                name: "breakField",
                                title: CONFIG.STATUS_SHORT[2],
                                type: "checkbox",
                                defaultValue: dataElement._agentFilterInfo.breakField
                            },{
                                top: 74, // previous + 18
                                name: "loggedInField",
                                title: CONFIG.STATUS_HASH.logged_in,
                                type: "checkbox",
                                defaultValue: dataElement._agentFilterInfo.loggedInField
                            },{
                                top: 92, // previous + 18
                                name: "offlineField",
                                title: CONFIG.STATUS_SHORT[4],
                                type: "checkbox",
                                defaultValue: dataElement._agentFilterInfo.offlineField
                            }
                        ]
                    })
                ]
            });

Snippet of the calls to set the values of the form items.
Code:

agentFilterByStatusForm.getField("waitingField").setValue(dataElement._agentFilterInfo.waitingField);
            agentFilterByStatusForm.getField("workingOfflineField").setValue(dataElement._agentFilterInfo.workingOfflineField);
            agentFilterByStatusForm.getField("busyField").setValue(dataElement._agentFilterInfo.busyField);
            agentFilterByStatusForm.getField("breakField").setValue(dataElement._agentFilterInfo.breakField);
            agentFilterByStatusForm.getField("loggedInField").setValue(dataElement._agentFilterInfo.loggedInField);
            agentFilterByStatusForm.getField("offlineField").setValue(dataElement._agentFilterInfo.offlineField);


Viewing all articles
Browse latest Browse all 4756

Trending Articles