commit 60f92e55b340d4c988d5ea6a0415f97d4c63a315
Author: Werner Hahn <wh@futureworldsearch.net>
Date:   Tue Oct 18 17:01:25 2016 +0200

    Shopmodul: FileUploader - Überarbeitet Es kann jeder Controller/action jetzt aufgerufen. Javascript in extra Datei
    
    Conflicts:
            SL/Controller/FileUploader.pm
            js/kivi.FileUploader.js
            js/kivi.ShopOrder.js

diff --git a/SL/Controller/ShopOrder.pm b/SL/Controller/ShopOrder.pm
index 6750772e6..068848bbb 100644
--- a/SL/Controller/ShopOrder.pm
+++ b/SL/Controller/ShopOrder.pm
@@ -1,4 +1,5 @@
 package SL::Controller::ShopOrder;
+#package SL::Controller::ShopOrder;
 # Controller::ShopOrder
 
 use strict;
diff --git a/SL/DB/File.pm b/SL/DB/File.pm
index d44f07225..bb6def2f7 100644
--- a/SL/DB/File.pm
+++ b/SL/DB/File.pm
@@ -2,6 +2,7 @@
 # Feel free to modify it at will; it will not be overwritten automatically.
 
 package SL::DB::File;
+#package SL::DB::File;
 
 use strict;
 
diff --git a/SL/ShopConnector/Shopware.pm b/SL/ShopConnector/Shopware.pm
index e4b078c5a..e08fed73c 100644
--- a/SL/ShopConnector/Shopware.pm
+++ b/SL/ShopConnector/Shopware.pm
@@ -1,5 +1,6 @@
 package SL::ShopConnector::Shopware;
 #package SL::ShopConnector::Shopware;
+#package SL::ShopConnector::Shopware;
 
 use strict;
 
diff --git a/js/kivi.FileUploader.js b/js/kivi.FileUploader.js
new file mode 100644
index 000000000..559d4de7c
--- /dev/null
+++ b/js/kivi.FileUploader.js
@@ -0,0 +1,25 @@
+//TMP
+namespace('kivi.FileUploader', function(ns) {
+  //opens a popupdialog for fileupload
+
+  //id                  = id of the id in the table files
+  //trans_id            = id of the object (part_id, shoppart_id, project_id,...) where the file belongs to
+  //modul               = name where the file belongs to like IC, shop_part, CV ....
+  //controller_action   = Controller/Action wich will be called by button save in popupdialog the todo whatever you want to to with the file(save it to db, save it to webdav)
+  //                      controller_action is passed to the popup_dialog fileupload form and can/will be called from the form to deal with the uploaded file
+  //allowed_filetypes   = must be seperated by | like jpg|gif|pdf
+  ns.add_file = function(id,trans_id,modul,controller_action,allowed_filetypes) {
+    kivi.popup_dialog({
+        url :           'controller.pl?action=FileUploader/ajax_add_file',
+        data:           'id=' + id + '&trans_id=' + trans_id + '&modul=' + modul + '&ca=' + controller_action + '&aft=' + allowed_filetypes,
+        dialog:         { title: kivi.t8('File upload') }
+    } );
+    return true;
+  };
+
+  ns.delete_file = function(id,controller_action) {
+    $.post('controller.pl', { action: controller_action, id: id }, function(data) {
+      kivi.eval_json_result(data);
+    });
+  };
+});
diff --git a/js/kivi.ShopOrder.js b/js/kivi.ShopOrder.js
new file mode 100644
index 000000000..ceaf328ad
--- /dev/null
+++ b/js/kivi.ShopOrder.js
@@ -0,0 +1,33 @@
+//TMP
+namespace('kivi.ShopOrder', function(ns) {
+  ns.massTransferInitialize = function() {
+    kivi.popup_dialog({
+      id: 'status_mass_transfer',
+      dialog: {
+        title: kivi.t8('Status Shoptransfer')
+      }
+    });
+    alert('Hallo');
+  };
+
+  ns.massTransferStarted = function() {
+    $('#status_mass_transfer').data('timerId', setInterval(function() {
+      $.get("controller.pl", {
+        action: 'ShopOrder/transfer_status',
+        job_id: $('#smt_job_id').val()
+      }, kivi.eval_json_result);
+    }, 5000));
+  };
+
+  ns.massTransferFinished = function() {
+    clearInterval($('#status_mass_transfer').data('timerId'));
+    $('.ui-dialog-titlebar button.ui-dialog-titlebar-close').prop('disabled', '')
+  };
+
+  ns.setup = function() {
+    kivi.ShopOrder.massTransferInitialize();
+    kivi.submit_ajax_form('controller.pl?action=ShopOrder/mass_transfer','[name=shop_orders]');
+  };
+
+});
+//$(kivi.ShopOrder.setup);
diff --git a/templates/webpages/common/file_upload.html b/templates/webpages/common/file_upload.html
index d25a600ed..7b04b55e9 100644
--- a/templates/webpages/common/file_upload.html
+++ b/templates/webpages/common/file_upload.html
@@ -1,3 +1,4 @@
+<!-- TMP -->
 [%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE JavaScript -%][% USE Base64 %]
 [% SET style="width: 500px" %]
 [% SET id_base = "fileupload" %]
diff --git a/templates/webpages/shop_order/show.html b/templates/webpages/shop_order/show.html
index d7b1dcdac..3e25ab510 100644
--- a/templates/webpages/shop_order/show.html
+++ b/templates/webpages/shop_order/show.html
@@ -1,3 +1,4 @@
+<!-- TMP -->
 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
 [% L.stylesheet_tag('webshop') %]
 
diff --git a/templates/webpages/shop_part/_list_images.html b/templates/webpages/shop_part/_list_images.html
index 532e3680f..c9a621c98 100644
--- a/templates/webpages/shop_part/_list_images.html
+++ b/templates/webpages/shop_part/_list_images.html
@@ -1,3 +1,4 @@
+<!-- TMP -->
 [%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%]
 [%- USE T8 %][% USE Base64 %]
 [%- USE Dumper %]
