Skip to content
This repository was archived by the owner on Jul 10, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/2.1.3'
Browse files Browse the repository at this point in the history
* release/2.1.3:
  version bump
  Release notes for 2.1.3
  Make sure collapsed/dragging blocks keep their layouts.
  Debounced the window resize event to try and improve performance
  Force matrix containers to be refreshed more often
  • Loading branch information
Josh Angell committed Mar 31, 2016
2 parents ef7b09c + 5b12774 commit a175e92
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 23 deletions.
2 changes: 1 addition & 1 deletion pimpmymatrix/PimpMyMatrixPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function getName()

public function getVersion()
{
return '2.1.2';
return '2.1.3';
}

public function getSchemaVersion()
Expand Down
42 changes: 22 additions & 20 deletions pimpmymatrix/resources/css/pimpmymatrix.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ body.rtl .buttons-pimped > .btn, body.rtl .buttons-pimped > .btngroup { margin:
/**
* Block level field layouts
*/
.matrix-field .matrixblock-pimped .pimpmymatrix-tabs {
position: absolute;
top: 5px;
right: 76px;
display: block;
font-size: 0;
}

/* hide all matrix block fields */
.matrix-field .matrixblock .fields {
Expand All @@ -72,42 +65,51 @@ body.rtl .buttons-pimped > .btn, body.rtl .buttons-pimped > .btngroup { margin:
}

/* don’t break blocks that don’t need pimping */
.matrix-field .matrixblock.matrixblock-not-pimped .fields {
-webkit-opacity: 1;
-moz-opacity: 1;
opacity: 1;
.matrixblock.matrixblock-not-pimped .fields {
-webkit-opacity: 1 !important;
-moz-opacity: 1 !important;
opacity: 1 !important;
}


/* fix for animating and collapsed blocks */
.matrix-field .matrixblock-pimped.velocity-animating .pimpmymatrix-tabs,
.matrix-field .matrixblock-pimped.velocity-animating .pimpmymatrix-fields,
.matrix-field .matrixblock-pimped.collapsed .pimpmymatrix-tabs,
.matrix-field .matrixblock-pimped.collapsed .pimpmymatrix-fields {
.matrixblock-pimped.collapsed.draghelper .pimpmymatrix-tabs,
.matrixblock-pimped.collapsed.draghelper .pimpmymatrix-fields,
.matrixblock-pimped.velocity-animating .pimpmymatrix-tabs,
.matrixblock-pimped.velocity-animating .pimpmymatrix-fields,
.matrixblock-pimped.collapsed .pimpmymatrix-tabs,
.matrixblock-pimped.collapsed .pimpmymatrix-fields {
-webkit-opacity: 0 !important;
-moz-opacity: 0 !important;
opacity: 0 !important;
}

/* tabs */
.matrix-field .matrixblock-pimped .pimpmymatrix-tabs li {
.matrixblock-pimped .pimpmymatrix-tabs {
position: absolute;
top: 5px;
right: 76px;
display: block;
font-size: 0;
}

.matrixblock-pimped .pimpmymatrix-tabs li {
display: inline-block;
font-size: 13px;
}

.matrix-field .matrixblock-pimped .pimpmymatrix-tabs li a {
.matrixblock-pimped .pimpmymatrix-tabs li a {
display: block;
padding: 4px 10px;
color: #777;
white-space: nowrap;
}

.matrix-field .matrixblock-pimped .pimpmymatrix-tabs li a:hover {
.matrixblock-pimped .pimpmymatrix-tabs li a:hover {
text-decoration: none;
color: #0d78f2;
}

.matrix-field .matrixblock-pimped .pimpmymatrix-tabs li a.sel {
.matrixblock-pimped .pimpmymatrix-tabs li a.sel {
color: #29323d;
cursor: default;
background-color: #f9fafa;
Expand Down
16 changes: 14 additions & 2 deletions pimpmymatrix/resources/js/fieldmanipulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,24 @@ PimpMyMatrix.FieldManipulator = Garnish.Base.extend(
if ( requestData.url.indexOf( 'switchEntryType' ) > -1 )
{
this.settings.context = 'entrytype:' + $('#entryType').val();
this.refreshMatrixContainers();
this.processMatrixFields();
}
});
}

// Wait until load to loop the Matrix fields
this.addListener(Garnish.$win, 'load resize', 'processMatrixFields');
this.addListener(Garnish.$win, 'load', 'processMatrixFields');

// Debounced resize event
this.addListener(Garnish.$win, 'resize', $.proxy(function()
{
if (this.resizeTimeout)
{
clearTimeout(this.resizeTimeout);
}

this.resizeTimeout = setTimeout($.proxy(this, 'processMatrixFields'), 25);
}, this));

},

Expand All @@ -61,6 +71,8 @@ PimpMyMatrix.FieldManipulator = Garnish.Base.extend(
processMatrixFields: function()
{

this.refreshMatrixContainers();

var _this = this;

// loop each matrix field
Expand Down
18 changes: 18 additions & 0 deletions release-notes.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
[
{
"version" : "2.1.3",
"date" : "31-3-2016",
"notes" : [
{
"type" : "improved",
"message" : "Debounced the window resize event to try and improve performance."
},
{
"type" : "fixed",
"message" : "Fixed numerous situations where matrix fields were turning up blank e.g. element editor HUDs and nested SuperTable Matrix fields."
},
{
"type" : "fixed",
"message" : "Fixed a bug where collapsed/dragging blocks weren’t getting their layouts."
}
]
},
{
"version" : "2.1.2",
"date" : "1-12-2015",
Expand Down

0 comments on commit a175e92

Please sign in to comment.