Sha256: 33d2bbc6fde068deb3087ce49cc9714e09aa1117fb74e7644c103d0c1dd197e2

Contents?: true

Size: 596 Bytes

Versions: 8

Compression:

Stored size: 596 Bytes

Contents

/**
 * FIELD GROUP EDITOR
 */

export default function() {
	$(".field_groups-edit #save").on("click", function(event) {
		let instanceType = $(this).data("instance-type");
		let entriesNumber = $(this).data("entries-number");

		// If the current structure have many entries updating the field group
		// might be a slow operation, therefore it's good practice to inform the user
		if (entriesNumber > 500) {
			alert(
				`You have ${entriesNumber} ${instanceType}. This operation might take some time to complete. To avoid unexpected behaviour don't leave or refresh the page`
			);
		}
	});
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
binda-0.1.11 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.10 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.9 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.8 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.7 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.6 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.5 app/assets/javascripts/binda/components/field_group_editor.js
binda-0.1.4 app/assets/javascripts/binda/components/field_group_editor.js