Revision bbf383bf
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/Layout/Javascript.pm | ||
---|---|---|
10 | 10 |
[ SL::Layout::None->new ] |
11 | 11 |
} |
12 | 12 |
|
13 |
sub use_javascript { |
|
14 |
my $self = shift; |
|
15 |
qw( |
|
16 |
js/quicksearch_input.js |
|
17 |
), |
|
18 |
$self->SUPER::use_javascript(@_); |
|
19 |
} |
|
20 |
|
|
13 | 21 |
sub pre_content { |
14 | 22 |
&display |
15 | 23 |
} |
SL/Layout/V3.pm | ||
---|---|---|
18 | 18 |
$self->SUPER::use_stylesheet(@_); |
19 | 19 |
} |
20 | 20 |
|
21 |
sub use_javascript { |
|
22 |
my $self = shift; |
|
23 |
qw( |
|
24 |
js/quicksearch_input.js |
|
25 |
), |
|
26 |
$self->SUPER::use_javascript(@_); |
|
27 |
} |
|
28 |
|
|
21 | 29 |
sub pre_content { |
22 | 30 |
&render; |
23 | 31 |
} |
css/kivitendo/frame_header | ||
---|---|---|
1 |
../lx-office-erp/frame_header/ |
css/kivitendo/frame_header/header.css | ||
---|---|---|
1 |
#frame-header .frame-header-element a:link, |
|
2 |
#frame-header .frame-header-element a:visited, |
|
3 |
#frame-header .frame-header-element a:hover, |
|
4 |
#frame-header .frame-header-element a:active { |
|
5 |
text-decoration: underline; |
|
6 |
} |
|
7 |
|
|
8 |
#frame-header { |
|
9 |
text-align: center; |
|
10 |
margin: 0; |
|
11 |
padding: 0; |
|
12 |
border: 0; |
|
13 |
overflow: hidden; |
|
14 |
width: 100%; |
|
15 |
border-spacing: 0; |
|
16 |
font-size: 12px; |
|
17 |
} |
|
18 |
|
|
19 |
#frame-header .frame-header-left { |
|
20 |
float: left; |
|
21 |
} |
|
22 |
#frame-header .frame-header-right { |
|
23 |
float: right; |
|
24 |
} |
|
25 |
|
|
26 |
#frame-header .frame-header-left, |
|
27 |
#frame-header .frame-header-center, |
|
28 |
#frame-header .frame-header-right { |
|
29 |
border-spacing: 0; |
|
30 |
padding: 0; |
|
31 |
font-family: verdana,arial,sans-serif; |
|
32 |
vertical-align: middle; |
|
33 |
} |
js/quicksearch_input.js | ||
---|---|---|
1 |
function on_keydown_quicksearch(element, event) { |
|
2 |
var key; |
|
3 |
|
|
4 |
if (window.event) |
|
5 |
key = window.event.keyCode; // IE |
|
6 |
else |
|
7 |
key = event.which; // Firefox |
|
8 |
|
|
9 |
if (key != 13) |
|
10 |
return true; |
|
11 |
|
|
12 |
var search_term = $(element); |
|
13 |
var value = search_term.val(); |
|
14 |
if (!value) |
|
15 |
return true; |
|
16 |
|
|
17 |
var url = "ct.pl?action=list_contacts&INPUT_ENCODING=utf-8&filter.status=active&search_term=" + encodeURIComponent(value); |
|
18 |
|
|
19 |
search_term.val(''); |
|
20 |
window.location.href = url; |
|
21 |
|
|
22 |
return false; |
|
23 |
} |
templates/webpages/menu/menunew.html | ||
---|---|---|
15 | 15 |
|
16 | 16 |
<script type="text/javascript" src="js/dhtmlsuite/menu-for-applications.js"></script> |
17 | 17 |
|
18 |
<table id='js-header' class="menunew"> |
|
19 |
<tr> |
|
20 |
<td> |
|
21 |
|
|
22 |
[<a href="login.pl?action=company_logo" target="_blank">[% 'new Window' | $T8 %]</a>] |
|
23 |
|
|
24 |
[<a href="JavaScript:top.print()">[% 'print' | $T8 %]</a>] |
|
25 |
</td> |
|
26 |
<td align="right" nowrap> |
|
27 |
[[% 'User' | $T8 %]: [% HTML.escape(MYCONFIG.login) %] - |
|
28 |
<a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>] |
|
29 |
[% date %] <span id='clock_id' style='position:relative'></span> |
|
30 |
</td> |
|
31 |
</tr> |
|
32 |
</table> |
|
18 |
<div id="frame-header"> |
|
19 |
<span class="frame-header-element frame-header-left"> |
|
20 |
[<a href="login.pl?action=company_logo" target="_blank">[% 'new Window' | $T8 %]</a>] |
|
21 |
[<a href="JavaScript:top.print()">[% 'print' | $T8 %]</a>] |
|
22 |
[[% 'Search contacts' | $T8 %] <input size="15" name="search_term" id="search_term" onkeydown="return on_keydown_quicksearch($('#search_term'), event)">] |
|
23 |
</span> |
|
24 |
<span class="frame-header-element frame-header-right"> |
|
25 |
[[% 'User' | $T8 %]: [% MYCONFIG.login | html %] - |
|
26 |
<a href="controller.pl?action=LoginScreen/logout" target="_top">[% 'logout' | $T8 %]</a>] |
|
27 |
[% date %] <span id='clock_id' style='position:relative'></span> |
|
28 |
</span> |
|
29 |
</div> |
|
33 | 30 |
|
34 | 31 |
<div id="main_menu_div"></div> |
35 | 32 |
|
templates/webpages/menu/menuv3.html | ||
---|---|---|
1 | 1 |
[%- USE T8 %] |
2 | 2 |
[% USE HTML %] |
3 |
<script type="text/javascript" src="js/quicksearch_input.js"></script> |
|
3 | 4 |
<script type="text/javascript"> |
4 | 5 |
<!-- |
5 |
function on_keydown_quicksearch(e) { |
|
6 |
var key; |
|
7 |
|
|
8 |
if (window.event) |
|
9 |
key = window.event.keyCode; // IE |
|
10 |
else |
|
11 |
key = e.which; // Firefox |
|
12 |
|
|
13 |
if (key != 13) |
|
14 |
return true; |
|
15 |
|
|
16 |
var search_term = $("#search_term"); |
|
17 |
var value = search_term.val(); |
|
18 |
if (!value) |
|
19 |
return true; |
|
20 |
|
|
21 |
var url = "ct.pl?action=list_contacts&INPUT_ENCODING=utf-8&filter.status=active&search_term=" + encodeURIComponent(value); |
|
22 |
|
|
23 |
search_term.val(''); |
|
24 |
window.location.href = url; |
|
25 |
|
|
26 |
return false; |
|
27 |
} |
|
28 |
|
|
29 | 6 |
function clockon() { |
30 | 7 |
var now = new Date(); |
31 | 8 |
var h = now.getHours(); |
... | ... | |
41 | 18 |
<span class="frame-header-element frame-header-left"> |
42 | 19 |
[<a href="login.pl?action=company_logo" target="_blank">[% 'new Window' | $T8 %]</a>] |
43 | 20 |
[<a href="JavaScript:top.print()">[% 'print' | $T8 %]</a>] |
44 |
[[% 'Search contacts' | $T8 %] <input size="15" name="search_term" id="search_term" onkeydown="return on_keydown_quicksearch(event)">] |
|
21 |
[[% 'Search contacts' | $T8 %] <input size="15" name="search_term" id="search_term" onkeydown="return on_keydown_quicksearch($('#search_term'), event)">]
|
|
45 | 22 |
</span> |
46 | 23 |
<span class="frame-header-element frame-header-right"> |
47 | 24 |
[[% 'User' | $T8 %]: [% MYCONFIG.login | html %] - |
Auch abrufbar als: Unified diff
JS- und CSS-Menüs: Frame-Header vereinheitlicht