moving js out of get_snippets view.html.php #199

Closed
stutteringp0et wants to merge 2 commits from patch-4 into staging
stutteringp0et commented 2017-12-13 04:50:35 +00:00 (Migrated from github.com)

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

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:
image
image
image

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.

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: ![image](https://user-images.githubusercontent.com/5607939/33940874-5c8ccaf0-e019-11e7-9ab1-41578fd5909d.png) ![image](https://user-images.githubusercontent.com/5607939/33940899-7674b978-e019-11e7-8618-4512ed2dac20.png) ![image](https://user-images.githubusercontent.com/5607939/33940915-8162d45a-e019-11e7-895c-cae393b93289.png) 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](https://github.com/vdm-io/Joomla-Component-Builder/issues/198) 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](https://youtu.be/lLOfx9YA7VQ) 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 :+1: 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 👍

Okay I just added the tutorial to the [contribution guidelines](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/.github/CONTRIBUTING.md) 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 :+1:
stutteringp0et commented 2017-12-13 16:47:39 +00:00 (Migrated from github.com)

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.

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 :)

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 :)
stutteringp0et commented 2017-12-13 17:54:07 +00:00 (Migrated from github.com)

It is enlightening to see how JCB is organized within JCB - that's got to be massive. how many thousand fields?

It is enlightening to see how JCB is organized within JCB - that's got to be massive. how many thousand fields?
stutteringp0et commented 2017-12-13 17:57:39 +00:00 (Migrated from github.com)

I'm going to take the conversation back to the issue - there's the question of the need for known constants in javascript.

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.

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 :+1: 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

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#199
No description provided.