Bootstrap-colorpicker in Sugar CRM 7

By

152 views

A couple of days ago, I was working in Sugar CRM 7 and wanted to add color picker plugin. As mentioned in the previous post I tried using JQuery color picker but was not successful in using it.  Exploring Sugar 7, I discovered that Sugar 7 has several plugins e.g.Tooltip, EllipsisInline and many others. Also, I discovered that Sugar 7 uses Twitter Bootstrap library. In Sugar this library is in include/javascript/twitterbootstrap directory.

I used bootstrap-colorpicker plugin from the Bootstrap library and it was amazingly very easy to use. Sugar adds this library when the application loads and I just had to call the colorpicker functions on the particular element.

custom-view.hbs

  1. <div class=“input-append color” data-color=“rgb(255, 146, 180)” data-color-format=“rgb”>
  2. <input type=“text” class=“span2” value=“” >
  3. <span class=“add-on”><i style=“background-color: rgb(255, 146, 180)”></i></span>
  4. </div>

Bootstrap-colorpicker

Custom-view.js

  1. $(‘#color’).colorpicker()

Colorpicker2

Need Help? Get Free Consultation


Please leave this field empty.

Get in touch



Please leave this field empty.

CONTACT INFORMATION