FIX PHP Linter fixes

This commit is contained in:
Franco Springveldt 2017-09-14 09:55:09 +12:00
parent aec1d542b1
commit 026b64cafb
2 changed files with 98 additions and 98 deletions

View File

@ -8,10 +8,10 @@ gulp.task("scss", function () {
.pipe(gulp.dest("./css"));
});
gulp.task('watch', ['scss'], function() {
gulp.task('watch', ['scss'], function () {
gulp.watch('./scss/*.scss', ['scss']);
});
gulp.task('default', ['scss'], function() {
gulp.task('default', ['scss'], function () {
// noop
});

View File

@ -10,9 +10,9 @@
* @see https://github.com/silverstripe/silverstripe-blog/issues/210
*/
$('.cms-content-fields > #Form_EditForm_error').entwine({
'onadd': function() {
'onadd': function () {
var $target = $('.blog-admin-outer');
if($target.length == 1) {
if ($target.length == 1) {
$target.prepend(this);
}
}
@ -39,7 +39,7 @@
*/
var shown = false;
$this.on('click', function() {
$this.on('click', function () {
$this.parent().next('.description')[shown ? 'hide' : 'show']();
$this.toggleClass('toggle-description-shown');
@ -65,21 +65,21 @@
* Custom merge actions for tags and categories
*/
$('.MergeAction').entwine({
'onadd': function() {
'onadd': function () {
var $this = $(this);
$this.on('click', 'select', function() {
$this.on('click', 'select', function () {
return false;
});
$this.children('button').each(function(i, button) {
$this.children('button').each(function (i, button) {
var $button = $(button);
var $select = $button.prev('select');
$button.before('<input type="hidden" name="' + $button.attr('data-target') + '" value="' + $select.val() + '" />');
});
$this.on('change', 'select', function(e) {
$this.on('change', 'select', function (e) {
var $target = $(e.target);
$target.next('input').val($target.val());
@ -87,7 +87,7 @@
$this.children('button, select').hide();
$this.on('click', '.MergeActionReveal', function(e) {
$this.on('click', '.MergeActionReveal', function (e) {
var $target = $(e.target);
$target.parent().children('button, select').show();
@ -105,20 +105,20 @@
*/
$('.blog-admin-sidebar.cms-panel').entwine({
MinInnerWidth: 620,
onadd: function() {
onadd: function () {
this._super();
this.updateLayout();
// If this panel is open and the left hand column is smaller than the minimum, contract it instead
if(!this.hasClass('collapsed') && ($(".blog-admin-outer").width() < this.getMinInnerWidth())) {
if (!this.hasClass('collapsed') && ($(".blog-admin-outer").width() < this.getMinInnerWidth())) {
this.collapsePanel();
}
window.onresize = function() {
window.onresize = function () {
this.updateLayout();
}.bind(this);
},
togglePanel: function(bool, silent) {
togglePanel: function (bool, silent) {
this._super(bool, silent);
this.updateLayout();
},
@ -127,7 +127,7 @@
*
* @returns {undefined}
*/
updateLayout: function() {
updateLayout: function () {
$(this).css('height', '100%');
var currentHeight = $(this).outerHeight();
var bottomHeight = $('.cms-content-actions').eq(0).outerHeight();