Permalink
Browse files

Move grid to midcom namespace

  • Loading branch information...
flack committed Aug 19, 2018
1 parent 2bd7ea8 commit 8a8e4f3f883eb63cd0f1084cc9152dd131798f43
Showing with 236 additions and 160 deletions.
  1. +1 −0 lib/midcom/config/main.php
  2. +6 −3 lib/org/openpsa/contacts/handler/group/view.php
  3. +5 −3 lib/org/openpsa/directmarketing/handler/campaign/campaign.php
  4. +6 −3 lib/org/openpsa/directmarketing/handler/campaign/rules.php
  5. +6 −3 lib/org/openpsa/directmarketing/handler/list.php
  6. +5 −3 lib/org/openpsa/documents/handler/document/view.php
  7. +3 −1 lib/org/openpsa/documents/viewer.php
  8. +3 −2 lib/org/openpsa/expenses/handler/hours/list.php
  9. +4 −2 lib/org/openpsa/expenses/handler/index.php
  10. +2 −2 lib/org/openpsa/expenses/style/hours_grid.php
  11. +1 −1 lib/org/openpsa/expenses/style/hours_week.php
  12. +3 −1 lib/org/openpsa/invoices/handler/invoice/items.php
  13. +2 −1 lib/org/openpsa/invoices/handler/invoice/view.php
  14. +6 −4 lib/org/openpsa/invoices/handler/list.php
  15. +5 −2 lib/org/openpsa/invoices/handler/scheduled.php
  16. +1 −1 lib/org/openpsa/invoices/style/show-items.php
  17. +1 −1 lib/org/openpsa/invoices/style/show-scheduled.php
  18. +3 −1 lib/org/openpsa/invoices/viewer.php
  19. +2 −1 lib/org/openpsa/mypage/handler/today.php
  20. +5 −3 lib/org/openpsa/products/handler/list.php
  21. +2 −1 lib/org/openpsa/projects/handler/project/view.php
  22. +7 −4 lib/org/openpsa/projects/handler/task/list.php
  23. +3 −1 lib/org/openpsa/projects/handler/task/list/project.php
  24. +5 −5 lib/org/openpsa/projects/style/show-task-grid.php
  25. +4 −2 lib/org/openpsa/relatedto/handler/journal/list.php
  26. +3 −1 lib/org/openpsa/reports/handler/invoices/report.php
  27. +4 −2 lib/org/openpsa/reports/handler/sales/report.php
  28. +6 −6 lib/org/openpsa/reports/style/invoices_report-grid.php
  29. +2 −2 lib/org/openpsa/reports/style/sales_report-deliverable-grid.php
  30. +5 −2 lib/org/openpsa/sales/handler/deliverable/list.php
  31. +3 −1 lib/org/openpsa/sales/handler/list.php
  32. +1 −1 lib/org/openpsa/sales/style/show-salesproject-deliverables-grid.php
  33. +4 −4 lib/org/openpsa/sales/style/show-salesproject-grid.php
  34. +2 −1 lib/org/openpsa/user/handler/group/view.php
  35. +5 −3 lib/org/openpsa/user/handler/list.php
  36. +4 −0 src/midcom/grid/config/manifest.inc
  37. +5 −5 {lib/org/openpsa/core → src/midcom/grid}/exec/csv_export.php
  38. +16 −11 lib/org/openpsa/widgets/grid/main.php → src/midcom/grid/grid.php
  39. +17 −10 {lib/org/openpsa/widgets → src/midcom}/grid/provider.php
  40. +7 −5 {lib/org/openpsa/widgets → src/midcom}/grid/provider/client.php
  41. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ar.js
  42. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ar.js.map
  43. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-bg.js
  44. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-bg.js.map
  45. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ca.js
  46. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ca.js.map
  47. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-cn.js
  48. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-cn.js.map
  49. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-cs.js
  50. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-cs.js.map
  51. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-da.js
  52. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-da.js.map
  53. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-de.js
  54. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-de.js.map
  55. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-el.js
  56. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-el.js.map
  57. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-en.js
  58. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-en.js.map
  59. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-es.js
  60. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-es.js.map
  61. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-fa.js
  62. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-fa.js.map
  63. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-fi.js
  64. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-fi.js.map
  65. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-fr.js
  66. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-fr.js.map
  67. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-gl.js
  68. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-gl.js.map
  69. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-he.js
  70. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-he.js.map
  71. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-hr.js
  72. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-hr.js.map
  73. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-hu.js
  74. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-hu.js.map
  75. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-id.js
  76. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-id.js.map
  77. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-is.js
  78. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-is.js.map
  79. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-it.js
  80. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-it.js.map
  81. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ja.js
  82. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ja.js.map
  83. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-kr.js
  84. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-kr.js.map
  85. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-lt.js
  86. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-lt.js.map
  87. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-me.js
  88. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-me.js.map
  89. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-nl.js
  90. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-nl.js.map
  91. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-no.js
  92. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-no.js.map
  93. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-pl.js
  94. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-pl.js.map
  95. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-pt-br.js
  96. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-pt-br.js.map
  97. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-pt.js
  98. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-pt.js.map
  99. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ro.js
  100. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ro.js.map
  101. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ru.js
  102. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ru.js.map
  103. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-sk.js
  104. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-sk.js.map
  105. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-sr.js
  106. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-sr.js.map
  107. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-sv.js
  108. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-sv.js.map
  109. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-th.js
  110. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-th.js.map
  111. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-tr.js
  112. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-tr.js.map
  113. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-tw.js
  114. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-tw.js.map
  115. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ua.js
  116. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-ua.js.map
  117. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-vi.js
  118. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/i18n/grid.locale-vi.js.map
  119. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/jquery.jqgrid.min.js
  120. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/jquery.jqgrid.min.js.map
  121. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/ui.jqgrid.min.css
  122. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid-4.15.4/ui.jqgrid.min.css.map
  123. 0 static/{org.openpsa.widgets → midcom.grid}/jqGrid.custom.css
  124. +50 −50 static/{org.openpsa.widgets → midcom.grid}/jqGrid.custom.js
  125. +11 −5 test/{org/openpsa/widgets/grid/mainTest.php → midcom/grid/gridTest.php}
@@ -392,6 +392,7 @@ class midcom_config implements arrayaccess
'lib/midgard/admin/asgard',
'lib/fi/protie/navigation',
'src/midcom/datamanager',
'src/midcom/grid',
],
// Visibility settings (NAP)
@@ -8,14 +8,17 @@
use Doctrine\ORM\Query\Expr\Join;
use midcom\datamanager\datamanager;
use midcom\grid\provider\client;
use midcom\grid\grid;
use midcom\grid\provider;
/**
* org.openpsa.contacts group handler and viewer class.
*
* @package org.openpsa.contacts
*/
class org_openpsa_contacts_handler_group_view extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
use org_openpsa_contacts_handler;
@@ -104,7 +107,7 @@ public function _handler_view($handler_id, array $args, array &$data)
if ($this->group->orgOpenpsaObtype < org_openpsa_contacts_group_dba::MYCONTACTS) {
$this->type = 'group';
$data['group_tree'] = $this->get_group_tree();
$data['members_grid'] = new org_openpsa_widgets_grid('members_grid', 'json');
$data['members_grid'] = new grid('members_grid', 'json');
org_openpsa_widgets_tree::add_head_elements();
} else {
$this->type = 'organization';
@@ -172,7 +175,7 @@ public function _handler_json($handler_id, array $args, array &$data)
{
midcom::get()->skip_page_style = true;
$data['group'] = new org_openpsa_contacts_group_dba($args[0]);
$data['provider'] = new org_openpsa_widgets_grid_provider($this);
$data['provider'] = new provider($this);
return $this->show('show-group-json');
}
@@ -9,12 +9,14 @@
use midcom\datamanager\datamanager;
use midcom\datamanager\schemadb;
use Doctrine\ORM\Query\Expr\Join;
use midcom\grid\provider\client;
use midcom\grid\provider;
/**
* @package org.openpsa.directmarketing
*/
class org_openpsa_directmarketing_handler_campaign_campaign extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
use org_openpsa_directmarketing_handler;
@@ -101,7 +103,7 @@ public function _handler_view($handler_id, array $args, array &$data)
org_openpsa_widgets_contact::add_head_elements();
$this->_populate_toolbar();
$provider = new org_openpsa_widgets_grid_provider($this);
$provider = new provider($this);
$data['grid'] = $provider->get_grid('list_members_' . $this->_campaign->guid);
// Populate calendar events for the campaign
@@ -200,7 +202,7 @@ public function _handler_members($handler_id, array $args, array &$data)
midcom::get()->skip_page_style = true;
$data['provider'] = new org_openpsa_widgets_grid_provider($this);
$data['provider'] = new provider($this);
return $this->show('show-campaign-members');
}
}
@@ -6,13 +6,16 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/
use midcom\grid\provider\client;
use midcom\grid\provider;
/**
* directmarketing campaign rules handler
*
* @package org.openpsa.directmarketing
*/
class org_openpsa_directmarketing_handler_campaign_rules extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
use org_openpsa_directmarketing_handler;
@@ -76,7 +79,7 @@ public function _handler_query($handler_id, array $args, array &$data)
$this->rules = $this->_load_rules();
midcom::get()->skip_page_style = true;
$data['provider'] = new org_openpsa_widgets_grid_provider($this);
$data['provider'] = new provider($this);
return $this->show('show-campaign-members');
}
@@ -141,7 +144,7 @@ public function _handler_edit_query($handler_id, array $args, array &$data)
];
$this->_view_toolbar->add_items($buttons);
$provider = new org_openpsa_widgets_grid_provider($this);
$provider = new provider($this);
$data['grid'] = $provider->get_grid('preview_persons');
midcom::get()->head->enable_jquery();
@@ -7,19 +7,22 @@
*/
use midcom\datamanager\schemadb;
use midcom\grid\provider\client;
use midcom\grid\grid;
use midcom\grid\provider;
/**
* Campaign list handler
*
* @package org.openpsa.directmarketing
*/
class org_openpsa_directmarketing_handler_list extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
public function _on_initialize()
{
midcom::get()->auth->require_valid_user();
org_openpsa_widgets_grid::add_head_elements();
grid::add_head_elements();
}
public function get_qb($field = null, $direction = 'ASC', array $search = [])
@@ -80,7 +83,7 @@ public function _handler_frontpage($handler_id, array $args, array &$data)
}
}
$provider = new org_openpsa_widgets_grid_provider($this, 'local');
$provider = new provider($this, 'local');
$data['grid'] = $provider->get_grid('campaign_grid');
return $this->show('show-frontpage');
@@ -7,14 +7,16 @@
*/
use midcom\datamanager\datamanager;
use midcom\grid\provider\client;
use midcom\grid\provider;
/**
* org.openpsa.documents document handler and viewer class.
*
* @package org.openpsa.documents
*/
class org_openpsa_documents_handler_document_view extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
/**
* The document we're working with (if any).
@@ -31,7 +33,7 @@ class org_openpsa_documents_handler_document_view extends midcom_baseclasses_com
/**
* The grid provider for document versions
*
* @var org_openpsa_widgets_grid_provider
* @var provider
*/
private $_provider;
@@ -122,7 +124,7 @@ private function _load_document($guid)
public function _handler_versions($handler_id, array $args, array &$data)
{
$this->_document = $this->_load_document($args[0]);
$this->_provider = new org_openpsa_widgets_grid_provider($this, 'local');
$this->_provider = new provider($this, 'local');
$this->_provider->add_order('created', 'DESC');
}
@@ -6,6 +6,8 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/
use midcom\grid\grid;
/**
* org.openpsa.documents site interface class.
*
@@ -24,7 +26,7 @@ public function _on_handle($handler, array $args)
// Always run in uncached mode
midcom::get()->cache->content->no_cache();
org_openpsa_widgets_grid::add_head_elements();
grid::add_head_elements();
org_openpsa_widgets_tree::add_head_elements();
}
}
@@ -7,6 +7,7 @@
*/
use midcom\datamanager\helper\autocomplete;
use midcom\grid\grid;
/**
* @package org.openpsa.expenses
@@ -30,7 +31,7 @@ public function _on_initialize()
$this->qb = org_openpsa_expenses_hour_report_dba::new_query_builder();
$this->qb->add_order('date', 'DESC');
org_openpsa_widgets_grid::add_head_elements();
grid::add_head_elements();
autocomplete::add_head_elements();
org_openpsa_widgets_contact::add_head_elements();
}
@@ -114,7 +115,7 @@ public function _handler_invoice($handler_id, array $args, array &$data)
private function show_list(array &$data)
{
$data['grid'] = new org_openpsa_widgets_grid($data['mode'] . '_hours_grid', 'local');
$data['grid'] = new grid($data['mode'] . '_hours_grid', 'local');
$data['group_options'] = [
'category' => $this->_l10n->get('category'),
'task' => $this->_l10n->get('task'),
@@ -6,6 +6,8 @@
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
*/
use midcom\grid\grid;
/**
* @package org.openpsa.expenses
*/
@@ -63,12 +65,12 @@ public function _handler_index($handler_id, array $args, array &$data)
$this->_populate_toolbar($data['previous_week'], $data['next_week']);
org_openpsa_widgets_grid::add_head_elements();
grid::add_head_elements();
$data['view_title'] = sprintf($this->_l10n->get("expenses in week %s"), strftime("%V %G", $data['week_start']));
$this->add_breadcrumb('', $data['view_title']);
midcom::get()->head->set_pagetitle($data['view_title']);
$data['grid'] = new org_openpsa_widgets_grid('hours_week', 'local');
$data['grid'] = new grid('hours_week', 'local');
$data['group_options'] = [
'task' => $this->_l10n->get('task'),
'person' => $this->_l10n->get('person')
@@ -130,9 +130,9 @@
</div>
<script type="text/javascript">
org_openpsa_grid_helper.bind_grouping_switch('&(grid_id);');
midcom_grid_helper.bind_grouping_switch('&(grid_id);');
org_openpsa_batch_processing.initialize({
midcom_grid_batch_processing.initialize({
id: '&(grid_id);',
options: <?php echo json_encode($data['action_options']); ?>
});
@@ -46,7 +46,7 @@ function calculate_subtotal(val, name, record)
?>
</div>
<script type="text/javascript">
org_openpsa_grid_helper.bind_grouping_switch('&(grid_id);');
midcom_grid_helper.bind_grouping_switch('&(grid_id);');
var grid = $("#&(grid_id);"),
date_columns = <?php echo json_encode($date_columns); ?>,
@@ -6,6 +6,8 @@
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
*/
use midcom\grid\grid;
/**
* Invoice item handler
*
@@ -64,7 +66,7 @@ public function _handler_items($handler_id, array $args, array &$data)
}
$data['invoice'] = $this->_object;
$data['grid'] = new org_openpsa_widgets_grid('invoice_items', 'local');
$data['grid'] = new grid('invoice_items', 'local');
$data['grid']->set_footer_data(['sum' => $invoice_sum]);
$this->_prepare_output();
@@ -8,6 +8,7 @@
use midcom\datamanager\datamanager;
use midcom\datamanager\schemadb;
use midcom\grid\grid;
/**
* Invoice read handler
@@ -46,7 +47,7 @@ public function _handler_read($handler_id, array $args, array &$data)
$this->bind_view_to_object($this->invoice, $dm->get_schema()->get_name());
midcom::get()->head->set_pagetitle($this->_l10n->get('invoice') . ' ' . $this->invoice->get_label());
org_openpsa_widgets_grid::add_head_elements();
grid::add_head_elements();
org_openpsa_widgets_ui::enable_ui_tab();
$this->add_stylesheet(MIDCOM_STATIC_URL . "/org.openpsa.core/list.css");
$this->add_stylesheet(MIDCOM_STATIC_URL . "/org.openpsa.helpers/fileinfo.css");
@@ -7,14 +7,16 @@
*/
use Doctrine\ORM\Query\Expr\Join;
use midcom\grid\provider\client;
use midcom\grid\provider;
/**
* Invoice list handler
*
* @package org.openpsa.invoices
*/
class org_openpsa_invoices_handler_list extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
use org_openpsa_invoices_handler;
@@ -157,7 +159,7 @@ public function _handler_json($handler_id, array $args, array &$data)
{
midcom::get()->skip_page_style = true;
$this->_list_type = $args[0];
$data['provider'] = new org_openpsa_widgets_grid_provider($this);
$data['provider'] = new provider($this);
return $this->show('show-grid-json');
}
@@ -206,7 +208,7 @@ private function _show_recent()
{
$this->_request_data['list_type'] = 'paid';
$this->_list_type = 'recent';
$provider = new org_openpsa_widgets_grid_provider($this);
$provider = new provider($this);
$provider->add_order('paid', 'DESC');
if ($provider->count_rows() > 0) {
@@ -242,7 +244,7 @@ private function _show_invoice_list($type = 'all')
{
$this->_list_type = $type;
$provider = new org_openpsa_widgets_grid_provider($this, 'local');
$provider = new provider($this, 'local');
if ($provider->count_rows() == 0) {
return;
}
@@ -6,11 +6,14 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/
use midcom\grid\provider\client;
use midcom\grid\provider;
/**
* @package org.openpsa.invoices
*/
class org_openpsa_invoices_handler_scheduled extends midcom_baseclasses_components_handler
implements org_openpsa_widgets_grid_provider_client
implements client
{
use org_openpsa_invoices_handler;
@@ -27,7 +30,7 @@ public function _handler_list($handler_id, array $args, array &$data)
$siteconfig = org_openpsa_core_siteconfig::get_instance();
$this->_sales_url = $siteconfig->get_node_full_url('org.openpsa.sales');
$provider = new org_openpsa_widgets_grid_provider($this, 'local');
$provider = new provider($this, 'local');
$provider->add_order('start');
$data['grid'] = $provider->get_grid('scheduled_invoices');
@@ -46,7 +46,7 @@ function update_totals() {
grid.jqGrid("footerData", "set", {sum: total});
}
org_openpsa_grid_editable.enable_inline("<?= $grid_id ?>", {
midcom_grid_editable.enable_inline("<?= $grid_id ?>", {
afterdeletefunc: update_totals,
enable_sorting: true,
position_url: '&(position_url);'
@@ -50,5 +50,5 @@
<?php $grid->render(); ?>
</div>
<script type="text/javascript">
org_openpsa_grid_helper.bind_grouping_switch('&(grid_id);');
midcom_grid_helper.bind_grouping_switch('&(grid_id);');
</script>
Oops, something went wrong.

0 comments on commit 8a8e4f3

Please sign in to comment.