From 685108d71043daa0391e75861f0d27340aa44778 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 7 Oct 2014 16:57:53 +0200 Subject: [PATCH] PriceRule: Kontextinfo in Kunden --- js/kivi.CustomerVendor.js | 16 ++++++++++++++ locale/de/all | 1 + templates/webpages/customer_vendor/form.html | 6 ++++++ .../customer_vendor/tabs/price_rules.html | 21 +++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 templates/webpages/customer_vendor/tabs/price_rules.html diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js index 67820bea5..4b4aa3f50 100644 --- a/js/kivi.CustomerVendor.js +++ b/js/kivi.CustomerVendor.js @@ -215,6 +215,22 @@ namespace('kivi.CustomerVendor', function(ns) { return true; }; + + this.inline_report = function(target, source, data){ + $.ajax({ + url: source, + success: function (rsp) { + $(target).html(rsp); + $(target).find('.paginate').find('a').click(function(event){ ns.redirect_event(event, target) }); + $(target).find('a.report-generator-header-link').click(function(event){ ns.redirect_event(event, target) }); + }, + data: data, + }); + }; + this.redirect_event = function(event, target){ + event.preventDefault(); + ns.inline_report(target, event.target + '', {}); + }; }); function local_reinit_widgets() { diff --git a/locale/de/all b/locale/de/all index 2a55bf466..6da14086d 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1862,6 +1862,7 @@ $self->{texts} = { 'Price Factor' => 'Preisfaktor', 'Price Factors' => 'Preisfaktoren', 'Price Rule' => 'Preisregel', + 'Price Rules' => 'Preisregeln', 'Price Source' => 'Preisquelle', 'Price Sources to be disabled in this client' => 'Preisquellen die in diesem Mandanten deaktiviert werden sollen', 'Price factor (database ID)' => 'Preisfaktor (Datenbank-ID)', diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index d8498c6d0..356bb1f31 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -29,6 +29,9 @@ [% IF ( cv_cvars.size ) %]
  • [% 'Custom Variables' | $T8 %]
  • [% END %] + [% IF SELF.cv.id %] +
  • [% 'Price Rules' | $T8 %]
  • + [% END %] [% PROCESS "customer_vendor/tabs/billing.html" %] @@ -42,6 +45,9 @@ [% IF ( cv_cvars.size ) %] [% PROCESS "customer_vendor/tabs/custom_variables.html" %] [% END %] + [% IF SELF.cv.id %] + [% PROCESS "customer_vendor/tabs/price_rules.html" %] + [% END %]
    diff --git a/templates/webpages/customer_vendor/tabs/price_rules.html b/templates/webpages/customer_vendor/tabs/price_rules.html new file mode 100644 index 000000000..dc87a680c --- /dev/null +++ b/templates/webpages/customer_vendor/tabs/price_rules.html @@ -0,0 +1,21 @@ +[%- USE T8 %] +[%- USE LxERP %] +[%- USE L %] +
    +
    +
    + + +
    + -- 2.20.1