*/
CRM.api = function(entity, action, params, options) {
// Default settings
*/
CRM.api = function(entity, action, params, options) {
// Default settings
$.ajax({
url: stg.ajaxURL.indexOf('http') === 0 ? stg.ajaxURL : CRM.url(stg.ajaxURL),
dataType: 'json',
data: params,
type: action.indexOf('get') < 0 ? 'POST' : 'GET',
success: function(result) {
$.ajax({
url: stg.ajaxURL.indexOf('http') === 0 ? stg.ajaxURL : CRM.url(stg.ajaxURL),
dataType: 'json',
data: params,
type: action.indexOf('get') < 0 ? 'POST' : 'GET',
success: function(result) {
$.fn.crmAutocomplete = function (params, options) {
if (typeof params == 'undefined') params = {};
if (typeof options == 'undefined') options = {};
$.fn.crmAutocomplete = function (params, options) {
if (typeof params == 'undefined') params = {};
if (typeof options == 'undefined') options = {};