pombreda / scalr

Automatically exported from code.google.com/p/scalr
0 stars 0 forks source link

Invalid paths for js & css files in class.LibWebta.js #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I hit the syslogs_view.php I see errors in the logs resulting from
invalid paths. It seems to be a result of the following code which prepends
js and css paths with a redundant (in some cases) js or css. So it seems
like a simple fix might be to check for an existing js or css in the
beginning of the path and not adding it if it's already there.

Here's the offending code:

   if (library.indexOf(".js") != -1) {
                        // load js library
                        document.writeln("<script type='text/javascript'
src='js/"+ library +"'></script>");
                }

                if (library.indexOf(".css") != -1) {
                        // load css style sheet
                        document.writeln("<link href='css/"+ library +"'
rel='stylesheet' type='text/css'>");
                }

Original issue reported on code.google.com by rob.mo...@gmail.com on 17 Jul 2008 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by alex.kovalyov@gmail.com on 28 Jul 2008 at 11:08

GoogleCodeExporter commented 9 years ago

Original comment by dicsydel@gmail.com on 7 Aug 2008 at 7:32