Skip to content
Code-Schnipsel Gruppen Projekte
Commit 793eca89 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: hash check fix for order control

Übergeordneter 63f967d6
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -37,11 +37,11 @@ define('package/quiqqer/order/bin/frontend/controls/frontendusers/Orders', [
initialize: function (options) {
this.parent(options);
this.$List = null;
this.$OrderContainer = null;
this.$orderOpened = false;
this.$location = null;
this.$List = null;
this.Loader = new QUILoader();
this.addEvents({
......@@ -89,6 +89,8 @@ define('package/quiqqer/order/bin/frontend/controls/frontendusers/Orders', [
});
});
this.$location = window.location.href;
if (window.location.hash !== '') {
this.$onChangeState();
}
......@@ -101,6 +103,11 @@ define('package/quiqqer/order/bin/frontend/controls/frontendusers/Orders', [
var self = this,
hash = window.location.hash;
if (this.$location === null) {
return;
}
if (hash === '') {
if (this.$orderOpened) {
this.$hideOrderContainer().then(function () {
......@@ -114,7 +121,7 @@ define('package/quiqqer/order/bin/frontend/controls/frontendusers/Orders', [
hash = hash.replace('#', '');
if (this.$orderOpened === hash) {
if (this.$orderOpened === hash || !this.$isOrderHash(hash)) {
return;
}
......@@ -222,6 +229,18 @@ define('package/quiqqer/order/bin/frontend/controls/frontendusers/Orders', [
//region utils
/**
* Is the hash an order hash?
* can be used for the first check
*
* @param hash
* @return {boolean}
*/
$isOrderHash: function (hash) {
var count = (hash.match(/-/g) || []).length;
return count === 4;
},
/**
* hide the order list
*
......
{if $sheetCount}
{if $sheetsMax}
<div class="quiqqer-order-profile-orders-pagination">
{control
control="QUI\Controls\Navigating\Pagination"
......@@ -19,7 +19,7 @@
{/foreach}
</div>
{if $sheetCount}
{if $sheetsMax}
<div class="quiqqer-order-profile-orders-pagination">
{control
control="QUI\Controls\Navigating\Pagination"
......
......@@ -62,6 +62,8 @@ public function getBody()
$sheetsMax = ceil($count / $limit);
}
QUI\System\Log::writeRecursive($sheetsMax);
$orders = [];
$result = $Orders->getOrdersByUser($User, [
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren