Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 40255f36

Von Sven Schöling vor etwa 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
144 144
  my $menu_script = $style_to_script_map{$user->{menustyle}} || '';
145 145

  
146 146
  # made it this far, execute the menu
147
  $form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display');
147
  $form->{callback} = build_std_url("script=menu${menu_script}.pl", 'action=display', "callback=" . $form->escape($form->{callback}));
148 148

  
149 149
  $auth->set_cookie_environment_variable();
150 150

  
bin/mozilla/menu.pl
48 48
sub display {
49 49
  $lxdebug->enter_sub();
50 50

  
51
  $form->{callback}   = $form->unescape($form->{callback});
52
  $form->{callback} ||= "login.pl?action=company_logo";
53

  
51 54
  $form->header;
52 55

  
53 56
  print qq|
......
55 58
  <frame  src="kopf.pl" name="kopf"  scrolling="NO">
56 59
  <frameset cols="$framesize,*" framespacing="0" frameborder="0" border="0" >
57 60
    <frame src="$form->{script}?action=acc_menu" name="acc_menu"  scrolling="auto" noresize marginwidth="0">
58
    <frame src="login.pl?action=company_logo" name="main_window" scrolling="auto">
61
    <frame src="$form->{callback}" name="main_window" scrolling="auto">
59 62
  </frameset>
60 63
  <noframes>
61 64
  You need a browser that can read frames to see this page.
......
115 118
    $label_icon = $label . ".gif";
116 119
    $mlab       = $label;
117 120
    $label      = $locale->text($label);
118
 
121

  
119 122
    # multi line hack, sschoeling jul06
120
    # if a label is too long, try to split it at whitespaces, then join it to chunks of less 
123
    # if a label is too long, try to split it at whitespaces, then join it to chunks of less
121 124
    # than 20 chars and store it in an array.
122 125
    # use this array later instead of the &nbsp;-ed label
123 126
    @chunks = ();
......
125 128
    map {
126 129
      if (($l += length $_) < 20) {
127 130
        $chunks[$i] .= " $_";
128
      } else { 
129
        $l = length $_; 
130
        $chunks[++$i] = $_; 
131
      } else {
132
        $l = length $_;
133
        $chunks[++$i] = $_;
134

  
131 135
      }
132 136
    } split / /, $label;
133 137
    map { s/ /&nbsp;/ } @chunks;
bin/mozilla/menuXML.pl
48 48
sub display {
49 49
  $locale     = Locale->new($language, "menu");
50 50
  my $charset = $dbcharset || 'ISO-8859-1';
51
  my $callback = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
51 52

  
52 53
  my $text    = $form->create_http_response('content_type' => 'text/xml',
53 54
                                            'charset'      => $charset)
......
62 63

  
63 64
<doc>
64 65
<name>$myconfig{name}</name>
65

  
66
<callback>$callback</callback>
66 67
<db>$myconfig{dbname}</db>
67 68

  
68 69
<favorites>|;
bin/mozilla/menujs.pl
44 44
# end of main
45 45

  
46 46
sub display {
47
  $form->{callback}   = $form->unescape($form->{callback});
48
  $form->{callback} ||= "login.pl?action=company_logo";
47 49

  
48 50
  $form->header;
49 51

  
......
52 54
  &acc_menu;
53 55

  
54 56
  print qq|
55
<iframe id="win1" src="login.pl?action=company_logo" width="100%" height="93%" name="main_window" style="position: absolute; border:0px;">
57
<iframe id="win1" src="$form->{callback}" width="100%" height="93%" name="main_window" style="position: absolute; border:0px;">
56 58
<p>Ihr Browser kann leider keine eingebetteten Frames anzeigen.
57 59
</p>
58 60
</iframe>
......
160 162

  
161 163
<script type="text/javascript">
162 164
<!--
163
var isDOM = (document.getElementById ? true : false); 
165
var isDOM = (document.getElementById ? true : false);
164 166
var isIE4 = ((document.all && !isDOM) ? true : false);
165 167
var isNS4 = (document.layers ? true : false);
166 168
//var KO = (navigator.appName=="Konqueror" \|\| navigator.appName=="Opera") ;
......
172 174
}
173 175
function getSty(id) {
174 176
	return (isNS4 ? getRef(id) : getRef(id).style);
175
} 
177
}
176 178
var popTimer = 0;
177 179
var litNow = new Array();
178 180
function popOver(menuNum, itemNum) {
......
351 353
|;
352 354

  
353 355
  print qq|
354
  
356

  
355 357
|;
356 358

  
357 359
}
......
379 381
      $menu->{$item}{$item} = !$form->{$item};
380 382

  
381 383
      # Untermen
382
      if ($mlz{"s$ml"} > 1) { 
383
		$z++; 
384
		$sm = 1; 
385
      } else { 
386
		$z = $sm; 
387
		$mlz{"s$ml"}++; 
384
      if ($mlz{"s$ml"} > 1) {
385
		$z++;
386
		$sm = 1;
387
      } else {
388
		$z = $sm;
389
		$mlz{"s$ml"}++;
388 390
      }
389 391
      print
390 392
        qq|menu[$mlz{$ml}][$z] = new Item('$label', '#', '', defLength, 0, |
bin/mozilla/menunew.pl
49 49
  $form->{force_ul_width} = 1;
50 50
  $form->{date}           = clock_line();
51 51
  $form->{menu_items}     = acc_menu();
52
  $form->{callback}       = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
52 53

  
53 54
  print $form->parse_html_template("menu/menunew");
54 55
}
bin/mozilla/menuv3.pl
42 42
sub display {
43 43
  $form->header(qq|<link rel="stylesheet" href="css/menuv3.css?id=" type="text/css">|);
44 44

  
45
  $form->{date} = clock_line();
46
  $form->{menu} = acc_menu();
45
  $form->{date}     = clock_line();
46
  $form->{menu}     = acc_menu();
47
  $form->{callback} = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
47 48

  
48 49
  print $form->parse_html_template("menu/menuv3");
49 50

  
bin/mozilla/menuv4.pl
42 42
sub display {
43 43
  $form->header(qq|<link rel="stylesheet" href="css/menuv4.css?id=" type="text/css">|);
44 44

  
45
  $form->{date} = clock_line();
46
  $form->{menu} = acc_menu();
45
  $form->{date}     = clock_line();
46
  $form->{menu}     = acc_menu();
47
  $form->{callback} = $form->unescape($form->{callback}) || "login.pl?action=company_logo";
47 48

  
48 49
  print $form->parse_html_template("menu/menuv4");
49 50

  
templates/webpages/menu/menunew_de.html
95 95
    -->
96 96
 </script>
97 97

  
98
 <iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
98
 <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
99 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>
100 100
 </iframe>
101 101
</body>
templates/webpages/menu/menunew_master.html
95 95
    -->
96 96
 </script>
97 97

  
98
 <iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
98
 <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
99 99
  <p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
100 100
 </iframe>
101 101
</body>
templates/webpages/menu/menuv3_de.html
38 38

  
39 39
 <div style="clear: both;"></div>
40 40

  
41
 <iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
41
 <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
42 42
  <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>
43 43
 </iframe>
44 44
</body>
templates/webpages/menu/menuv3_master.html
38 38

  
39 39
 <div style="clear: both;"></div>
40 40

  
41
 <iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
41
 <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
42 42
  <p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
43 43
 </iframe>
44 44
</body>
templates/webpages/menu/menuv4_master.html
38 38

  
39 39
 <div style="clear: both;"></div>
40 40

  
41
 <iframe id="win1" src="login.pl?action=company_logo" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
41
 <iframe id="win1" src="[% callback %]" width="100%" height="94%" name="main_window" style="position: absolute; border: 0px; z-index: 99; ">
42 42
  <p><translate>MSG_BROWSER_DOES_NOT_SUPPORT_IFRAMES</translate></p>
43 43
 </iframe>
44 44
</body>
xslt/xulmenu.xsl
1
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
2
    xmlns:html="http://www.w3.org/1999/xhtml" 
1
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2
    xmlns:html="http://www.w3.org/1999/xhtml"
3 3
    xmlns:svg="http://www.w3.org/2000/svg"
4 4
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
5 5
<xsl:output media-type="application/vnd.mozilla.xul+xml"/>
......
30 30
<!-- main document structure -->
31 31
<!-- ******************************************************************* -->
32 32
<xsl:template match="doc">
33
<xsl:processing-instruction
34
name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
35
  <window>
36
    <html:title>
37
      LX-Office Version <xsl:value-of select='/doc/version'/> 
38
      - <xsl:value-of select='/doc/name'/> 
33
<xsl:processing-instruction name="xml-stylesheet">href="xslt/style1.css" type="text/css"</xsl:processing-instruction>
34
  <xsl:variable name="callback"><xsl:value-of select='/doc/callback'/></xsl:variable>
35
  <xsl:variable name="title">
36
      LX-Office Version <xsl:value-of select='/doc/version'/>
37
      - <xsl:value-of select='/doc/name'/>
39 38
      - <xsl:value-of select='/doc/db'/>
40
    </html:title>
39
    </xsl:variable>
41 40
   <!-- <xsl:call-template name="style"/>-->
41
  <window title="{$title}">
42
  <html:title/>
42 43
    <xsl:call-template name="script"/>
43 44
    <toolbox>
44 45
      <xsl:apply-templates select="menu"/>
......
53 54
        <!--<iframe src="xslt/trans.xml" flex="1" id="uhr"/>-->
54 55
      </vbox>
55 56
      <splitter state="open" collapse="before" resizeafter="farthest"><grippy/></splitter>
56
          <html:iframe id="main_window" src="login.pl?action=company_logo" flex="1" style="border:0px"/>
57
          <html:iframe id="main_window" src="{$callback}" flex="1" style="border:0px"/>
57 58
    </hbox>
58 59
  </window>
59 60
</xsl:template>
......
117 118
<!-- ***************************************************************************  -->
118 119

  
119 120

  
120
<!-- templates for the treeview 
121
<!-- templates for the treeview
121 122
**********************************************************************************   -->
122 123
<xsl:template match="menu" mode="tree">
123 124
<toolbar>
......
165 166
<!-- ***************************************************************************  -->
166 167

  
167 168

  
168
<!-- scripts 
169
<!-- scripts
169 170
********************************************************************************  -->
170 171
<xsl:template name="script">
171 172
  <html:script type="text/ecmascript">
172
  
173

  
173 174
  function openLink(event)
174 175
    {
175 176
    var path=event.target.getAttribute("link")
......
183 184
        bf.setAttribute("src",path)
184 185
      }
185 186
    }
186
    
187

  
187 188
  function openLinkNewTab(event)
188 189
    {
189 190
    if(event.button!=1) return
......
195 196
      else
196 197
      {
197 198
window.open(path,"_new","")
198
 
199

  
199 200
      }
200 201
    }
201
    
202
    
202

  
203

  
203 204
  function openLinkNewWindow(event)
204 205
    {
205 206
      var path=event.target.getAttribute("link")
206 207
      window.open(path,"_blank","")
207 208
    }
208
  
209

  
209 210
  function openTreeLink(event)
210 211
    {
211 212
      var tree=event.target
......
213 214
      var item=tree.view.getItemAtIndex(selIndex)
214 215
      var link=item.getAttribute("link")
215 216
      if(link) document.getElementById("main_window").setAttribute("src",link)
216
    }  
217
  
217
    }
218

  
218 219
  function updateClock()
219 220
    {
220 221
      var d= new Date()
221
      var sec=d.getSeconds() 
222
      var min=d.getMinutes() 
222
      var sec=d.getSeconds()
223
      var min=d.getMinutes()
223 224
      var std=(d.getHours() % 12 ) + min/60
224 225
      document.getElementById("std").setAttribute("transform","rotate("+std*30+",20,20)")
225 226
      document.getElementById("min").setAttribute("transform","rotate("+min*6+",20,20)")
226 227
      document.getElementById("sec").setAttribute("transform","rotate("+sec*6+",20,20)")
227 228
    }
228
  
229

  
229 230
  function PrintW()
230 231
    {
231 232
      document.getElementById("main_window").contentWindow.print()
232 233
    }
233
  
234

  
234 235
  function doSearch(){
235 236
  var t=document.getElementById("searchboxtext").value
236 237
  document.getElementById("desc").value=t
237 238
  document.getElementById("sb").click()
238
  
239

  
239 240
  }
240 241
  function checkEnter(event){
241 242
  if(event.keyCode==13) doSearch()
......
291 292
  <input name="partsgroup" size="20"/>
292 293
  <input name="make" size="20"/>
293 294
  <input class="submit" type="submit" name="action" value="Weiter" id="sb"/>
294
  <div style="display:none" >    
295
  <input class="submit" type="submit" name="action" value="Top 100"/> 
296
    <input type="hidden" name="serialnumber" size="20"/>  
297
    <input type="hidden" name="ean" size="20"/>     
295
  <div style="display:none" >
296
  <input class="submit" type="submit" name="action" value="Top 100"/>
297
    <input type="hidden" name="serialnumber" size="20"/>
298
    <input type="hidden" name="ean" size="20"/>
298 299
    <input type="hidden" name="searchitems" value="part"/>
299 300
    <input type="hidden" name="title" value="Waren"/>
300 301
    <input type="hidden" name="revers" value="0"/>
......
312 313
    <input  name="onorder" class="checkbox" type="checkbox" value="1"/>
313 314
    <input  name="ordered" class="checkbox" type="checkbox" value="1"/>
314 315
    <input  name="rfq" class="checkbox" type="checkbox" value="1"/>Anfrage
315
    <input  name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten  
316
    <input  name="quoted" class="checkbox" type="checkbox" value="1"/>Angeboten
316 317
    <input type="hidden" name="transdatefrom" id="transdatefrom" size="11" title="dd.mm.yy"/>
317
    <input  type="button" name="transdatefrom" id="trigger1" value="?"/> 
318
    <input  type="button" name="transdatefrom" id="trigger1" value="?"/>
318 319
    <input name="transdateto" id="transdateto" size="11" title="dd.mm.yy"/>
319 320
    <input type="button" name="transdateto" id="trigger2" value="?"/>
320 321
    <input name="l_partnumber" class="checkbox" type="checkbox" value="Y" checked="true"/>Artikelnummer

Auch abrufbar als: Unified diff