Page 1 of 1

Javascript Plugins

Posted: Thu Jan 07, 2016 12:37 pm
by royalpublishing
After following some other posts on how to create plugins in the classes/modules/plugins directory, how would one go about creating a plugin to manipulate the /interface/html5/views/employees/EmployeeViewController.js javascript functions to make some customizations to the employees page on the web interface? There weren't any examples on that one so it wasn't exactly clear on how to do it and I don't want my changes to get lost during an upgrade. Any help would be greatly appreciated and thank you in advance.

Re: Javascript Plugins

Posted: Thu Jan 07, 2016 2:30 pm
by shaunw
Can you provide more details as to what kind of customizations you are wanting to make?

Re: Javascript Plugins

Posted: Fri Jan 08, 2016 7:51 am
by royalpublishing
Basically, I want to add an additional user defined field or fields to the users table and make them available on the employee SEARCH and ADVANCED SEARCH screens. Using the plugin model for the UserFactory and UserListFactory I can easily enough add a line or two to the SQL to rewrite the functions I need to obtain the additional field, but I'm not sure how to make changes to the functions in the javascript model to be able to retain those customizations after a software upgrade.

I've seen other posts where people have requested the same functionality so I was attempting to write a plugin to do it. In the software, you do have the ability to create OTHER_ID1-5 and assign it to places but no means to add it to the search screens, which kind of renders it's functionality somewhat limited.

Re: Javascript Plugins

Posted: Fri Jan 08, 2016 8:19 am
by shaunw
I understand, unfortunately there is no plugin system for the javascript infrastructure at this time, though one is being worked on.