CRM-10551: Allow deletion of blanked location-based fields
[civicrm-core.git] / Civi / Angular / Manager.php
index a93c8790baefceee4e4556be5b08ee7fbb162d4f..a92ecd9c18f1095a6025b14d7fe14d504218045c 100644 (file)
@@ -17,9 +17,14 @@ class Manager {
    * @var array|NULL
    *   Each item has some combination of these keys:
    *   - ext: string
+   *     The Civi extension which defines the Angular module.
    *   - js: array(string $relativeFilePath)
+   *     List of JS files (relative to the extension).
    *   - css: array(string $relativeFilePath)
+   *     List of CSS files (relative to the extension).
    *   - partials: array(string $relativeFilePath)
+   *     A list of partial-HTML folders (relative to the extension).
+   *     This will be mapped to "~/moduleName" by crmResource.
    */
   protected $modules = NULL;
 
@@ -32,10 +37,19 @@ class Manager {
   }
 
   /**
-   * Get a list of AngularJS modules which should be autoloaded
+   * Get a list of AngularJS modules which should be autoloaded.
    *
    * @return array
-   *   (string $name => array('ext' => string $key, 'js' => array $paths, 'css' => array $paths))
+   *   Each item has some combination of these keys:
+   *   - ext: string
+   *     The Civi extension which defines the Angular module.
+   *   - js: array(string $relativeFilePath)
+   *     List of JS files (relative to the extension).
+   *   - css: array(string $relativeFilePath)
+   *     List of CSS files (relative to the extension).
+   *   - partials: array(string $relativeFilePath)
+   *     A list of partial-HTML folders (relative to the extension).
+   *     This will be mapped to "~/moduleName" by crmResource.
    */
   public function getModules() {
     if ($this->modules === NULL) {
@@ -55,6 +69,15 @@ class Manager {
         'css' => array('css/angular-crmAttachment.css'),
         'partials' => array('partials/crmAttachment'),
       );
+      $angularModules['crmAutosave'] = array(
+        'ext' => 'civicrm',
+        'js' => array('js/angular-crmAutosave.js'),
+      );
+      //$angularModules['crmExample'] = array(
+      //  'ext' => 'civicrm',
+      //  'js' => array('js/angular-crmExample.js'),
+      //  'partials' => array('partials/crmExample'),
+      //);
       $angularModules['crmResource'] = array(
         'ext' => 'civicrm',
         // 'js' => array('js/angular-crmResource/byModule.js'), // One HTTP request per module.
@@ -74,10 +97,6 @@ class Manager {
         'ext' => 'civicrm',
         'js' => array('bower_components/angular-jquery-dialog-service/dialog-service.js'),
       );
-      $angularModules['ngSanitize'] = array(
-        'ext' => 'civicrm',
-        'js' => array('js/angular-sanitize.js'),
-      );
       $angularModules['ui.utils'] = array(
         'ext' => 'civicrm',
         'js' => array('bower_components/angular-ui-utils/ui-utils.min.js'),
@@ -270,4 +289,5 @@ class Manager {
     }
     return $result;
   }
+
 }