#44 Declined
Repository
ametad ametad
Branch
default
Repository
Crisu83 Crisu83
Branch
default

Added clientScript packages to control the order of published assets

Author
  1. ametad avatarametad
Reviewers
Description

Added clientScript packages to control the order of published assets. Also added padding to the body with a new CSS file: 'bootstrap-bodypadding.css'. This file is published after the 'bootstrap.min.css' and before the 'bootstrap-responsive.min.css'. This is is how it's done by Twitter as seen in the examples on their site.

Comments (11)

    1. ametad author

      Yes that is true and I see now that the current way it is not been done careful enough... But I think the use of packages directly is a good approach. And just like using CClientScript::registerScript() where you have to give an unique ID, an unique ID must be given to the package. That is usually done with some extra randomness trying to ensure that the scriptID is unique. When I find the time I will implement it. Is this covering your question Suralc?

      1. suralc

        I agree that introducing of packages is a good step. But I had concerncs about your implentation, as one of my own extensions is registering a package before bootstrap is even loaded.

          1. suralc

            I implemented(or well, abuse) a custom filter in my Controller and extended CClientScript to ease managing of packages (remove/modify after registration etc..)

            1. ametad author

              Thank you for your feedback. I don't understand the problem here I think... If another module registers it's own packages and after that another module does the same, then there will be no problems if the ID's are unique right? Can you help me understand what problem you see?

  1. ametad author

    Oké thanks Christoffer! Perhaps this helps you to decide what to do with this. On the YII forum I wrote something to explain the need for my pull request, IMHO: http://www.yiiframework.com/forum/index.php/topic/23982-extension-bootstrap/page__view__findpost__p__161086

    ----------- BEGIN QUOTE Important for the responsiveness to work well with the collapse-able NavBar, is that the 'body{padding-top:60px;} is right in between the normal sheet and the responsive sheet. Because some responsiveness has to overrule the padding of the body to be zero when the NavBar collapses. END QUOTE -----------

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.