From: Moritz Bunkus Date: Fri, 28 Dec 2012 12:25:46 +0000 (+0100) Subject: JS- und CSS-Menüs: Frame-Header vereinheitlicht X-Git-Tag: release-3.1.0beta1~768 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=bbf383bf0e93e42769263af14bdb53737832728a;p=kivitendo-erp.git JS- und CSS-Menüs: Frame-Header vereinheitlicht --- diff --git a/SL/Layout/Javascript.pm b/SL/Layout/Javascript.pm index 8d616093b..f3a2f0f06 100644 --- a/SL/Layout/Javascript.pm +++ b/SL/Layout/Javascript.pm @@ -10,6 +10,14 @@ sub init_sub_layouts { [ SL::Layout::None->new ] } +sub use_javascript { + my $self = shift; + qw( + js/quicksearch_input.js + ), + $self->SUPER::use_javascript(@_); +} + sub pre_content { &display } diff --git a/SL/Layout/V3.pm b/SL/Layout/V3.pm index ab50ef1ae..cc281673b 100644 --- a/SL/Layout/V3.pm +++ b/SL/Layout/V3.pm @@ -18,6 +18,14 @@ sub use_stylesheet { $self->SUPER::use_stylesheet(@_); } +sub use_javascript { + my $self = shift; + qw( + js/quicksearch_input.js + ), + $self->SUPER::use_javascript(@_); +} + sub pre_content { &render; } diff --git a/css/kivitendo/frame_header b/css/kivitendo/frame_header deleted file mode 120000 index d69ab7feb..000000000 --- a/css/kivitendo/frame_header +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/frame_header/ \ No newline at end of file diff --git a/css/kivitendo/frame_header/header.css b/css/kivitendo/frame_header/header.css new file mode 100644 index 000000000..376cb1e10 --- /dev/null +++ b/css/kivitendo/frame_header/header.css @@ -0,0 +1,33 @@ +#frame-header .frame-header-element a:link, +#frame-header .frame-header-element a:visited, +#frame-header .frame-header-element a:hover, +#frame-header .frame-header-element a:active { + text-decoration: underline; +} + +#frame-header { + text-align: center; + margin: 0; + padding: 0; + border: 0; + overflow: hidden; + width: 100%; + border-spacing: 0; + font-size: 12px; +} + +#frame-header .frame-header-left { + float: left; +} +#frame-header .frame-header-right { + float: right; +} + +#frame-header .frame-header-left, +#frame-header .frame-header-center, +#frame-header .frame-header-right { + border-spacing: 0; + padding: 0; + font-family: verdana,arial,sans-serif; + vertical-align: middle; +} diff --git a/js/quicksearch_input.js b/js/quicksearch_input.js new file mode 100644 index 000000000..055b5f31a --- /dev/null +++ b/js/quicksearch_input.js @@ -0,0 +1,23 @@ +function on_keydown_quicksearch(element, event) { + var key; + + if (window.event) + key = window.event.keyCode; // IE + else + key = event.which; // Firefox + + if (key != 13) + return true; + + var search_term = $(element); + var value = search_term.val(); + if (!value) + return true; + + var url = "ct.pl?action=list_contacts&INPUT_ENCODING=utf-8&filter.status=active&search_term=" + encodeURIComponent(value); + + search_term.val(''); + window.location.href = url; + + return false; +} diff --git a/templates/webpages/menu/menunew.html b/templates/webpages/menu/menunew.html index e92a83dfb..b94024678 100644 --- a/templates/webpages/menu/menunew.html +++ b/templates/webpages/menu/menunew.html @@ -15,21 +15,18 @@ $(clockon); - - - - - - +
+ + [[% 'new Window' | $T8 %]] + [[% 'print' | $T8 %]] + [[% 'Search contacts' | $T8 %] ] + + + [[% 'User' | $T8 %]: [% MYCONFIG.login | html %] - + [% 'logout' | $T8 %]] + [% date %]   + +
diff --git a/templates/webpages/menu/menuv3.html b/templates/webpages/menu/menuv3.html index 537ec9caf..3798bdc01 100644 --- a/templates/webpages/menu/menuv3.html +++ b/templates/webpages/menu/menuv3.html @@ -1,31 +1,8 @@ [%- USE T8 %] [% USE HTML %] +