This topic is locked

Category Color Not Working

4/22/2015 9:23:04 AM
Calendar Template general questions
C
cjsaputo author

I have created a calendar project where everything works fine. I just created a second calendar project but the color picker on the add category screen does not generate the hex code. I have tried resetting the add page and looked at the event code. All this appears identical to the project that is working.
Any ideas as to why the color picker may not be working? The project is on the demo system as RCH Scheduling.
Thanks, Chuck

A
Anapolis 4/25/2015



I have created a calendar project where everything works fine. I just created a second calendar project but the color picker on the add category screen does not generate the hex code. I have tried resetting the add page and looked at the event code. All this appears identical to the project that is working.
Any ideas as to why the color picker may not be working? The project is on the demo system as RCH Scheduling.
Thanks, Chuck


You may have this already figured out, but usually things that depend on javascript, like pickers of time or color, or tabs that don't slide, etc. stop working when 2 sources of javasacript collide and some of the loaded rules apply to two different things on the page, cancelling some or all actions out.
I could tell you the specific js. (javascript or jQuery script files) if I had that project open, but I am in the midst of another thing.
However in this case to compare the different projects I would use a tool like Merge to be able to see the page code, the source code, from each project side-by-side.
Put the "Good code" in the leftside column, the non working source code in the righthand column.
You want to see what is PRODUCED in the browser after the page loads from the server.
Line by line first look to see if the header is exactly the same in regards to the same CSS and same JS files loaded for the Good and the Bad project.

If they do not match, if one file is missing in the Bad project, test it by using the same compare tool to add the file from the left column to the right column and Save.
View the page in a browser to see if the colorpicker now works.
But, in PHPRunner pages the javascript coding gets written into the page itself either below the header in the body or between the end of the body tag and the start of the Body tag.
Compare the javascript lines to see if there is even 1 "minor" difference. Even a missing comma, for instance, might be enough to disable the javascript from working on the colorpicker.
Then continue to look at the lines before and after where the colorpicker is called for in the html code.
Then look at the bottom of the page where a lot of javascript resides in the footer or in that lower region of the fully coded page.
As to Fixing it, that's another matter too much for here.
But it will help tremendously to learn where the 2 projects using the code picker are different in those areas.

C
cjsaputo author 4/28/2015

With additional testing as described below I have found that it is NOT due to the addition of the "Room" table. I went back to a clean version of the project and it tested fine. I then changed a few settings on the "Pages" screen WITHOUT adding the "Room" table and the same problem occurred.
The setting changes were made to the "calcalendar" table to turn off "Show search panel" and add "Basic search" and "Ajax". I also turned on all three "Popup" screens.
I compared the source and found that the working project source had about 112 lines of code in the source of the "Add Category" script. The other project had over 600 lines of code.
I started over with a new project and kept testing. The tests work until I add a new table to the project. I have created a "Room" table with three fields that allows me to schedule an event into a room based on capacity. As soon as I checked the box to add this table, I did a build and tested. This change is what is causing the "Add Category" script to stop working.
Any thoughts as to why this change is generating so much code in the script??
Thanks, Chuck



You may have this already figured out, but usually things that depend on javascript, like pickers of time or color, or tabs that don't slide, etc. stop working when 2 sources of javasacript collide and some of the loaded rules apply to two different things on the page, cancelling some or all actions out.
I could tell you the specific js. (javascript or jQuery script files) if I had that project open, but I am in the midst of another thing.
However in this case to compare the different projects I would use a tool like Merge to be able to see the page code, the source code, from each project side-by-side.
Put the "Good code" in the leftside column, the non working source code in the righthand column.
You want to see what is PRODUCED in the browser after the page loads from the server.
Line by line first look to see if the header is exactly the same in regards to the same CSS and same JS files loaded for the Good and the Bad project.

If they do not match, if one file is missing in the Bad project, test it by using the same compare tool to add the file from the left column to the right column and Save.
View the page in a browser to see if the colorpicker now works.
But, in PHPRunner pages the javascript coding gets written into the page itself either below the header in the body or between the end of the body tag and the start of the Body tag.
Compare the javascript lines to see if there is even 1 "minor" difference. Even a missing comma, for instance, might be enough to disable the javascript from working on the colorpicker.
Then continue to look at the lines before and after where the colorpicker is called for in the html code.
Then look at the bottom of the page where a lot of javascript resides in the footer or in that lower region of the fully coded page.
As to Fixing it, that's another matter too much for here.
But it will help tremendously to learn where the 2 projects using the code picker are different in those areas.