Questions and discussion about using ProcessMaker: user interface, running cases & functionality
By cosyxu
#794957
Good Morning Amosbatto,

Hope you have a good weekend. :D

Would I ask how to change the css for upload file button in the Grid, please have a look at the attached screen shot.
Capture.PNG
Capture.PNG (11.54 KiB) Viewed 2651 times
1) I need some JS to change the space between the button and the bottom to make it beautiful.

2) I tried to add this code to change the button but it only works for the first button, after I clicked the "Add New", the rest of the buttons didn't change at all. $("#grid_attachment").find('button').addClass("btn btn-primary btn-lg btn-block");

3) Same to the second question, I want to change the text of the button from "Allowed title extensions:*" to "Please click", although I have tried some JS, but it only works for the first button, didn't work for the rest of them.

*4) By the way, is there some way to get the entire diagram so I can print it out ? (It's a long one for three pages)

Would you please provide some solutions (JS) to change the all the buttons dynamically.

Many thanks, :)

Yuan
User avatar
By programerboy
#794967
Hi,

I created a grid with this name: "gridVar001" and then I created a file input in grid with this name : "file0000000001"
I used this code in form javascript :
Code: Select all
$("document").ready( function(){
	if($("#\\[gridVar001\\]\\[1\\]\\[file0000000001\\]") != undefined){
		$("#\\[gridVar001\\]\\[1\\]\\[file0000000001\\]").find('button').addClass("btn btn-primary btn-lg btn-block");
		$("#\\[gridVar001\\]\\[1\\]\\[file0000000001\\]").find('button').html('Please click');
	}
	$("#gridVar001").onAddRow(function(aNewRow, oGrid, rowIndex) {
		$("#\\[gridVar001\\]\\["+rowIndex+"\\]\\[file0000000001\\]").find('button').addClass("btn btn-primary btn-lg btn-block");
		$("#\\[gridVar001\\]\\["+rowIndex+"\\]\\[file0000000001\\]").find('button').html('Please click');
		
	});
});
Thanks

Being the best in the started business is the obje[…]

Winzo is a popular and unique game on the mobile p[…]

Cannot create process using templets

Real details. The problem was solved by effect!

However, it is essential to use it responsibly and[…]