Skip to content

Commit

Permalink
Modification ordre des commandes
Browse files Browse the repository at this point in the history
  • Loading branch information
JEALG committed Dec 7, 2024
1 parent 301e6d2 commit 546f948
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/class/mobile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ public function postSave()
// Commande notification
$cmd = $this->getCmd(null, 'notif');
if (!is_object($cmd)) {
$order = count($this->getCmd());
$cmd = new mobileCmd();
$cmd->setIsVisible(1);
$cmd->setName(__('Notification', __FILE__));
Expand All @@ -943,7 +944,7 @@ public function postSave()
$cmd->setDisplay('forceReturnLineAfter', 1);
$cmd->setDisplay('showIconAndNamedashboard', 1);
$cmd->setDisplay('showIconAndNamemobile', 1);
$cmd->setOrder(0);
$cmd->setOrder($order);
}
$cmd->setEqLogic_id($this->getId());
$cmd->setType('action');
Expand All @@ -953,6 +954,7 @@ public function postSave()
// Commande notification Critique
$cmd = $this->getCmd(null, 'notifCritical');
if (!is_object($cmd)) {
$order = count($this->getCmd());
$cmd = new mobileCmd();
$cmd->setIsVisible(1);
$cmd->setName(__('Notification Critique', __FILE__));
Expand All @@ -962,7 +964,7 @@ public function postSave()
$cmd->setDisplay('forceReturnLineAfter', 1);
$cmd->setDisplay('showIconAndNamedashboard', 1);
$cmd->setDisplay('showIconAndNamemobile', 1);
$cmd->setOrder(1);
$cmd->setOrder($order);
}
$cmd->setEqLogic_id($this->getId());
$cmd->setType('action');
Expand All @@ -972,6 +974,7 @@ public function postSave()
// Commande récupération infos du téléphone
$cmd = $this->getCmd(null, 'notifSpecific');
if (!is_object($cmd)) {
$order = count($this->getCmd());
$cmd = new mobileCmd();
$cmd->setIsVisible(0);
$cmd->setName(__('Récupérer les informations du téléphone', __FILE__));
Expand All @@ -981,7 +984,7 @@ public function postSave()
$cmd->setDisplay('forceReturnLineAfter', 1);
$cmd->setDisplay('showIconAndNamedashboard', 1);
$cmd->setDisplay('showIconAndNamemobile', 1);
$cmd->setOrder(2);
$cmd->setOrder($order);
}
$cmd->setEqLogic_id($this->getId());
$cmd->setType('action');
Expand All @@ -991,6 +994,7 @@ public function postSave()
// Commande suppression des nodifications
$cmd = $this->getCmd(null, 'removeNotifs');
if (!is_object($cmd)) {
$order = count($this->getCmd());
$cmd = new mobileCmd();
$cmd->setIsVisible(1);
$cmd->setName(__('Supprimer les Notifications', __FILE__));
Expand All @@ -1000,7 +1004,7 @@ public function postSave()
$cmd->setDisplay('forceReturnLineAfter', 1);
$cmd->setDisplay('showIconAndNamedashboard', 1);
$cmd->setDisplay('showIconAndNamemobile', 1);
$cmd->setOrder(3);
$cmd->setOrder($order);
}
$cmd->setEqLogic_id($this->getId());
$cmd->setType('action');
Expand Down

0 comments on commit 546f948

Please sign in to comment.