);
};
/**
- * @param options object|string
- * @param deferred optional jQuery deferred object
- * @return jQuery deferred object - if not supplied a new one will be created
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Notification+Reference
*/
CRM.status = function(options, deferred) {
// For simple usage without async operations you can pass in a string. 2nd param is optional string 'error' if this is not a success msg.
};
/**
- * @param string text Displayable message
- * @param string title Displayable title
- * @param string type 'alert'|'info'|'success'|'error' (default: 'alert')
- * @param {object} options
- * @return {*}
- * @see http://wiki.civicrm.org/confluence/display/CRM/Notifications+in+CiviCRM
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Notification+Reference
*/
CRM.alert = function (text, title, type, options) {
type = type || 'alert';
};
/**
- * Prompt the user for confirmation.
- *
- * @param buttons {object|function} key|value pairs where key == button label and value == callback function
- * passing in a function instead of an object is a shortcut for a sinlgle button labeled "Continue"
- * @param options {object|void} Override defaults, keys include 'title', 'message',
- * see jQuery.dialog for full list of available params
- * @param cancelLabel {string}
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Notification+Reference
*/
CRM.confirm = function (buttons, options, cancelLabel) {
var dialog, callbacks = {};
};
/**
- * Sets an error message
- * If called for a form item, title and removal condition will be handled automatically
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Notification+Reference
*/
$.fn.crmError = function (text, title, options) {
title = title || '';
});
}
+ /**
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms
+ */
$.widget('civi.crmSnippet', {
options: {
url: null,
});
var dialogCount = 0;
+ /**
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms
+ */
CRM.loadPage = function(url, options) {
var settings = {
target: '#crm-ajax-dialog-' + (dialogCount++),
$(settings.target).crmSnippet(settings).crmSnippet('refresh');
return $(settings.target);
};
-
+ /**
+ * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms
+ */
CRM.loadForm = function(url, options) {
var settings = {
crmForm: {
/**
* Temporary stub to get around name conflict with legacy jQuery.autocomplete plugin
+ * FIXME: Remove this before 4.5 release
*/
$.widget('civi.crmAutocomplete', $.ui.autocomplete, {});