Skip to content

Makes the plugin handle Bootstrap's JavaScript and CSS#37

Merged
KidSysco merged 4 commits into
KidSysco:masterfrom
benjamin-albert:bootstrap_support
Jan 4, 2016
Merged

Makes the plugin handle Bootstrap's JavaScript and CSS#37
KidSysco merged 4 commits into
KidSysco:masterfrom
benjamin-albert:bootstrap_support

Conversation

@benjamin-albert
Copy link
Copy Markdown
Collaborator

Personally I think we should handle and support Bootstrap as long as it isn't a huge unnecessary burden.

This pull request fixes #35 by making MonthPicker.js create an alias to jQuery UI's .button() that doesn't conflict with Bootstrap's button using jQuery UI's $.widget.bridge() method as shown:

// Makes $('.selector').jqueryUIButton(...); an alias of $('.selector').button(...);
$.widget.bridge('jqueryUIButton', $.ui.button);

It also adds the .month-picker table CSS rule that overrides
bootstrap's table CSS rule which messes up the layout.

IMPORTANT:
I've added Bootstrap to our bower devDependencies and test page, so make sure to run:

npm install

before running the tests.

If the 3.0 prototype will work fine with the latest bootstrap configurations we should mention this in the projects README when we release version 3.0

I'll discuss official Bootstrap support in depth in #31.

I personally had fun messing around and writing support for Bootstrap (something I wish I could do at work).

benjamin-albert and others added 4 commits January 1, 2016 17:05
1. Makes MonthPicker.js create an alias to jQuery UI's .button()
that dosen't conflict with Bootstrap's button.

2. Adds the .month-picker table CSS rule that overrides
bootstrap's table CSS rule which messes up the layout.
@KidSysco
Copy link
Copy Markdown
Owner

KidSysco commented Jan 4, 2016

I totally agree and that is what I was getting at. Bootstrap is a totally
competing framework, in fact, it doesn't make much sense to me to use both
jQuery UI and the Bootstrap framework. There are month pickers out there
for Bootstrap already that should probably be used for those projects. I
think I have one starred if you look at my stars. The problem is that
Bootstrap js code usually sucks. So folks try to integrate.

If it is dirt simple to add some Bootstrap support, OK. But Bootstrap is
not really what we do here so I do not think we should put much time into
it.

On Mon, Jan 4, 2016 at 7:19 AM, Benjamin Albert notifications@github.com
wrote:

Personally I think we should handle and support Bootstrap as long as it
isn't a huge unnecessary burden.

This pull request handles Bootstrap by making MonthPicker.js create an
alias to jQuery UI's .button() that doesn't conflict with Bootstrap's
button.

It also adds the .month-picker table CSS rule that overrides
bootstrap's table CSS rule which messes up the layout.

IMPORTANT:
I've added Bootstrap to our bower devDependencies
http://stackoverflow.com/a/19341028/1774484 and test page, so make sure
to run:

npm install

before running the tests.

If the 3.0 prototype will work fine with the latest bootstrap
configurations we should mention this in the projects README when we
release version 3.0

I'll discuss official Bootstrap support in depth in #31
#31.

I personally had fun messing around and writing support for Bootstrap

(something I wish I could do at work).

You can view, comment on, or merge this pull request online at:

#37
Commit Summary

  • Fixes tests that fail on early months of the year.
  • Adds bootstrap to devDependencies in bower.json +
  • Makes the plugin handle Bootstrap's JavaScript and CSS
  • Bumps the patch version to 2.8.3

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#37.

@KidSysco
Copy link
Copy Markdown
Owner

KidSysco commented Jan 4, 2016

OK it looks like bootstrap works and all tests pass in this branch. Very good, as long as it was easy and no one complains about having to do it, then sure, why not.

However, in my opinion, if you are looking for Bootstrap support, then you should look at the repo below.

https://github.com/smalot/bootstrap-datetimepicker

I am merging this now!

Great job once again Benjamin, thanks for the support!

@KidSysco
Copy link
Copy Markdown
Owner

KidSysco commented Jan 4, 2016

No conflicts either, when you had 2 branches going! You make this way to easy for me Benjamin. You are a real pro!

KidSysco added a commit that referenced this pull request Jan 4, 2016
Makes the plugin handle Bootstrap's JavaScript and CSS
@KidSysco KidSysco merged commit 25232ce into KidSysco:master Jan 4, 2016
@benjamin-albert benjamin-albert deleted the bootstrap_support branch January 12, 2016 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline version

2 participants