Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-01-13-11-57-38
authorkurund <kurund@civicrm.org>
Mon, 13 Jan 2014 20:07:24 +0000 (12:07 -0800)
committerkurund <kurund@civicrm.org>
Mon, 13 Jan 2014 20:07:24 +0000 (12:07 -0800)
Conflicts:
CRM/Core/Form/Tag.php

16 files changed:
1  2 
CRM/Activity/Form/Activity.php
CRM/Admin/Page/AJAX.php
CRM/Case/Form/Case.php
CRM/Case/Form/CaseView.php
CRM/Case/Page/AJAX.php
CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/BAO/Group.php
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/SoftCredit.php
CRM/Core/BAO/File.php
CRM/Core/Form.php
CRM/Core/Form/Tag.php
CRM/Utils/Hook.php
js/Common.js
sql/civicrm_generated.mysql

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 6cf049bc9368bb3b055228992b8d57199b1874b1,8fae6a5ea83010ac982507518417211559d8c47f..a6a228f1b7712b78b37fcffb0b8a452295515cb3
      CRM_Core_BAO_File::deleteEntityFile($params['entityTable'], $params['entityID'], NULL, $params['fileID']);
    }
  
 -}
  
- }
 +  /**
 +   * function to display paper icon for a file attachment -- CRM-13624
 +   *
 +   * @param $entityTable string  The entityTable to which the file is attached. eg "civicrm_contact", "civicrm_note", "civicrm_activity"
 +   * @param $entityID    int     The id of the object in the above entityTable
 +   *
 +   * @return array|NULL          list of HTML snippets; one HTML snippet for each attachment. If none found, then NULL
 +   *
 +   * @static
 +   * @access public
 +   */
 +  static function paperIconAttachment( $entityTable, $entityID ) {
 +     if (empty($entityTable) || !$entityID) {
 +       $results = NULL;
 +       return $results;
 +     }
 +    $currentAttachmentInfo = self::getEntityFile( $entityTable, $entityID );
 +    foreach($currentAttachmentInfo as $fileKey => $fileValue) {
 +      $fileID = $fileValue['fileID'];
 +      $fileType = $fileValue['mime_type'];
 +      $eid = $entityID;
 +      if($fileID) {
 +        if ($fileType == 'image/jpeg' ||
 +            $fileType == 'image/pjpeg' ||
 +            $fileType == 'image/gif' ||
 +            $fileType == 'image/x-png' ||
 +            $fileType == 'image/png'
 +            ) {
 +          $url = $fileValue['url'];
 +          $alt = $fileValue['cleanName'];
 +          $file_url[$fileID] = "
 +              <a href=\"$url\" class='crm-image-popup'>
 +              <div class='icon paper-icon' title=\"$alt\" alt=\"$alt\"></div>
 +              </a>";
 +          // for non image files
 +        }
 +        else {
 +          $url = $fileValue['url'];
 +          $alt = $fileValue['cleanName'];
 +          $file_url[$fileID] = "<a href=\"$url\"><div class='icon paper-icon' title=\"$alt\" alt=\"$alt\"></div></a>";
 +        }
 +      }
 +    }
 +    if(empty($file_url)) {
 +       $results = NULL;
 +    }
 +    else {
 +       $results = $file_url;
 +    }
 +    return $results;
 +  }
 +
++}
Simple merge
index 5eeaec35b03d42d72d2424a4168dcb2b1748b2ff,e36dccd88c312b5a6f288a2db16267004b55e353..cd45fd074bc4c5599818e3c6e136a28cb7946c65
@@@ -226,7 -226,8 +226,9 @@@ class CRM_Core_Form_Tag 
      }
  
      if (!empty($tagset)) {
+       // assign current tagsets which is used in postProcess
+       $form->_tagsetInfo = $tagset;
 +      $form->assign("tagsetType", $mode);
        $form->assign("tagsetInfo_$mode", $tagset);
        $form->assign("isTagset", TRUE);
      }
index 15ca491a2c6b28fd70c40e42f36614fc03da0c84,bed5f0dfcdf5a2240b7396dc31d751759bd0a00c..6e337115d910ab9706ed40403dd496e516e284a2
@@@ -1392,6 -1386,16 +1392,16 @@@ abstract class CRM_Utils_Hook 
     * @return void
     */
    static function queryObjects(&$queryObjects, $type = 'Contact') {
 -    return self::singleton()->invoke(2, $queryObjects, $type, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_queryObjects');
 +    return self::singleton()->invoke(2, $queryObjects, $type, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_queryObjects');
    }
+   /**
+    * This hook is called while viewing contact dashboard
+    *
+    * @param array $availableDashlets list of dashlets; each is formatted per api/v3/Dashboard
+    * @param array $activeDashlets list of dashlets; each is formatted per api/v3/DashboardContact
+    */
+   static function dashboard_defaults($availableDashlets, &$defaultDashlets) {
+     return self::singleton()->invoke(2, $availableDashlets, $defaultDashlets, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_dashboard_defaults');
+   }
  }
diff --cc js/Common.js
Simple merge
Simple merge