From 4e788242bdb85682ba13dcb0caf2d72348479cf4 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Wed, 16 Nov 2016 10:47:54 +0000 Subject: - Export Profil (FTP Speicherung / Cron ausführung / XML Erstellung) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5911 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/admin/form/text.phtml | 13 +-- views/css/admin.css | 1 + views/js/editable.js | 63 +++---------- views/mods/mod_export/fields.phtml | 18 +++- views/mods/mod_export/profil.phtml | 145 ++++++++++++++++++++++++++++-- views/mods/mod_export/settings_edit.phtml | 26 ++++++ 6 files changed, 199 insertions(+), 67 deletions(-) diff --git a/views/admin/form/text.phtml b/views/admin/form/text.phtml index 90a2b4c..1cfd831 100644 --- a/views/admin/form/text.phtml +++ b/views/admin/form/text.phtml @@ -8,7 +8,7 @@ view['field_config']['noP'])) { ?> view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?>>view['field_value']; ?> -

view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?> class="form-control-static" style="padding-left:0px;">view['field_value']; ?>

+

view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?> class="form-control-static">view['field_value']; ?>

view['field_config']['help'])) { ?> @@ -23,12 +23,15 @@ jQuery(document).ready(function() { jQuery('#view['field_id']; ?>').wspg_editable('view['field_config']['inlineEdit_url']; ?>', { - view['field_config']['inlineEdit_type'])) { ?> - 'type': 'view['field_config']['inlineEdit_type']; ?>', 'placement': 'bottom' + view['field_config']['inlineEdit_type'])) { ?> + ,'type': 'view['field_config']['inlineEdit_type']; ?>' + + view['field_config']['inlineEdit_source'])) { ?> + , 'data': view['field_config']['inlineEdit_source']; ?> - view['field_config']['inlineEdit_source'])) { ?> - ,'data': view['field_config']['inlineEdit_source']); ?> + view['field_config']['inlineEdit_callback'])) { ?> + , 'callback': function(response, newValue) { view['field_config']['inlineEdit_callback']; ?>(response, newValue); } } ); diff --git a/views/css/admin.css b/views/css/admin.css index 032d716..3b0b1e6 100644 --- a/views/css/admin.css +++ b/views/css/admin.css @@ -45,6 +45,7 @@ #wpsg-bs .checkbox input { margin-top:1px; } #wpsg-bs .info { font-style:italic; } #wpsg-bs .tab-pane { padding-top:15px; } +#wpsg-bs fieldset > legend { padding-top:2rem; text-align:right; } /* Allgemeine Klassen */ .wpsg_grey { color:#999999; } diff --git a/views/js/editable.js b/views/js/editable.js index 353c576..e4eb68f 100644 --- a/views/js/editable.js +++ b/views/js/editable.js @@ -25,50 +25,30 @@ if (typeof options.type == "string") opt['type'] = options.type; - if (options.type == "select" && typeof options.data == "string") - { - - var ar = []; - var arData = jQuery.parseJSON(options.data); - var strValue = jQuery(this).html(); - var value = 0; - - for (var i in arData) - { - - ar.push( { 'value': i, 'text': arData[i] } ); - if (arData[i] == strValue) value = i; - - } - - // Normale Übergabe eines JSON Strings - opt.source = ar; - opt.type = 'select'; - opt.value = value; - - } - else if (options.type == "select" && typeof options.data == "object") + if (options.type == "select" && Array.isArray(options.data)) { - - var value = 0; + + var value = "0"; var strValue = jQuery(this).html(); for (var i in options.data) { - - if (options.data[i] == strValue) value = i; + + if (options.data[i].text == strValue) value = options.data[i].value; } opt.source = options.data; - opt.value = value + opt.type = 'select'; + opt.value = value; - } + } else if (options.type == 'multiarray') { var ar = []; var arData = jQuery.parseJSON(options.data); + var strValue = jQuery(this).html(); for (var i in arData) { @@ -80,6 +60,8 @@ objData['children'].push( { 'value': j, 'text': arData[i]['fields'][j] } ); + if (arData[i]['fields'][j] == strValue) value = j; + } ar.push(objData); @@ -88,29 +70,8 @@ opt.source = ar; opt.type = 'select'; + opt.value = j; - } - else if (options.type == 'string' && typeof options.data == "string") - { - - var ar = []; - var arData = jQuery.parseJSON(options.data); - - for (var i in arData) - { - - ar.push( { - 'value': i, - 'text': arData[i] - } ); - - if (arData[i] == jQuery(this).text()) opt.value = i; - - } - - opt.type = 'select'; - opt.source = ar; - } else { diff --git a/views/mods/mod_export/fields.phtml b/views/mods/mod_export/fields.phtml index abb1034..08f19f7 100644 --- a/views/mods/mod_export/fields.phtml +++ b/views/mods/mod_export/fields.phtml @@ -15,6 +15,10 @@ + + +   + @@ -54,7 +58,15 @@
view['arFieldFormats'][$f['format']]; ?>
+ + + + + /> + +   + @@ -63,7 +75,7 @@ - + : @@ -87,7 +99,7 @@ jQuery('#field_format_').wspg_editable('', { 'type': 'select', - 'data': view['arFieldFormats']); ?>, + 'data': view['arFieldFormats']); ?>, 'callback': function(response, newValue) { if (newValue === "700") jQuery('#userformatrow_').show(); @@ -110,7 +122,7 @@ + +
+

view['profil']['orderfilter']['cdate_y'], '-1')]; ?>

+ +
+ + true)); ?> + + hasMod('wpsg_mod_rechnungen')) { ?> + +
+
+

view['profil']['orderfilter']['invoicedate_m'], '-1')]; ?>

+ +
+
+

view['profil']['orderfilter']['invoicedate_y'], '-1')]; ?>

+ +
+
+ true)); ?> + + + + + + + + + + @@ -63,6 +184,14 @@ -- cgit v1.2.3