diff --git a/Netdisco/lib/Netdisco.pm b/Netdisco/lib/Netdisco.pm index df775a0b..a45a9c35 100644 --- a/Netdisco/lib/Netdisco.pm +++ b/Netdisco/lib/Netdisco.pm @@ -18,7 +18,8 @@ get '/' => sub { }; ajax '/ajax/content/search/:thing' => sub { - return '
Hello World.
'; + content_type('text/html'); + return 'Hello '. param('thing') .'.
'; }; get '/search' => sub { diff --git a/Netdisco/public/css/style.css b/Netdisco/public/css/style.css index 3375c1b7..53032bce 100644 --- a/Netdisco/public/css/style.css +++ b/Netdisco/public/css/style.css @@ -23,3 +23,11 @@ padding-left: 35px; cursor: default; } + +.nd_bookmark { + vertical-align: top; +} + +.nd_search { + margin-top: 15px; +} diff --git a/Netdisco/public/images/glyphicons_072_bookmark.png b/Netdisco/public/images/glyphicons_072_bookmark.png new file mode 100755 index 00000000..35bee51e Binary files /dev/null and b/Netdisco/public/images/glyphicons_072_bookmark.png differ diff --git a/Netdisco/views/inc/js/search.js b/Netdisco/views/inc/js/search.js index 03e519fd..928f53ca 100644 --- a/Netdisco/views/inc/js/search.js +++ b/Netdisco/views/inc/js/search.js @@ -4,6 +4,7 @@ function do_search (event, tab) { var form = '#' + tab + '_form'; var target = '#' + tab + '_pane'; + var mark = '#' + tab + '_bookmark'; // stop form from submitting normally event.preventDefault(); @@ -32,6 +33,8 @@ ); return; } + // looks good, update the bookmark for this search + $(mark).attr('href', '/search?' + query); } ); } diff --git a/Netdisco/views/inc/search/box.tt b/Netdisco/views/inc/search/box.tt new file mode 100644 index 00000000..7fb9adc4 --- /dev/null +++ b/Netdisco/views/inc/search/box.tt @@ -0,0 +1,3 @@ +