apex-plugin-ig_simple_checkbox icon indicating copy to clipboard operation
apex-plugin-ig_simple_checkbox copied to clipboard

Double-Click Issue

Open NivethaRamanth opened this issue 7 years ago • 10 comments
trafficstars

The check box gets checked or unchecked only on double-click of it

NivethaRamanth avatar Mar 02 '18 07:03 NivethaRamanth

You have to double-click to put the record in edit mode. On the page properties "execute when page loads", you can put in the following command to have your IG start in edit mode. You shouldn't then need to double-click to activate it.

apex.region("Put IG ID here").widget().interactiveGrid("getActions").set("edit", true);

sonic0boom avatar Mar 02 '18 15:03 sonic0boom

Hey @NivethaRamanth, I hope @sonic0boom's comment has helped you.

I'm closing here for now but feel free to re-open if you still have issues.

rafael-trevisan avatar Mar 07 '18 05:03 rafael-trevisan

After adding the above given CSS " After Page Load first time not cheked" issue has been resolved. But still only on double click of the checkbox I can check/uncheck it. Hence Iam reopening this issue.

NivethaRamanth avatar Mar 07 '18 09:03 NivethaRamanth

Hey @NivethaRamanth, having to click "twice" is somewhat intentional... the first click is to focus on the cell, second and forward clicks are meant to toggle the checkbox value, like asked here.

After clicking the first time (or entering in the cell), are you able to toggle checked/unchecked with just one single click?

rafael-trevisan avatar Mar 07 '18 16:03 rafael-trevisan

I agree with NivethaRamanth - speaking purely from an ordinary user's point of view, the checkboxes look like any other checkbox in the application, but they don't behave like other checkboxes - i.e. it takes a double-click to change their state.

Users will have to remember to click once in some places, and double-click in other places in the same application (if both IG and ordinary single-record forms are used). Oh, unless the focus is already on the checkbox in which case the double-click actually returns the checkbox to its original state! This is a poor user experience.

If there's any way to have them focus+change state in one click that would be a great improvement.

jeffreykemp avatar Mar 08 '18 00:03 jeffreykemp

Yes, User was asking me the same , why in all other pages its single click but only here in this report its double click for checkbox. It would be great if this can be resolved! Thanks.

NivethaRamanth avatar Mar 08 '18 08:03 NivethaRamanth

All right, I'll take a look at this when I get some free time here 😉

rafael-trevisan avatar Mar 12 '18 04:03 rafael-trevisan

Hi, I am eagerly waiting for your reply. Could you please provide an update.

venkat2121 avatar Jun 06 '18 14:06 venkat2121

There's a kind of workaround for that - create a dynamic action - Event: Click - Selection Type: jQuery Select - jQuery Selector: .a-GV-row - Client-side Condition : ($(this.triggeringElement.childNodes[1]).prop("tagName") != 'TH') - Severside Condition - Type: Rows Returned - SQL Query: SELECT distinct 1 FROM apex_application_page_regions WHERE application_id = :APP_ID AND page_id = :APP_PAGE_ID AND source_type = 'Interactive Grid';

True-Action: Execute JavaScript Code

var vAffectedElement;

if ($(this).get(0).affectedElements[0].classList.contains("a-GV-cell")) { vAffectedElement = $(this).get(0).affectedElements[0]; } else { vAffectedElement = $(this).get(0).affectedElements[0].parentElement; }

if ($(vAffectedElement).find("input[type='checkbox']").length > 0) { var vInput = $(vAffectedElement).find("input[type='checkbox']"); if (vInput.val() == vInput.attr("data-checked-value")) { vInput.val(vInput.attr("data-unchecked-value")); vInput.prop("checked", false); } else { vInput.val(vInput.attr("data-checked-value")); vInput.prop("checked", true); }

var rowId = vInput.closest('tr').data('id'); var regionId = $(vInput.parents('.a-IG')).attr('id').slice(0, -3); var ig$ = apex.region(regionId).widget().interactiveGrid('getViews','grid');

-- do here whatever you usually do to update the Model

}

MarkusId avatar Jul 10 '18 09:07 MarkusId

Hi, I have another workaround (apart from the proposed by MarkusId):

It consists in enable edit mode by default (putting this code on page load): apex.region("grid_seguridad").widget().interactiveGrid("getActions").set("edit", true);

Then, you may put a CSS class in the IG column for the checkbox. Then you can create a Dynamic Action, that "onmouseenter" that class, a focus is forced: $(this.triggeringElement).focus().

With this, when user put the mouse pointer over the checkbox cell, he only have to click once (because it would be already activated).

Then, with some CSS you may be able to make it look like as if it was not activated (same height).

Regards, Gerard.

Geri1590 avatar Apr 15 '21 13:04 Geri1590