Skip to content

Commit

Permalink
fix: remove all widget resize but keep resize by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ccailly committed Apr 12, 2024
1 parent b32d4f6 commit ff98a57
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 114 deletions.
79 changes: 0 additions & 79 deletions install/upgrade_to_2.13.10.php

This file was deleted.

35 changes: 0 additions & 35 deletions install/upgrade_to_2.13.7.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function isResyncIssuesRequired() {
public function upgrade(Migration $migration) {
$this->migration = $migration;
$this->fixEncodingInQuestions();
$this->resizeWidgets();
}

/**
Expand Down Expand Up @@ -87,38 +86,4 @@ public function fixEncodingInQuestions() {
);
}
}

/**
* Resize widgets of the `plugin_formcreator_issue_counters` dashboard to match
* the mini_tickets core dashboard style
*
* @return void
*/
public function resizeWidgets() {
// Get container
$dashboard = new Dashboard();
$found = $dashboard->getFromDB("plugin_formcreator_issue_counters");

if (!$found) {
// Unable to fetch dashboard
return;
};

$di = new Item();
$cards = $di->find(['dashboards_dashboards_id' => $dashboard->fields['id']]);
$x = 0;

foreach ($cards as $card) {
$di = new Item();
$di->update([
'id' => $card['id'],
'width' => 4,
'height' => 2,
'x' => $x,
'y' => 0,
]);

$x +=4;
}
}
}

0 comments on commit ff98a57

Please sign in to comment.