$.fn.select2.defaults.formatNoMatches = " . json_encode(ts("None found.")) . ";
$.fn.select2.defaults.formatLoadMore = " . json_encode(ts("Loading...")) . ";
$.fn.select2.defaults.formatSearching = " . json_encode(ts("Searching...")) . ";
- $.fn.select2.defaults.formatInputTooShort = function(){return cj(this).data('api-entity') == 'contact' ? $contactSearch : $otherSearch};
+ $.fn.select2.defaults.formatInputTooShort = function(){return CRM.$(this).data('api-entity') == 'contact' ? $contactSearch : $otherSearch};
";
// Contact create profiles with localized names
// https://civicrm.org/licensing
var CRM = CRM || {};
-var cj = jQuery;
+var cj = CRM.$ = jQuery;
+CRM._ = _;
/**
* Short-named function for string translation, defined in global scope so it's available everywhere.
functions: []
};
-(function ($, undefined) {
+(function ($, _, undefined) {
"use strict";
// Theme classes for unattached elements
result = sign + (j ? i.substr(0, j) + separator : '') + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + separator) + (2 ? decimal + Math.abs(value - i).toFixed(2).slice(2) : '');
return format.replace(/1.*234.*56/, result);
};
-})(jQuery);
+})(jQuery, _);
-(function($) {
- var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {});
+(function($, _) {
if (!CRM.Backbone) CRM.Backbone = {};
/**
var wrapError = function (model, options) {
var error = options.error;
options.error = function(resp) {
- if (error) error(model, resp, options);
+ if (error) error(model, resp, optio)
model.trigger('error', model, resp, options);
};
};
-})(cj);
+})(CRM.$, CRM._);
-(function($) {
+(function($, _) {
var ufGroupCollection = new CRM.UF.UFGroupCollection(_.sortBy(CRM.initialProfileList.values, 'title'));
//var ufGroupCollection = new CRM.UF.UFGroupCollection(CRM.initialProfileList.values, {
// comparator: 'title' // no point, this doesn't work with subcollections
});
});
-})(cj);
+})(CRM.$, CRM._);
-(function($) {
- var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {});
+(function($, _) {
if (!CRM.Designer) CRM.Designer = {};
// TODO Optimize this class
return fieldsByEntitySection;
}
});
-})(cj);
+})(CRM.$, CRM._);
/**
* Dynamically-generated alternative to civi.core.js
*/
-(function($) {
- var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {});
+(function($, _) {
if (!CRM.Schema) CRM.Schema = {};
/**
};
CRM.Schema.loadModels(CRM.civiSchema);
-})(cj);
\ No newline at end of file
+})(CRM.$, CRM._);
-(function($) {
- var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {});
+(function($, _) {
if (!CRM.UF) CRM.UF = {};
var YESNO = [
CRM.UF.UFGroupCollection = CRM.Backbone.Collection.extend({
model: CRM.UF.UFGroupModel
});
-})(cj);
+})(CRM.$, CRM._);
-(function($) {
+(function($, _) {
if (!CRM.Designer) CRM.Designer = {};
/**
}
});
-})(cj);
+})(CRM.$, CRM._);
-(function($) {
- var CRM = (window.CRM) ? (window.CRM) : (window.CRM = {});
+(function($, _) {
if (!CRM.ProfileSelector) CRM.ProfileSelector = {};
CRM.ProfileSelector.Option = Backbone.Marionette.ItemView.extend({
view.render();
}
});
-})(cj);
+})(CRM.$, CRM._);
// http://civicrm.org/licensing
-(function($) {
+(function($, _) {
var ajaxFormParams = {
dataType:'json',
});
$().crmAccordions();
});
-})(cj);
+})(CRM.$, CRM._);