What Javascript changes do you make?
|
Posted
#86001
(In Topic #17624)
|
|
|---|---|
|
ocStaff (admin) |
So I am going to see if we can isolate out areas people are likely to change into separate files. So what do you change? I write this as I just spotted a case myself – people wanting to change WYSIWYG editor settings would override JAVASCRIPT_EDITING.tpl which is generally a very volatile file. So, if you can let me know, we can probably make upgrading slightly easier going forward. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
JAVASCRIPT_TREE_LIST.tpl Changed some hard-coded colours, specifically: black to #e6b05d x5 instances white to black x7 instances 316AC5 to #DEFFDE x2 instances I can see also at least on other colour in that code "gray", and there may be other colours, but I havent changed them. JAVASCRIPT_VALIDATION.tpl replace 2x ".3" to ".7" to improve the opacity of disabled field, like those on the "Edit image" screen. JAVASCRIPT_POSTING.tpl Not technically valid to this discussion because I'm bypassing the entire issue, you'll see why, but here it is anyway: In my forum post editor I have a custom "Insert Youtube Video" button that take a youtube url and extracts the video id and places it in a custom comcode tag. This template comprises of an include to the default template, like so: Code
{$BLOCK,block=fileinclude,path=themes/default/templates/JAVASCRIPT_POSTING.tpl}
Followed by my custom doInput_??? function. JAVASCRIPT_CUSTOM_GLOBALS.tpl But of course where we are supposed to make the changes here.
Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
|
|
Posted
|
|
|
Community saint |
EXCEPT FOR JAVASCRIPT.tpl in which I've made a minor change that allows me to replace 1 with 2 … So, in my case, I cannot be of any help whatsoever as I now toe the party line!
Take my advice. I'm not using it!
View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal |
|
Posted
|
|
|
ocStaff (admin) |
Thanks guys. I think I'll be solving these with CSS flexibility instead. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Well-settled |
|
|
Posted
|
|
|
ocStaff (admin) |
I've already added this into the new header, but commented out by default. There's something on the tracker about automatically doing that optimisation by statistical analysis (as there's a tradeoff here – losing modularity means downloading more initially even when non-needed – so ocPortal would need to detect what was the best tradeoff). There's quite a lot of performance stuff on the tracker, but all together it's a few weeks of work. If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Community saint |
|
|
Posted
|
|
|
Well-settled |
The other way is to comment out ckeditor and give the script tag an id and then strip out the comments when someone clicks on a button which in this case might be the search button. In this example ckeditor is there but it isn't even parsed until the tags are stripped. This second method can be used in cdata tags as well which is supposed to be even more efficient but I don't even know what cdata does or means so i don't mess with that yet. Gmail for Mobile HTML5 Series: Reducing Startup Latency - The official Google Code blog |
1 guests and 0 members have just viewed this: None
Control functions:









