1 namespace('kivi.ShopOrder', function(ns) {
2 ns.massTransferInitialize = function() {
4 id: 'status_mass_transfer',
6 title: kivi.t8('Status Shoptransfer'),
11 ns.massTransferStarted = function() {
12 $('#status_mass_transfer').data('timerId', setInterval(function() {
13 $.get("controller.pl", {
14 action: 'ShopOrder/transfer_status',
15 job_id: $('#smt_job_id').val()
16 }, kivi.eval_json_result);
20 ns.massTransferFinished = function() {
21 clearInterval($('#status_mass_transfer').data('timerId'));
22 $('.ui-dialog-titlebar button.ui-dialog-titlebar-close').prop('disabled', '')
25 ns.processClose = function() {
26 $('#status_mass_transfer').dialog('close');
27 window.location.href = 'controller.pl?filter.obsolete=0&filter.transferred=0&action=ShopOrder%2flist&db=shop_orders&sort_by=shop_ordernumber';
30 ns.setup = function() {
31 kivi.ShopOrder.massTransferInitialize();
32 kivi.submit_ajax_form('controller.pl?action=ShopOrder/mass_transfer','[name=shop_orders_list]');