From bbf383bf0e93e42769263af14bdb53737832728a Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 28 Dec 2012 13:25:46 +0100 Subject: [PATCH] =?utf8?q?JS-=20und=20CSS-Men=C3=BCs:=20Frame-Header=20ver?= =?utf8?q?einheitlicht?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Layout/Javascript.pm | 8 +++++++ SL/Layout/V3.pm | 8 +++++++ css/kivitendo/frame_header | 1 - css/kivitendo/frame_header/header.css | 33 +++++++++++++++++++++++++++ js/quicksearch_input.js | 23 +++++++++++++++++++ templates/webpages/menu/menunew.html | 27 ++++++++++------------ templates/webpages/menu/menuv3.html | 27 ++-------------------- 7 files changed, 86 insertions(+), 41 deletions(-) delete mode 120000 css/kivitendo/frame_header create mode 100644 css/kivitendo/frame_header/header.css create mode 100644 js/quicksearch_input.js 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 %] +