Hi guys,
To display the object properties of an object, you can double-click on the corresponding object. For buttons, display objects, HTML etc. this is not possible. In this case you have to use the rather cumbersome way via the Form Object List, search for the object etc.
Can you make it so that when you click on an object with the middle mouse button, the dialog object properties will open? This would greatly simplify the editing of objects.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Easier way to open Object Properties Dialog?
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Easier way to open Object Properties Dialog?
Hi amit,
That's an excellent idea! As I like to work in the least complicated way possible, here's what you are looking for.
All you have to do is paste this JavaScript in the (Setup->) Header field.
Middle-click on an object: Will open the "Object Properties" dialog.
Middle-click not on an object (html body etc): Will open the "Form Properties" dialog.
That's an excellent idea! As I like to work in the least complicated way possible, here's what you are looking for.
All you have to do is paste this JavaScript in the (Setup->) Header field.
Middle-click on an object: Will open the "Object Properties" dialog.
Middle-click not on an object (html body etc): Will open the "Form Properties" dialog.
Code: Select all
function getObjIdFromId(id) {
if (id !== null) {
var f = window.nuSERVERRESPONSE;
var objId;
for (var i = 0; i < f.objects.length; i++) {
if (f.objects[i].id == id) {
objId = f.objects[i].object_id;
return objId;
}
}
}
return null;
}
function handleMiddleClick(e) {
if (window.global_access) {
if (e.button === 1) {
var id = e.target.id;
if (id == "nubody" || id == "nuRECORD" || id == "nuhtml") {
// Form Properties
nuForm('nuform', window.nuFORM.getCurrent().form_id, '', '', 2);
} else {
var objId = getObjIdFromId(e.target.id);
if (objId !== null) {
// Object Properties
nuForm('nuobject', objId, '', '', '2');
}
}
}
}
}
function nuOnLoad() {
document.addEventListener("mousedown", handleMiddleClick, false);
}
-
- Posts: 36
- Joined: Sat Jun 02, 2018 1:26 pm
Re: Easier way to open Object Properties Dialog?
I see. You got a better idea?admin wrote:amit,
Sorry, we won't be doing that.
Steven
@Kev1n: Thanks, that's brilliant!