return url;
};
- // @deprecated
- $.extend ({'crmURL':
- function (p, params) {
- CRM.console('warn', 'Calling crmURL from jQuery is deprecated. Please use CRM.url() instead.');
- return CRM.url(p, params);
- }
- });
-
$.fn.crmURL = function () {
return this.each(function() {
if (this.href) {
/**
* AJAX api
+ * @link http://wiki.civicrm.org/confluence/display/CRMDOC/AJAX+Interface#AJAXInterface-CRM.api3
*/
CRM.api3 = function(entity, action, params, status) {
if (typeof(entity) === 'string') {
})($.extend({}, settings, options));
};
- /**
- * Backwards compatible with jQuery fn
- * @deprecated
- */
- $.fn.crmAPI = function(entity, action, params, options) {
- CRM.console('warn', 'Calling crmAPI from jQuery is deprecated. Please use CRM.api3() instead.');
- return CRM.api.call(this, entity, action, params, options);
- };
-
$.widget('civi.crmSnippet', {
options: {
url: null,
label = $el.is('input') ? $el.attr('value') : $el.text(),
identifier = $el.attr('name') || $el.attr('href');
if (!identifier || identifier === '#' || $.inArray(identifier, added) < 0) {
- var $icon = $el.find('.icon'),
+ var $icon = $el.find('.icon, .crm-i'),
button = {'data-identifier': identifier, text: label, click: function() {
$el[0].click();
}};