moving js out of get_snippets view.html.php #199
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#199
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "patch-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull Request for Issue #198 gh-198 .
Summary of Changes
moved javascript from php to separate js file
changed js string injection to use the Joomla provided method (JText::script())
modified JS to utilize the Joomla JS translated string method. (Joomla.JText._())
Testing Instructions
use get_snippets
Expected result
it works
Actual result
it works
Documentation Changes Required
none
I must tell you (this really helps) I can now clearly see what I should do to make this work in JCB and add it to the compiler.
But okay we have a few issues here, as you may know JCB is build with JCB right... do you understand what that means? Some parts of JCB is build in JCB.
Here is a few screen shots:
So that means it is only the compiler that we can directly edit but the views, the models, controllers are all edited via JCB itself.
What that means at this time:
When it comes to interface changes I must do it in the JCB interface, buy the Dev's that have the JCB mapped in JCB. At this time only @ro-ot and I have this mapped JCB in JCB package, when I make changes to JCB I share it with him via a Dropbox file we share, same if he makes changes I get a update, so each of us just imports it again and therefore have the latest version and changes in his JCB. At this time I am the only one pushing the changes to the repository we make to the Dropbox package.
That is why in the issue I asked for examples so I can do that change, sorry if I did not make that clear enough. Here I made a quick little tutorial to try and explain the work flow a little more. May be I should add it to the pull request guidelines so all understand how it works. There is so much happening around JCB that I am little behind in setting all things in place to insure all understand, but I am doing my best.
Your eagerness to contribute is truly appreciated, and I hope that the little tutorial and this bit of explanation will help you navigate the poetry 👍 with more ease.
Okay I just added the tutorial to the contribution guidelines
Please give my your feedback on this if it is clear and really what you think... I am very interested what other in the community think 👍
I understood that JCB is built with JCB. That's the main reason I didn't populate the script translations using a loop. I tried to create what I thought the compiler would create once JText::script was added and the javascript was removed to a different part of the view form (which is also why I placed the javascript in the assets folder instead of where I prefer in a media subfolder.)
You asked for an example - so I gave one that I thought would be informative.
Tank you very much, it was very informative and will pave the way to improve JCB!!!
Yet looking at the work flow and what I explained as the road map forward, what is your take on that :)
It is enlightening to see how JCB is organized within JCB - that's got to be massive. how many thousand fields?
I'm going to take the conversation back to the issue - there's the question of the need for known constants in javascript.
Yes it is massive, but JCB is by far not the largest component I have build with JCB.
JCB has 1529 fields at this time 👍 I just added a field counter to JCB so we can see that per component after compilation... lol
Okay yes we can continue the conversation on the issue, I will do some changes in the compiler first and then push them up and see if I understood.
Pull request closed