# -------------------------------------------------------------------------
-sub set_longdescription {
- $main::lxdebug->enter_sub();
-
- my $form = $main::form;
- my $locale = $main::locale;
-
- $form->{title} = $locale->text("Enter longdescription");
- $form->header(no_layout => 1);
- print $form->parse_html_template("generic/set_longdescription");
-
- $main::lxdebug->leave_sub();
-}
-
-# -------------------------------------------------------------------------
-
sub H {
return $main::locale->quote_special_chars('HTML', $_[0]);
}
$form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')';
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+
$form->header();
# Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID'
# und Erweiterung für Bug 1760:
), @custom_hiddens,
map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+
$form->header();
print $form->parse_html_template("ir/form_header", \%TMPL_VAR);
), @custom_hiddens,
map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}];
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
+
$form->header();
print $form->parse_html_template("is/form_header", \%TMPL_VAR);
$form->{javascript} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
$form->{javascript} .= qq|<script type="text/javascript" src="js/show_history.js"></script>|;
$form->{javascript} .= qq|<script type="text/javascript" src="js/show_vc_details.js"></script>|;
+ $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase));
$form->header;
if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) {
return string;
}
-function set_longdescription_window(input_name) {
- var parm = centerParms(600,500) + ",width=600,height=500,status=yes,scrollbars=yes";
- var name = document.getElementsByName(input_name)[0].value;
- url = "common.pl?" +
- "INPUT_ENCODING=UTF-8&" +
- "action=set_longdescription&" +
- "longdescription=" + encodeURIComponent(document.getElementsByName(input_name)[0].value) + "&" +
- "input_name=" + encodeURIComponent(input_name) + "&"
- window.open(url, "_new_generic", parm);
- }
-
function check_right_number_format(input_name) {
if(decpoint && thpoint && thpoint == decpoint) {
return show_alert_and_focus(input_name, wrongNumberFormat);
--- /dev/null
+namespace('kivi.SalesPurchase', function(ns) {
+ this.edit_longdescription = function(row) {
+ var $edit = $('#popup_edit_longdescription_input');
+ var $element = $('#longdescription_' + row);
+
+ if (!$element.length) {
+ console.error("kivi.SalesPurchase.edit_longdescription: Element #longdescription_" + row + " not found");
+ return;
+ }
+
+ $edit.data('element', $element);
+ $edit.val($element.val());
+
+ $('#popup_edit_longdescription_runningnumber').html(row);
+ $('#popup_edit_longdescription_partnumber').html($('#partnumber_' + row).val() || '');
+
+ var description = ($('#description_' + row).val() || '').replace(/[\n\r]+/, '');
+ if (description.length >= 50)
+ description = description.substring(0, 50) + "…";
+ $('#popup_edit_longdescription_description').html(description);
+
+ kivi.popup_dialog({
+ id: 'edit_longdescription_dialog',
+ dialog: {
+ title: kivi.t8('Enter longdescription')
+ }
+ });
+ };
+
+ this.set_longdescription = function() {
+ var $edit = $('#popup_edit_longdescription_input');
+ var $element = $edit.data('element');
+
+ $element.val($edit.val());
+ $('#edit_longdescription_dialog').dialog('close');
+ };
+});
"Are you sure?":"Sind Sie sicher?",
"Database Connection Test":"Test der Datenbankverbindung",
"Do you want to set the account number \"#1\" to \"#2\" and the name \"#3\" to \"#4\"?":"Soll die Kontonummer \"#1\" zu \"#2\" und den Name \"#3\" zu \"#4\" geändert werden?",
+"Enter longdescription":"Langtext eingeben",
"Map":"Karte",
"Part picker":"Artikelauswahl",
"The description is missing.":"Die Beschreibung fehlt.",
'Please enter the taxnumber in the client configuration.' => 'Bitte geben Sie in der Mandantenkonfiguration die Steuernummer an.',
'Please enter values' => 'Bitte Werte eingeben',
'Please insert object dimensions below.' => 'Bitte geben Sie die Abmessungen unten ein',
- 'Please insert your longdescription below' => 'Bitte den Langtext eingeben',
'Please install the below listed modules or ask your system administrator to.' => 'Bitte installieren Sie die unten aufgeführten Module, oder bitten Sie Ihren Administrator darum.',
'Please log in to the administration panel.' => 'Bitte melden Sie sich im Administrationsbereich an.',
'Please re-run the analysis for broken general ledger entries by clicking this button:' => 'Bitte wiederholen Sie die Analyse der Hauptbucheinträge, indem Sie auf diesen Button klicken:',
'Revenues EU without UStId' => 'Erlöse EU o. UStId',
'Review of Aging list' => 'Altersstrukturliste',
'Right' => 'Rechts',
+ 'Row' => 'Zeile',
'Row #1: amount has to be different from zero.' => 'Zeile #1: Der Wert darf nicht 0 sein.',
'Row number' => 'Zeilennummer',
'Row was created from current record' => 'Zeile wurde aus aktuellem Beleg erstellt',
<div class="listtop">[% title %]</div>
[%- INCLUDE 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
[%- IF ERRORS && ERRORS.size %]
<p><font color="#ff0000">[% ERRORS.join('<br>') %]</font></p>
-[%- USE T8 %]
-[%- USE HTML %]
- <form name="Form">
-
- <input type="hidden" name="input_name" value="[% HTML.escape(input_name) %]">
-
- <div class="listtop">[% title %]</div>
-
- <p>[% 'Please insert your longdescription below' | $T8 %]</p>
-
- <p><textarea id="longdescription" name="longdescription" rows="15" cols="45" wrap="soft">[% HTML.escape(longdescription) %]</textarea></p>
-
- <p><input type="submit" onclick="longdescription_updated()" value="[% 'Close' | $T8 %]"></p>
- </form>
-
- <script type="text/javascript">
- <!--
- function longdescription_updated() {
- window.opener.document.getElementsByName(document.Form.input_name.value)[0].value = document.getElementsByName("longdescription")[0].value;
-
- self.close();
- }
- -->
- </script>
-
+[%- USE L -%][%- USE LxERP -%]
+
+<div id="edit_longdescription_dialog" style="display: none">
+ <p>
+ <table>
+ <tr>
+ <th align="right">[% LxERP.t8("Row") %]:</th>
+ <td id="popup_edit_longdescription_runningnumber"></td>
+ </tr>
+
+ <tr>
+ <th align="right">[% LxERP.t8("Part Number") %]:</th>
+ <td id="popup_edit_longdescription_partnumber"></td>
+ </tr>
+
+ <tr>
+ <th align="right">[% LxERP.t8("Description") %]:</th>
+ <td id="popup_edit_longdescription_description"></td>
+ </tr>
+ </table>
+ </p>
+
+ <p>[% L.textarea_tag("popup_edit_longdescription_input", "", wrap="soft", style="width: 750px; height: 240px;") %]</p>
+
+ <p>
+ [% L.button_tag("kivi.SalesPurchase.set_longdescription()", LxERP.t8("Close")) %]
+ <a onclick="$('#edit_longdescription_dialog').dialog('close');" href="#">[% LxERP.t8("Abort") %]</a>
+ </p>
+</div>
<p><div class="listtop" width="100%">[% title %]</div></p>
[%- INCLUDE 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
<div class="tabwidget">
<ul>
<p>[% saved_message %]</p>
[%- PROCESS 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
<div class="tabwidget">
<ul>
<h1>[% title %]</h1>
[%- INCLUDE 'common/flash.html' %]
+[%- INCLUDE 'generic/set_longdescription.html' %]
<div class="tabwidget">
<ul>