john talbott - Render Scripts

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2456
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

john talbott - Render Scripts

Post by Jaymer »

Hi
I like (even though I know nothing about JQuery) what you're doing with the render scripts.

var myFormBody = $("#" + parser.m_formId).find (".aw-form-body");
myFormBody.css ("background-color", "#ffffff");
myFormBody.css ("border-style", "none");

I don't know why it works - looks like 3 totally independent statements = but thats another issue.

How about this scenario:
A guy just asked about removing the alternating gray lines in output tables.
One option is to do custom.css. I have done that.
In reading older forum posts, I think I saw something about a "home.css" (or similar) that was always opened, but I don't see that actually being used.
What if you just edited kendo.bootstrap.min.css and changed the background color on the k-alt item?
Thats going to easily change it everywhere and you wouldn't need to edit every stinking form.

Similarly, couldn't you find the objects you are replacing above (in the example) in the "master css"?
I'm just wondering what (if any and probably minuscule) extra effort is having to be done at runtime to apply these render instructions?, not to mention that THAT code is hidden way down deep in obscure places thoughout a large BSV.

thx
jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: john talbott - Render Scripts

Post by johntalbott »

Using jQuery for changing styles gets the job done quickly, but it's not the cleanest.

Creating a custom CSS file with custom CSS classes is the most elegant approach. Vlad contrasts the two approaches in this tutorial where he hides the query header ... https://youtu.be/A82fCezQK_g?t=6m29s

For the alt row scenario, you could update the master css. In most cases, you'd likely be better off overriding the master css using a custom css file so you can leave the master css alone.

From what I've seen so far, that seems to make the most sense.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
Post Reply