NetTalk Central

Author Topic: Editing CSS from the Browser Side of a NetTalk Web Server  (Read 4551 times)

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Editing CSS from the Browser Side of a NetTalk Web Server
« on: March 29, 2011, 07:50:22 AM »
I have a chap who is pretty good at style sheets. Infinitely better than I am. I thought that the Browser would automatically download the style sheets onto his local machine with Nettalk 5 Web server and use the local ones. Did I misunderstand this process?
 In effect I was hoping that he could modify the local css sheets and he could see his changes, but it appears that the Nettalk webserver always goes back to the server for the css when a page is refreshed. Is there something I can do that would enable him to experiment with the CSS without giving him full access to my Server directories?
NT5 PR26
6.3 9055

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Editing CSS from the Browser Side of a NetTalk Web Server
« Reply #1 on: March 29, 2011, 08:00:22 AM »
yeah, ok, you're slightly misunderstanding it.
In some sense, yes, it will use the styles from the "cache" - but you can't edit the cache locally. When he presses F5 the browser "refreshes the cache" so it fetches the file from your server.

So what options do you have;

First a couple ground rules;

a) firstly - if you have compressed and combined turned on then the designer would need to edit the root css file, but then run the gzipall.bat to create the all.css and all.css.gz files. So while he's designing it's probably best for you to turn combined & compressed _off_ until he's done, then you run GzipAll to squish them all back together.

b) the rules of "what" files he edits remain in force - ideally you create a single "custom" css for your app, and this is the only file he needs to edit. Editing the shipping css would be sub-optimal. (The only exception to this rule is if you use an alternative jQuery style as the style file for the app - in which case that file can be created, and then hand-edited if desired.)

next - some approaches;

a) The easiest approach is to give him a "local copy" of the site. ie something he can install on his own machine, and edit the css there - then send it to you when it's done. This is the fastest for him. Obviously this is easier for TPS than for SQL.

b) give him ftp access to the _css_ folder only. (Or if you like, the whole web folder). If you are gonna do this though, and you are making an SSL site, please make sure your certificates are _not_ in a place he can get to.

c) set your "styles" options so that the custom css file comes from a different location - perhaps from his hard drive. I'll need to experiment with this a bit to see what's possible. I'm not sure if the browsers will allow it (if they do it'll be way cool!)

I'll experiment a bit with option 'c' and keep you posted on that.

cheers
Bruce



britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Editing CSS from the Browser Side of a NetTalk Web Server
« Reply #2 on: March 29, 2011, 08:04:44 AM »
Thanks Bruce. Option a) is a problem because it is tied to an internal SQL db.
Option b) requires that I setup FTP on this server, which I really didn't want to open up.
Option c) would be perfect if it works.  ;D ;D
Brian
NT5 PR26
6.3 9055

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Editing CSS from the Browser Side of a NetTalk Web Server
« Reply #3 on: March 30, 2011, 03:35:40 PM »
HI Bruce,
When I try to use an url for the styles, i get a leading '/'  which is probably causing me grief. See below:

GET /http://www.trendfuel.com/synovaTest/chromemenu.css HTTP/1.1
Host: 127.0.0.1:2090
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.16) Gecko/20101130 Firefox/3.5.16 (.NET CLR 3.5.30729)
Accept: text/css,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://127.0.0.1:2090/
Cookie: SESSIONID=2029121394
NT5 PR26
6.3 9055

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Editing CSS from the Browser Side of a NetTalk Web Server
« Reply #4 on: March 30, 2011, 11:47:13 PM »
This is a sufficiently interesting question, with a suitably interesting answer, that I've posted the answer here;
http://www.nettalkcentral.com/index.php?option=com_smf&Itemid=36&topic=1970.0

Hope this is what you wanted Brian.

Cheers
Bruce

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Editing CSS from the Browser Side of a NetTalk Web Server
« Reply #5 on: April 01, 2011, 07:59:18 AM »
Thanks Bruce,
This works fine. I just pointed the custom.css to his Web Server (which is probably IIS) and he can make changes to his hearts content. Real nice way to collaborate over long distances.
Cheers.
NT5 PR26
6.3 9055