From: Bernd Blessmann Date: Thu, 8 Dec 2011 21:22:31 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~127^2~5 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/97c3c8c2c5d7a35302f9f72c23c7e056ba777a2a?hp=734f5baa9d1bbdba84a1914299e4e0d94e42984a Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/Form.pm b/SL/Form.pm index 37e4a21b6..eaee0965a 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -701,6 +701,7 @@ sub header { '', '', '', + '', ''; push @header, $self->{javascript} if $self->{javascript}; push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] }; diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 34a20f3f6..d8d223ecb 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -13,7 +13,7 @@ use strict; # Do not use these id's to store information across requests. my $_id_sequence = int rand 1e7; sub _tag_id { - return $_id_sequence = ($_id_sequence + 1) % 1e7; + return "id_" . ( $_id_sequence = ($_id_sequence + 1) % 1e7 ); } } @@ -507,7 +507,7 @@ sub online_help_tag { die 'malformed help tag' unless $tag =~ /^[a-zA-Z0-9_]+$/; return unless -f $file; - return $self->html_tag('a', $text, href => $file, target => '_blank'); + return $self->html_tag('a', $text, href => $file, class => 'jqModal') } sub dump { diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index c6910ba85..ee4918131 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -442,10 +442,10 @@ sub check_form { if ($form->parse_amount(\%myconfig, $form->{"paid_$i"})) { $amount -= $form->parse_amount(\%myconfig, $form->{"paid_$i"}); - push(@{ $form->{paid} }, $form->{"paid_$i"}); - push(@{ $form->{due} }, $form->{"due_$i"}); - push(@{ $form->{invnumber} }, $form->{"invnumber_$i"}); - push(@{ $form->{invdate} }, $form->{"transdate_$i"}); + push(@{ $form->{paid} ||= [] }, $form->{"paid_$i"}); + push(@{ $form->{due} ||= [] }, $form->{"due_$i"}); + push(@{ $form->{invnumber} ||= [] }, $form->{"invnumber_$i"}); + push(@{ $form->{invdate} ||= [] }, $form->{"transdate_$i"}); } } diff --git a/css/lx-office-erp.css b/css/lx-office-erp.css index a38143098..455fe599a 100644 --- a/css/lx-office-erp.css +++ b/css/lx-office-erp.css @@ -326,3 +326,33 @@ label { margin-bottom: 5px; padding: 5px; } + +.jqmWindow { + display: none; + + position: fixed; + top: 17%; + left: 40%; + + margin-left: -200px; + width: 700px; + + background-color: lemonchiffon; + color: #333; + border: 1px solid black; + padding: 4px; +} + +.jqmContent { + padding: 8px; +} + +.jqmWindow h1 { + border: 0; + padding: 0; + background-color: lemonchiffon; +} + +.jqmOverlay { + background-color: #000; +} diff --git a/image/close.png b/image/close.png new file mode 100644 index 000000000..360e40204 Binary files /dev/null and b/image/close.png differ diff --git a/js/jqModal.js b/js/jqModal.js new file mode 120000 index 000000000..4f218050d --- /dev/null +++ b/js/jqModal.js @@ -0,0 +1 @@ +jqModal/jqModal.js \ No newline at end of file diff --git a/js/jqModal/jqModal.js b/js/jqModal/jqModal.js new file mode 100644 index 000000000..19ed95519 --- /dev/null +++ b/js/jqModal/jqModal.js @@ -0,0 +1,69 @@ +/* + * jqModal - Minimalist Modaling with jQuery + * (http://dev.iceburg.net/jquery/jqModal/) + * + * Copyright (c) 2007,2008 Brice Burgess + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * $Version: 03/01/2009 +r14 + */ +(function($) { +$.fn.jqm=function(o){ +var p={ +overlay: 0, +overlayClass: 'jqmOverlay', +closeClass: 'jqmClose', +trigger: '.jqModal', +ajax: '@href', +ajaxText: '...', +target: '#help_content', +modal: F, +toTop: F, +onShow: F, +onHide: F, +onLoad: F +}; +return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s; +H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s}; +if(p.trigger)$(this).jqmAddTrigger(p.trigger); +});}; + +$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');}; +$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');}; +$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});}; +$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});}; + +$.jqm = { +hash:{}, +open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('
').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z); + if(c.modal) {if(!A[0])L('bind');A.push(s);} + else if(c.overlay > 0)h.w.jqmAddClose(o); + else o=F; + + h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F; + if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}} + + if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u; + r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});} + else if(cc)h.w.jqmAddClose($(cc,h.w)); + + if(c.toTop&&h.o)h.w.before('').insertAfter(h.o); + (c.onShow)?c.onShow(h):h.w.show();e(h);return F; +}, +close:function(s){var h=H[s];if(!h.a)return F;h.a=F; + if(A[0]){A.pop();if(!A[0])L('unbind');} + if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove(); + if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F; +}, +params:{}}; +var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false, +i=$('').css({opacity:0}), +e=function(h){if(ie6)if(h.o)h.o.html('

').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);}, +f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}}, +L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);}, +m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;}, +hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() { + if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});}; +})(jQuery); diff --git a/locale/de/all b/locale/de/all index 9e7229662..bc1371e45 100644 --- a/locale/de/all +++ b/locale/de/all @@ -394,6 +394,8 @@ $self->{texts} = { 'Click on login name to edit!' => 'Zum Bearbeiten den Benutzernamen anklicken!', 'Close' => 'Übernehmen', 'Close Books up to' => 'Die Bücher abschließen bis zum', + 'Close Dialog' => 'Schließen', + 'Close Flash' => 'Schließen', 'Close SEPA exports' => 'SEPA-Export abschließen', 'Close Window' => 'Fenster Schließen', 'Closed' => 'Geschlossen', @@ -1346,6 +1348,7 @@ $self->{texts} = { 'Please select the source bank account for the transfers:' => 'Bitte wählen Sie das Bankkonto als Quelle für die Überweisungen aus:', 'Please seletct the dataset you want to delete:' => 'Bitte wählen Sie die zu löschende Datenbank aus:', 'Please specify a description for the warehouse designated for these goods.' => 'Bitte geben Sie den Namen des Ziellagers für die übernommenen Daten ein.', + 'Please wait...' => 'Bitte warten...', 'Plural' => 'Plural', 'Port' => 'Port', 'Portrait' => 'Hochformat', @@ -2185,6 +2188,7 @@ $self->{texts} = { 'list_of_payments' => 'zahlungsausgaenge', 'list_of_receipts' => 'zahlungseingaenge', 'list_of_transactions' => 'buchungsliste', + 'loading' => 'wird geladen', 'logout' => 'abmelden', 'male' => 'männlich', 'mark as paid' => 'als bezahlt markieren', diff --git a/templates/webpages/common/flash.html b/templates/webpages/common/flash.html index b7164fb92..129d6a3be 100644 --- a/templates/webpages/common/flash.html +++ b/templates/webpages/common/flash.html @@ -2,6 +2,7 @@ [%- IF FLASH %] [%- BLOCK output %]

+ [% [%- title %]: [% FOREACH message = messages %] [%- HTML.escape(message) %] diff --git a/templates/webpages/common/help_overlay.html b/templates/webpages/common/help_overlay.html new file mode 100644 index 000000000..a192a88aa --- /dev/null +++ b/templates/webpages/common/help_overlay.html @@ -0,0 +1,11 @@ +[%- USE T8 %] + +
+ [% +
+ [% 'Please wait...' | $T8 %] + [% 'loading' | $T8 %] +
+
diff --git a/templates/webpages/projects/project_form.html b/templates/webpages/projects/project_form.html index 49b93928c..ad19c13e2 100644 --- a/templates/webpages/projects/project_form.html +++ b/templates/webpages/projects/project_form.html @@ -100,5 +100,6 @@ --> + [% PROCESS 'common/help_overlay.html' %]