Eonasdan datetimepicker v4 version - jquery-ui

I have lot of datetimepicker in my module. Currently I am using bootstrap datetimepicker v3 version. Some issues are there here. So I will try to use the next version. In v4 version lot of problem has been resolved. So please kindly help me what are the js and css files I have include in my jsp page for using the bootstrap datetimepicker v4 version.

You can follow the installation instructions and manual and demos.
Quoting:
Minimal Requirements
jQuery
Moment.js
Bootstrap.js (transition and collapse are required if you're not using the full Bootstrap)
Bootstrap Datepicker script
Bootstrap CSS
Bootstrap Datepicker CSS
Locales: Moment's locale files are here
Scripts needed:
<script type="text/javascript" src="/path/to/jquery.js"></script>
<script type="text/javascript" src="/path/to/moment.js"></script>
<script type="text/javascript" src="/path/to/bootstrap/js/transition.js"></script>
<script type="text/javascript" src="/path/to/bootstrap/js/collapse.js"></script>
<script type="text/javascript" src="/path/to/bootstrap/dist/bootstrap.min.js"></script>
<script type="text/javascript" src="/path/to/bootstrap-datetimepicker.min.js"></script>
CSS styles
<link rel="stylesheet" href="/path/to/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />

Related

JQuery mobile 1.3.1 vs 1.4.5

i just want to know why if in include the jquery mobile 1.4.5, all my links didn t work. But if i include 1.3.1, the links works (but not my button on the left header).
here my website: Fric-Afrique
<script type="text/javascript"
src="http://fric-afrique.fr/ext/jquery_1.11.4/jquery.min.js"></script>
<script type="text/javascript"
src="http://fric-afrique.fr/ext/jquery.mobile-1.4.5_new/demos/_assets/js/index.js"></script>
<script type="text/javascript"
src="http://demos.jquerymobile.com/1.4.5/js/jquery.mobile-1.4.5.min.js"></script>
thank you for your help

Rails pages are linking in non-existent css file when using Stylus

I am trying to use Stylus with a Rails 4 project, but the asset pipeline seems to be naming the compiled CSS wrong and/or linking to the wrong file. If I generate some assets (rails g assets static_pages) the served pages all end up trying to link to a file that doesn't exist:
<link data-turbolinks-track="true" href="/assets/static_pages.css?body=1" media="all" rel="stylesheet" />
I'm using the stylus gem and I've removed the default one for SASS from my Gemfile. I've also tried stylus_rails, but that seems to be deprecated and it didn't change anything anyways. Has anyone else encountered this issue when using stylus with rails?
I'm really at a loss here; any help would be appreciated. Thanks!

Rails 3, IE assets

Is there a good practice to organizing stylesheet/javascript asset files specifically for IE browsers with asset pipeline enabled in Rails 3? For example, I do not want to litter my .html.erb files with conditional comments similar to below for browser detections.
<!--[if !IE]> -->
According to the conditional comment this is not IE<br />
<!-- <![endif]-->
You could put them into a partial in app/views/layouts/. This is also what Michael Hartl does with HTML5 Shim his tutorial: http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec-partials

File asset fingerprint is not updating correctly on Rails 3.1

In my rails 3.1 app, while deploying, the assets is compiled and gets uploaded successfully.
When I visit the app, the css and js files are referenced but the server give back 404.
<link href="/assets/application-f997bad128b3d8a92ed5619470851dab.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-d7eac22b3bc8b4e3620abb21f59a5faa.js" type="text/javascript"></script>
Looking on the server, the fingerprint that is printed on the html markup doesn't match so the server returns 404.
But I wonder how the hell this happens.
So, what are the factors that change the fingerprinting of the manifest files?
Maybe your server wasn't reloaded. I've experienced this issue when Unicorn didn't switch over after sending the USR2 signal to the process. I had to manually kill and restart the process to get it going again.

Rails 3 project, installed jquery-rails gem, but getting "Ajax is not defined"

I'm a rails newbie trying to follow a howto on how to perform some Ajax calls (after switching to jQuery), but I've run into a problem.
Whenever I trigger the ajax code (new Ajax.Request()), I get "Ajax is not defined" in firebug. Anyone with more skills than me know what's up here?
update:
For anyone else having this problem, the code that was generating the the above code, was a call to remote_function()
What I have done to set things up:
Added "gem 'jquery-rails', '>= 1.0.12'" to my gemfile, and run bundle install
Run rails generate jquery:install
My public/javascripts/ folder thus has the following files:
application.js
jquery.min.js
jquery-ui.min.js
jquery.js
jquery-ui.js
jquery_ujs.js
The scripts included in my HTML look like this:
<script src="/javascripts/jquery.js?1312911234" type="text/javascript"></script>
<script src="/javascripts/jquery-ui.js?1312911234" type="text/javascript"></script>
<script src="/javascripts/jquery_ujs.js?1312911234" type="text/javascript"></script>
<script src="/javascripts/application.js?1312911234" type="text/javascript"></script>
I'd guess that your tutorial uses Prototype as Ajax.Request is for Prototype, you should be using $.ajax with jQuery. And switching to a jQuery based tutorial might be a good idea too.
You say that you're using remote_function but that's Prototype-specific:
Usage
To be able to use these helpers, you must first include the Prototype JavaScript framework in your pages.
Prototype used to be the default JavaScript library for Rails so I suspect that PrototypeHelper is a leftover. You probably want to look at things like the :remote option on link_to and similar for new code.

Resources