diff --git a/src/interface/static/js/pyshelf_ux.js b/src/interface/static/js/pyshelf_ux.js index 5c3aa47..26f4646 100755 --- a/src/interface/static/js/pyshelf_ux.js +++ b/src/interface/static/js/pyshelf_ux.js @@ -16,6 +16,9 @@ $(document).ready(function(){ var nav_width = $('.nav_l').width(); // Get the width of our nav items var cmp_height = window.screen.availHeight; var max_height = win_height - (hdr_height + ftr_height) - (scr_height - win_height); // Set our available height + var u_string = "Username"; + var p_string = "Password"; + var s_string = "search by Title, Author, Tags, or Collections" customlog([cmp_height]); $(".search_submit").click(function(){ var query = $('.nav_search').val(); @@ -54,4 +57,18 @@ $(document).ready(function(){ $('#btn_collections').on('click', function (e){ $('.hidden.vert-nav.collections').toggle() }); -}) + $('.input_box').on('click', function(){ + $(this).attr("value",""); + }); + $('.input_box').focusout(function(){ + if ($(this).hasClass('nav_search') && $(this).val() == "") { + $(this).attr("value", s_string); + } + if ($(this).attr("id") == "username" && $(this).val() == "") { + $(this).attr("value", u_string); + } + if ($(this).attr("id") == "password" && $(this).val() == "") { + $(this).attr("value", p_string); + } + }); +}); diff --git a/src/interface/views.py b/src/interface/views.py index fe4b300..e743f66 100755 --- a/src/interface/views.py +++ b/src/interface/views.py @@ -9,7 +9,6 @@ from django.http import JsonResponse from django.shortcuts import HttpResponse, render # render_to_response from django.utils.text import slugify import json -import jsonpickle from .models import Books, Collections, Navigation