Created
August 23, 2017 14:54
-
-
Save Semdevmaster/664a7e50f335210152d8a65f90794b58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
switch ($modx->event->name) { | |
case 'msOnManagerCustomCssJs': | |
if ($page != 'orders') return; | |
$modx->controller->addHtml(" | |
<script type='text/javascript'> | |
Ext.ComponentMgr.onAvailable('minishop2-grid-orders', function(){ | |
Ext.override(miniShop2.grid.Orders , { | |
getMenu: function (grid, rowIndex) { | |
var ids = this._getSelectedIds(); | |
var row = grid.getStore().getAt(rowIndex); | |
var menu = miniShop2.utils.getMenu(row.data['actions'], this, ids); | |
menu.push({ | |
text: 'Печать' | |
,handler: function () { | |
window.open('http://www.example.com?ReportID=1', '_blank'); | |
} | |
}); | |
this.addContextMenuItem(menu); | |
} | |
}); | |
}); | |
</script>"); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment