Javascript Plugins

Discussion for TimeTrex open source community developers.
Post Reply
royalpublishing
Posts: 11
Joined: Mon Nov 30, 2015 3:30 pm

Javascript Plugins

Post by royalpublishing » Thu Jan 07, 2016 12:37 pm

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.

shaunw
Posts: 7360
Joined: Tue Sep 19, 2006 2:22 pm

Re: Javascript Plugins

Post by shaunw » Thu Jan 07, 2016 2:30 pm

Can you provide more details as to what kind of customizations you are wanting to make?

royalpublishing
Posts: 11
Joined: Mon Nov 30, 2015 3:30 pm

Re: Javascript Plugins

Post by royalpublishing » Fri Jan 08, 2016 7:51 am

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.

shaunw
Posts: 7360
Joined: Tue Sep 19, 2006 2:22 pm

Re: Javascript Plugins

Post by shaunw » Fri Jan 08, 2016 8:19 am

I understand, unfortunately there is no plugin system for the javascript infrastructure at this time, though one is being worked on.

Post Reply