Moodle

create loader for cached and minimised JS

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: 2.0
  • Component/s: General
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE
  • Fixed Branches:
    MOODLE_20_STABLE

Description

see http://code.google.com/p/minify/

should be used in theme CSS too

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

assigning, please file a patch first before commit

Show
Petr Škoda (skodak) added a comment - assigning, please file a patch first before commit
Hide
Sam Hemelryk added a comment -

Hi Petr, have attached a patch to utilise Minify when serving CSS and JavaScript:
Minify is now used in the following files:

  • lib/javascript.php
  • theme/javascript.php
  • theme/styles.php

Cheers
Sam

Show
Sam Hemelryk added a comment - Hi Petr, have attached a patch to utilise Minify when serving CSS and JavaScript: Minify is now used in the following files:
  • lib/javascript.php
  • theme/javascript.php
  • theme/styles.php
Cheers Sam
Hide
Sam Hemelryk added a comment -

Petr,
Any chance you could have a look at this patch when you get a moment?

Cheers
Sam

Show
Sam Hemelryk added a comment - Petr, Any chance you could have a look at this patch when you get a moment? Cheers Sam
Hide
Petr Škoda (skodak) added a comment - - edited

oops, sorry - looks ok, +1 for commit

Show
Petr Škoda (skodak) added a comment - - edited oops, sorry - looks ok, +1 for commit
Hide
Sam Hemelryk added a comment -

Cool, thanks for looking at this Petr, I have commit now.
Cheers
Sam

Show
Sam Hemelryk added a comment - Cool, thanks for looking at this Petr, I have commit now. Cheers Sam
Hide
Petr Škoda (skodak) added a comment -

I have found a major security security issue - see the linked issue...

Show
Petr Škoda (skodak) added a comment - I have found a major security security issue - see the linked issue...
Hide
Petr Škoda (skodak) added a comment -

reopening, going to fix cache location and purging of caches

Show
Petr Škoda (skodak) added a comment - reopening, going to fix cache location and purging of caches
Hide
Petr Škoda (skodak) added a comment -

done

Show
Petr Škoda (skodak) added a comment - done
Hide
Sam Hemelryk added a comment -

Thanks for spotting and fixing that Petr

Show
Sam Hemelryk added a comment - Thanks for spotting and fixing that Petr
Hide
Steve Clay added a comment -

You might consider using these fixed files from the next Minify release:

http://code.google.com/p/minify/source/browse/branches/2.1.4/min/lib/JSMin.php

  • 2.1.3 version would break code that used syntax like "i++ +" (often output by the Closure compiler). JSMin now scans for syntax like these and leaves the input as-is if found
  • handles rare environments where mbstring.func_overload >= 2

http://code.google.com/p/minify/source/browse/branches/2.1.4/min/lib/Minify/CSS/Compressor.php

  • normalizes whitespace around negative CSS values (not a huge deal)

I can't wait to get a 2.0 install to test on. Ping me if you need any more info on Minify...

Show
Steve Clay added a comment - You might consider using these fixed files from the next Minify release: http://code.google.com/p/minify/source/browse/branches/2.1.4/min/lib/JSMin.php
  • 2.1.3 version would break code that used syntax like "i++ +" (often output by the Closure compiler). JSMin now scans for syntax like these and leaves the input as-is if found
  • handles rare environments where mbstring.func_overload >= 2
http://code.google.com/p/minify/source/browse/branches/2.1.4/min/lib/Minify/CSS/Compressor.php
  • normalizes whitespace around negative CSS values (not a huge deal)
I can't wait to get a 2.0 install to test on. Ping me if you need any more info on Minify...

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: