After updating my local repos to the latest changes JS on my demo server stopped to work. I checked the paths and seems like JS is loading normally. I thought it could be something with the sync and run local VM server. But unfortunately there is the same problem - JS is loading normally but not working. I tried to dig but nothing found... :(
Well today it is ok
I do not know what happened, is it a browser cache or something else... But yesterday filters and sorting were not working and an error like TypeError: $ is undefined was thrown.
Ok talking about bootstrap.js - with the Bower it seems like Bootstrap is loaded as separate libraries and I fixed the popover adding
vendor/bootstrap/js/bootstrap-tooltip.js
vendor/bootstrap/js/bootstrap-popover.js
The question is - do we want to require separate files all the time (more http requests) or it is better to have one combined bootstrap.js? If we want separate we could use such toold like Minify to combine all our JS files.
I remember that I saw the same thing on your server yesterday before you opened the issue, so I think it was not your browser (or maybe it was mine too
)
As for Bootstap: IDK ![]()
Maybe it's not meant to be included this way but minified or processed otherwise before adding it to the live site ?
I was just happy to remove the whole external stuff from our main code base...
Experts please ![]()
Hey Guys:
I'm running into issues with Bootstrap too myself. I just ran a clean install of the issue tracker app, and after installing I'm seeing calls to bootstrap / other JS:
GET http://jissues.local/vendor/jquery/jquery.min.js 404 (Not Found) jissues.local/:383
GET http://jissues.local/vendor/bootstrap/js/bootstrap-affix.js 404 (Not Found) jissues.local/:384
GET http://jissues.local/vendor/bootstrap/js/bootstrap-tab.js 404 (Not Found) jissues.local/:386
GET http://jissues.local/vendor/bootstrap/js/bootstrap-dropdown.js 404 (Not Found) jissues.local/:385
GET http://jissues.local/vendor/bootstrap/js/bootstrap-popover.js 404 (Not Found) jissues.local/:395
GET http://jissues.local/vendor/bootstrap/js/bootstrap-tooltip.js 404 (Not Found)
That said, when I check the vendor directory 'bootstrap' isn't even there. I didn't see it in composer or anywhere else either to include it. Any ideas?
Did you pull in all the media using Bower? (Is that in the docs at all by chance?)
Do we have anything about Bower in our Documentation ?
... (@todo scrape #170)
I think we should go with the Grunt to manage our JS and CSS. It's very useful for minimizing and concatenation. We could have all the vendor files for example in the build dir and in our www we could have minimized and concatenated versions under JS and CSS dirs.
I think we should go with Grunt for minifying and "packing" stuff. We are already using bower, so it makes sense to use Grunt instead of Ant, Phing or something. TBH I know very little about Grunt, but it looks promising ![]()
I'm not sure about the vendor files in the build dir. Don't we want the uncompressed versions available for development? How would that work?
That's a good question :) Sure we should left them for the debug purposes. We could copy only the necessary files form the build dir. That's will be an automated Grunt task ;)
For example we could have the following www dir:
\js
\debug (copy here needed uncompressed files)
tracker.js
jquery.js
bootstrap-tooltip.js
\vendor (created compressed and concat vendor files)
jquery.min.js
bootstrap.min.js
blueimp.min.js
tracker.concat.min.js (our compressed and concat staff)
\css
\debug
vendor files css files
\vendor
vendor1.concat.min.css
vendor2.concat.min.css
tracker.concat.min.css
Or
\js
\debug (copy here needed uncompressed files)
tracker.js
vendor1.js
vendor2.js
vendor.concat.min.js (vendor compressed and concat staff)
tracker.concat.min.js (our compressed and concat staff)
\css
\debug
tracker.css
vendor1.css
vendor2.css
vendor.concat.min.css
tracker.concat.min.css
Actually we could play around with that.
I'm not sure which I like more - both look good ;)
Just a small naming thingy that came to my mind:
We should rename tracker to custom. So that would make
tracker/core/
custom/tracker
Or in your example:
vendor.concat.min.css
custom.concat.min.css
I think that would make things clearer, but it's just naming.
I'd be in favor to bring in Grunt, set up "something" and see how it works.
I'd be in favor to bring in Grunt, set up "something" and see how it works.
Let me do it :)
Go for it ![]()
Here we go :) To play with it checkout grunt branch then issue two commands:
npm install grunt-cli -g
npm install
These will install grunt cli app and grunt modules specified in the package.json file. After that type:bower install
This will download vendor files to the build/www/vendor directory.
And finally type grunt and the magic will happen - you should have concat and concat.min files under www/css and www/js ;) Examine Gruntfile.js and you will understand how easy it works. Here you will find nice tutorial about Grunt.
vagrant up and test it :) Please note that I did not include all vendor css files and did not modified all template files. It's just main page working using concatenated and minified versions.
Everything works as expected. Very nice ![]()
Still not sure how we would handle this during development, but we'll see... Maybe create a "debug.media" config setting and load the custom files that are subject to modifications one by one ?
Still not sure how we would handle this during development, but we'll see...
Why we can't just use a concat version?'
load the custom files that are subject to modifications one by one ?
Do not completely understand what do you mean.
Let's up it :)
Still not sure how we would handle this during development, but we'll see...
I see now what you are talking about. May be during development we can add the code to the custom.concat.js and then just copy it to the build directory?
And one more problem I see here is a CSS vendor files - they all have a relative paths to images and if we will have one custom.concat.min.css how do we manage these paths?
Thinking more about it I came to conclusion that we will have more difficulties to maintain it under two files. May be we should leave it and make concat/min files only within vendors? For example, use Grunt to concatenate all BS files into the one or all Upload files into the one.
Not an issue
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-08-07 00:47:40 |
| Closed_By | ⇒ | elkuku | |
| Build | ⇒ | master |
Which part is not working ?
I notice that in the issues list view, the popover is not working, due to missing bootstrap.js files...
Stuff like the dropdowns from the main menu seem to work.