This is not something I really wish to do, but as I've said before: I'm maintaining an installation in which the calendar has been hacked somewhat. My schedular module is meant to replace a lot of the functionality, but that is far from ready. I was thinking of setting up a fork (and yes, calling it 'Calendar4Me'), so that I can update this install and get the goods from Business Maps, better global variables and so on... My question is, is the module still 'forkable', or is it integrated with the system in such a way that forking is no longer an option at this point?
Thread Rating:
Forking the Calendar4You module
|
07-28-2016, 01:48 PM
I think this can be done, although we have tied the module to the rest of the application, in major part it is the application that will look for C4You instead of the old calendar, the C4You module has been enhanced to play better with other modules but those changes are inside the module.
It will still be a bit of work though. Maybe it would be better to see the set of changes that have happened in the module since you modified it and see if you can adapt those without losing your changes.....
Joe
TSolucio
In that case yes, this may be the better way. My changes occur mostly occur in addEventUI.php (which is weird, you would expect a TPL file for this). Here I add some input fields and attach jQuery UI's autocomplete. One to fill the parent_id (which is always an account in this case) and fills the native CRM's field. This also auto-updates the subject field with the activitytype concatenated by the account name. The account's address auto fills the second input field I added, which is location. The third auto input field also has an auto-complete function attached and fills the salesorder number (and limits the autocomplete to the salesorders from the account field). For this, I created a new database table called 'so_activityrel'. A separate PHP file fills this table.
In the file that retrieves the events (I think it is the main PHP file of the module) I added some things to retrieve the related salesorder and add it to the white pop-up you see when you click an event. There's also some javascript in place that prevents an event from saving if no salesorder was chosen and that updates the salesorder's due date to the event date (and sets the salesorder's status to the custom status 'planned') when an event is saved with a sales order picked. This also required an extra php file. This is what I hacked into the module as far as I can remember from the top of my head. I'll create a github repo from the install to point to the exact changes.
07-30-2016, 03:15 PM
Okay, my changes include these mostly:
07-30-2016, 03:32 PM
(07-30-2016, 03:15 PM)Guido1982 Wrote: [*] Add jQuery UI: https://github.com/Luke1982/crm-cbx/blob/master/modules/Calendar4You/addEventUI.php#L166-L178 You don't need to load jquery-ui, we have eliminated prototype and now load jquery and jquery-ui globally. You may have to load the CSS but you can do that with an link to avoid having to modify the code. A quick look at all the other changes and I'd say that your easiest path right now is to redo the changes, it is just copying the code over, git merge may even do it for you (!) Althought you may be able to do some using a link to load your javascript, specially if you look for some field or element to make sure you are overriding the right screen, but it just makes it more complicated and you don't have that much code there. Just add it and let git merge and manual inspection take care of it for you.
Joe
TSolucio
08-02-2016, 09:54 AM
(07-30-2016, 03:32 PM)joebordes Wrote:[*](07-30-2016, 03:15 PM)Guido1982 Wrote: [*] Add jQuery UI: https://github.com/Luke1982/crm-cbx/blob/master/modules/Calendar4You/addEventUI.php#L166-L178[*] I think my path will be:
Other than that this install keeps storage out of the backup but I think I will manually change this for now.
08-05-2016, 08:15 AM
Had some github issues, where I'm now in the process of cloning all my repo's again to local storage. May take some time.
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)