Common.js - add doc links
authorColeman Watts <coleman@civicrm.org>
Thu, 13 Mar 2014 15:30:51 +0000 (11:30 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 13 Mar 2014 15:30:51 +0000 (11:30 -0400)
js/Common.js

index 5147ddabffb5a3a332bacd82750441b3cbaa7e05..45a9e66709d07aa3744bacc6b9e6ebbf27a6dd74 100644 (file)
@@ -548,9 +548,7 @@ CRM.validate = CRM.validate || {
     );
   };
   /**
-   * @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.
@@ -590,12 +588,7 @@ CRM.validate = CRM.validate || {
   };
 
   /**
-   * @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';
@@ -642,13 +635,7 @@ CRM.validate = CRM.validate || {
   };
 
   /**
-   * 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 = {};
@@ -691,8 +678,7 @@ CRM.validate = CRM.validate || {
   };
 
   /**
-   * 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 || '';
@@ -768,6 +754,9 @@ CRM.validate = CRM.validate || {
     });
   }
 
+  /**
+   * @see https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms
+   */
   $.widget('civi.crmSnippet', {
     options: {
       url: null,
@@ -871,6 +860,9 @@ CRM.validate = CRM.validate || {
   });
 
   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++),
@@ -902,7 +894,9 @@ CRM.validate = CRM.validate || {
     $(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: {
@@ -1028,6 +1022,7 @@ CRM.validate = CRM.validate || {
 
   /**
    * Temporary stub to get around name conflict with legacy jQuery.autocomplete plugin
+   * FIXME: Remove this before 4.5 release
    */
   $.widget('civi.crmAutocomplete', $.ui.autocomplete, {});