Permalink
Browse files

Rewrite Photos logic (#3279)

* working improved images

* fix alignment

* more fixes

* tweaks

* typo

* fix families

* separate initials and remote images on server.

* tweaks

* see if cache is breaking TravisCI test

* add use statement

* update composer lock

* add cache randomizer.  remove from whole api

* refactor iPhoto and address caching

* underp public and static

* Apply fixes from StyleCI

* adjust cache times and add to system config

* fix broken person editor

* closes #3245

* use jpg for class list
  • Loading branch information...
crossan007 authored and DawoudIO committed Nov 14, 2017
1 parent 4dcb44d commit 7fd67a3b995c01bc7bd6b14cdbd7bc56f148121d
View
@@ -35,7 +35,6 @@ src/skin/fastclick
src/skin/churchcrm.min.css.map
src/skin/churchcrm.min.css
src/skin/jquery-photo-uploader
src/skin/randomcolor
src/skin/bootbox
src/skin/bootstrap-toggle
src/skin/bootstrap-validator
View
@@ -100,13 +100,6 @@ module.exports = function (grunt) {
src: ['node_modules/jquery-photo-uploader/dist/*'],
dest: 'src/skin/jquery-photo-uploader/'
},
{
expand: true,
filter: 'isFile',
flatten: true,
src: ['node_modules/randomcolor/randomColor.js'],
dest: 'src/skin/randomcolor/'
},
{
expand: true,
filter: 'isFile',
View
@@ -328,8 +328,7 @@ function codename() {
<tr>
<td>
<img data-name="<?= $personName; ?>" data-src="<?= $thumbnail ?>"
class="direct-chat-img initials-image">&nbsp
<img src="<?= $thumbnail ?>" class="direct-chat-img initials-image">&nbsp
<a href="PersonView.php?PersonID=<?= $per_ID ?>">
<?= FormatFullName($per_Title, $per_FirstName, $per_MiddleName, $per_LastName, $per_Suffix, 1) ?>
</a>
View
@@ -349,8 +349,7 @@ class="col-sm-2 control-label"><?= gettext('Adult Name(Optional)') ?></label>
$sCheckoutby = $checkedOutBy->getFullName();
} ?>
<tr>
<td><img data-name="<?= $sPerson; ?>"
data-src="<?= SystemURLs::getRootPath() . '/api/persons/' . $per->getPersonId() . '/thumbnail' ?>"
<td><img src="<?= SystemURLs::getRootPath() . '/api/persons/' . $per->getPersonId() . '/thumbnail' ?>"
class="direct-chat-img initials-image">&nbsp
<a href="PersonView.php?PersonID=<?= $per->getPersonId() ?>"><?= $sPerson ?></a></td>
<td><?= date_format($per->getCheckinDate(), SystemConfig::getValue('sDateFormatLong')) ?></td>
@@ -439,11 +438,10 @@ function SetPersonHtml(element, perArr) {
'<a target="_top" href="PersonView.php?PersonID=' + perArr.id + '"><h4>' + perArr.displayName + '</h4></a>' +
'<div class="">' + perArr.familyRole + '</div>' +
'<div class="text-center">' + perArr.address + '</div>' +
'<img data-name="' + perArr.displayName + '" data-src="' + window.CRM.root + '/api/persons/' + perArr.id + '/thumbnail" ' +
'<img src="' + window.CRM.root + '/api/persons/' + perArr.id + '/thumbnail"' +
'class="initials-image profile-user-img img-responsive img-circle"> </div>'
);
element.removeClass('hidden');
$(".initials-image").initial();
} else {
element.html('');
element.addClass('hidden');
@@ -476,8 +474,7 @@ function loadPerson($iPersonID)
'<a target="_top" href="PersonView.php?PersonID=' . $iPersonID . '"><h4>' . $person->getTitle(). ' ' . $person->getFullName() . '</h4></a>' .
'<div class="">' . $familyRole . '</div>' .
'<div class="text-center">' . $person->getAddress() . '</div>' .
'<img data-name="' . $person->getFullName() . '" data-src="' . SystemURLs::getRootPath() . '/api/persons/' . $iPersonID . '/thumbnail" ' .
'class="initials-image profile-user-img img-responsive img-circle"> </div>';
'<img src="' . SystemURLs::getRootPath() . '/api/persons/' . $iPersonID . '/thumbnail" class="initials-image profile-user-img img-responsive img-circle"> </div>';
echo $html;
}
?>
@@ -166,7 +166,7 @@ public function DrawAttendanceCalendar($nameX, $yTop, $aNames, $tTitle, $extraLi
$nw = $width*$factor;
$nh = $yIncrement;
$this->Image($imgList[$row], $nameX-$nw , $y, $nw,$nh,'PNG');
$this->Image($imgList[$row], $nameX-$nw , $y, $nw,$nh,'JPG');
}
}
Oops, something went wrong.

0 comments on commit 7fd67a3

Please sign in to comment.