Skip to content

Commit

Permalink
feat: open user panel from grid, if user click at customer name / id
Browse files Browse the repository at this point in the history
  • Loading branch information
dehenne committed Mar 20, 2018
1 parent 5942865 commit 84ddaae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bin/backend/controls/panels/Orders.css
Expand Up @@ -43,6 +43,10 @@
background: #eaeff4;
}

.monospace {
font-family: monospace, monospace;
}

/** Invoice details
================================================= */

Expand Down
20 changes: 19 additions & 1 deletion bin/backend/controls/panels/Orders.js
Expand Up @@ -255,6 +255,12 @@ define('package/quiqqer/order/bin/backend/controls/panels/Orders', [
dataIndex: 'id',
dataType : 'integer',
width : 80
}, {
header : QUILocale.get(lg, 'grid.hash'),
dataIndex: 'hash',
dataType : 'string',
width : 280,
className: 'monospace'
}, {
header : QUILocale.get(lg, 'grid.customerNo'),
dataIndex: 'customer_id',
Expand Down Expand Up @@ -326,7 +332,19 @@ define('package/quiqqer/order/bin/backend/controls/panels/Orders', [
this.$Grid.addEvents({
onRefresh : this.refresh,
onClick : this.$refreshButtonStatus,
onDblClick: function () {
onDblClick: function (data) {
if (data.cell.get('data-index') === 'customer_id' ||
data.cell.get('data-index') === 'customer_name') {

require(['utils/Panels'], function (PanelUtils) {
PanelUtils.openUserPanel(
self.$Grid.getDataByRow(data.row).customer_id
);
});

return;
}

self.openOrder(self.$Grid.getSelectedData()[0].id);
}
});
Expand Down

0 comments on commit 84ddaae

Please sign in to comment.