Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 40255f36

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID 40255f36b6d4986caa11f5136a3d18857c2231a7
  • Vorgänger 2c7a89dd
  • Nachfolger ebceac3e

Fenster und Tabtitle im XUL Menü gefixt.

Ausserdem unterstützt login.pl jetzt den Parameter callback in allen
Menüs. Solange keiner angegeben ist, wird nach wie vor company_logo
aufegrufen, ansonsten die übergebene relative oder absolute url, und im
iframe aufgerufen.

Unterschiede anzeigen:

bin/mozilla/login.pl
my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
# made it this far, execute the menu
$form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display');
$form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display', "callback=" . $form->escape($form->{callback}));
$auth->set_cookie_environment_variable();
bin/mozilla/menu.pl
sub display {
$lxdebug->enter_sub();
$form->{callback} = $form->unescape($form->{callback});
$form->{callback} ||= "login.pl?action=company_logo";
$form->header;
print qq|
......
<frame src="kopf.pl" name="kopf" scrolling="NO">
<frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" >
<frame src="$form->{script}?action=acc_menu" name="acc_menu" scrolling="auto" noresize marginwidth="0">
<frame src="login.pl?action=company_logo" name="main_window" scrolling="auto">
<frame src="$form->{callback}" name="main_window" scrolling="auto">
</frameset>
<noframes>
You need a browser that can read frames to see this page.
......
$label_icon = $label . ".gif";
$mlab = $label;
$label = $locale->text($label);
# multi line hack, sschoeling jul06
# if a label is too long, try to split it at whitespaces, then join it to chunks of less
# if a label is too long, try to split it at whitespaces, then join it to chunks of less
# than 20 chars and store it in an array.
# use this array later instead of the &nbsp;-ed label
@chunks = ();
......
map {
if (($l += length $_) < 20) {
$chunks[$i] .= " $_";
} else {
$l = length $_;
$chunks[++$i] = $_;
} else {
$l = length $_;
$chunks[++$i] = $_;
}
} split / /, $label;
map { s/ /&nbsp;/ } @chunks;
bin/mozilla/menuXML.pl
sub display {
$locale = Locale->new($language, "menu");
my $charset = $dbcharset || 'ISO-8859-1';
my $callback = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
my $text = $form->create_http_response('content_type' => 'text/xml',
'charset' => $charset)
......
<doc>
<name>$myconfig{name}</name>
<callback>$callback</callback>
<db>$myconfig{dbname}</db>
<favorites>|;
bin/mozilla/menujs.pl
# end of main
sub display {
$form->{callback} = $form->unescape($form->{callback});
$form->{callback} ||= "login.pl?action=company_logo";
$form->header;
......
&acc_menu;
print qq|
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="93%" name="main_window" style="position: absolute; border:0px;">
<iframe id="win1" src="$form->{callback}" width="100%" height="93%" name="main_window" style="position: absolute; border:0px;">
<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen.
</p>
</iframe>
......
<script type="text/javascript">
<!--
var isDOM = (document.getElementById ? true : false);
var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
//var KO = (navigator.appName=="Konqueror" \|\| navigator.appName=="Opera") ;
......
}
function getSty(id) {
return (isNS4 ? getRef(id) : getRef(id).style);
}
}
var popTimer = 0;
var litNow = new Array();
function popOver(menuNum, itemNum) {
......
|;
print qq|
|;
}
......
$menu->{$item}{$item} = !$form->{$item};
# Untermen
if ($mlz{"s$ml"} > 1) {
$z++;
$sm = 1;
} else {
$z = $sm;
$mlz{"s$ml"}++;
if ($mlz{"s$ml"} > 1) {
$z++;
$sm = 1;
} else {
$z = $sm;
$mlz{"s$ml"}++;
}
print
qq|menu[$mlz{$ml}][$z] = new Item('$label', '#', '', defLength, 0, |
bin/mozilla/menunew.pl
$form->{force_ul_width} = 1;
$form->{date} = clock_line();
$form->{menu_items} = acc_menu();
$form->{callback} = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
print $form->parse_html_template("menu/menunew");
}
bin/mozilla/menuv3.pl
sub display {
$form->header(qq|<link rel="stylesheet" href="css/menuv3.css?id=" type="text/css">|);
$form->{date} = clock_line();
$form->{menu} = acc_menu();
$form->{date} = clock_line();
$form->{menu} = acc_menu();
$form->{callback} = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
print $form->parse_html_template("menu/menuv3");
bin/mozilla/menuv4.pl
sub display {
$form->header(qq|<link rel="stylesheet" href="css/menuv4.css?id=" type="text/css">|);
$form->{date} = clock_line();
$form->{menu} = acc_menu();
$form->{date} = clock_line();
$form->{menu} = acc_menu();
$form->{callback} = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
print $form->parse_html_template("menu/menuv4");
templates/webpages/menu/menunew_de.html
-->
</script>
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.</p>
</iframe>
</body>
templates/webpages/menu/menunew_master.html
-->
</script>
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
</iframe>
</body>
templates/webpages/menu/menuv3_de.html
<div style="clear: both;"></div>
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen. Bitte w&auml;hlen Sie ein anderes Men&uuml; in der Benutzerkonfiguration im Administrationsmen&uuml; aus.</p>
</iframe>
</body>
templates/webpages/menu/menuv3_master.html
<div style="clear: both;"></div>
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
</iframe>
</body>
templates/webpages/menu/menuv4_master.html
<div style="clear: both;"></div>
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
<p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
</iframe>
</body>
xslt/xulmenu.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:html="http://www.w3.org/1999/xhtml"
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<xsl:output media-type="application/vnd.mozilla.xul+xml"/>
......
<!-- main document structure -->
<!-- ******************************************************************* -->
<xsl:template match="doc">
<xsl:processing-instruction
name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
<window>
<html:title>
LX-Office Version <xsl:value-of select='/doc/version'/>
- <xsl:value-of select='/doc/name'/>
<xsl:processing-instruction name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
<xsl:variable name="callback"><xsl:value-of select='/doc/callback'/></xsl:variable>
<xsl:variable name="title">
LX-Office Version <xsl:value-of select='/doc/version'/>
- <xsl:value-of select='/doc/name'/>
- <xsl:value-of select='/doc/db'/>
</html:title>
</xsl:variable>
<!-- <xsl:call-template name="style"/>-->
<window title="{$title}">
<html:title/>
<xsl:call-template name="script"/>
<toolbox>
<xsl:apply-templates select="menu"/>
......
<!--<iframe src="xslt/trans.xml" flex="1" id="uhr"/>-->
</vbox>
<splitter state="open" collapse="before" resizeafter="farthest"><grippy/></splitter>
<html:iframe id="main_window" src="login.pl?action=company_logo" flex="1" style="border:0px"/>
<html:iframe id="main_window" src="{$callback}" flex="1" style="border:0px"/>
</hbox>
</window>
</xsl:template>
......
<!-- *************************************************************************** -->
<!-- templates for the treeview
<!-- templates for the treeview
********************************************************************************** -->
<xsl:template match="menu" mode="tree">
<toolbar>
......
<!-- *************************************************************************** -->
<!-- scripts
<!-- scripts
******************************************************************************** -->
<xsl:template name="script">
<html:script type="text/ecmascript">
function openLink(event)
{
var path=event.target.getAttribute("link")
......
bf.setAttribute("src",path)
}
}
function openLinkNewTab(event)
{
if(event.button!=1) return
......
else
{
window.open(path,"_new","")
}
}
function openLinkNewWindow(event)
{
var path=event.target.getAttribute("link")
window.open(path,"_blank","")
}
function openTreeLink(event)
{
var tree=event.target
......
var item=tree.view.getItemAtIndex(selIndex)
var link=item.getAttribute("link")
if(link) document.getElementById("main_window").setAttribute("src",link)
}
}
function updateClock()
{
var d= new Date()
var sec=d.getSeconds()
var min=d.getMinutes()
var sec=d.getSeconds()
var min=d.getMinutes()
var std=(d.getHours() % 12 ) + min/60
document.getElementById("std").setAttribute("transform","rotate("+std*30+",20,20)")
document.getElementById("min").setAttribute("transform","rotate("+min*6+",20,20)")
document.getElementById("sec").setAttribute("transform","rotate("+sec*6+",20,20)")
}
function PrintW()
{
document.getElementById("main_window").contentWindow.print()
}
function doSearch(){
var t=document.getElementById("searchboxtext").value
document.getElementById("desc").value=t
document.getElementById("sb").click()
}
function checkEnter(event){
if(event.keyCode==13) doSearch()
......
<input name="partsgroup" size="20"/>
<input name="make" size="20"/>
<input class="submit" type="submit" name="action" value="Weiter" id="sb"/>
<div style="display:none" >
<input class="submit" type="submit" name="action" value="Top 100"/>
<input type="hidden" name="serialnumber" size="20"/>
<input type="hidden" name="ean" size="20"/>
<div style="display:none" >
<input class="submit" type="submit" name="action" value="Top 100"/>
<input type="hidden" name="serialnumber" size="20"/>
<input type="hidden" name="ean" size="20"/>
<input type="hidden" name="searchitems" value="part"/>
<input type="hidden" name="title" value="Waren"/>
<input type="hidden" name="revers" value="0"/>
......
<input name="onorder" class="checkbox" type="checkbox" value="1"/>
<input name="ordered" class="checkbox" type="checkbox" value="1"/>
<input name="rfq" class="checkbox" type="checkbox" value="1"/>Anfrage
<input name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten
<input name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten
<input type="hidden" name="transdatefrom" id="transdatefrom" size="11" title="dd.mm.yy"/>
<input type="button" name="transdatefrom" id="trigger1" value="?"/>
<input type="button" name="transdatefrom" id="trigger1" value="?"/>
<input name="transdateto" id="transdateto" size="11" title="dd.mm.yy"/>
<input type="button" name="transdateto" id="trigger2" value="?"/>
<input name="l_partnumber" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelnummer

Auch abrufbar als: Unified diff