Next post

Image sharing the Drupal way with Imgly

Read more»
jan 09 2012

Introducing the iToggle module

If you've never heard of the iToggle jQuery Plugin, it basically transforms checkboxes and radio buttons into slick iOS-style On/Off sliders. It is pretty awesome! Check out the plugin page to see it in action.

What started as a learning excercise to learn how to build custom Views Handlers ended up giving birth to the iToggle module.

The Module

The module creates 4 custom Views Handlers:

  • iToggle Node Status Widget
  • iToggle Node Promoted Widget
  • iToggle Node Sticky Widget
  • iToggle User Status Widget

Each of these handlers creates a new field that displays the information in an iToggle Widget.

Ajax Delight & Permissions

Clicking the iToggle Widget triggers an Ajax callback that changes the property's value correspondingly.

The callback checks permissions and also integrates with the Override Node Options to offer fine-grained permission control for using the iToggle module.

Screenshots

Grab the code!

Are you ready to create some sleek admin interfaces? Grab the code over at the project page on Drupal.org!

If you liked this post please take a couple seconds to share it using the links on the left-hand side! Thanks!!!