Skip to content

Commit

Permalink
Welp. Looks like that's it.
Browse files Browse the repository at this point in the history
  • Loading branch information
skytreader committed Mar 11, 2016
1 parent 95d6806 commit 35ffdda
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions librarian/static/scripts/add-books/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function renderSpine(){
var isbn = $(allInputs).filter("#isbn-proxy");
spine.id = isbn.val();
var title = $(allInputs).filter("#title-proxy");
var authors = $(allInputs).filter("#authors-proxy");

var isbnText = document.createElement("h3");
isbnText.innerHTML = isbn.val();
Expand Down Expand Up @@ -110,12 +109,13 @@ function listNames(nameList){
Get all the names entered for the given creator.
This relies _a lot_ on the guaranteed return order of jQuery selectors. At least,
it must be uuaranteed that the order of lastnames and firstnames returned is the
it must be guaranteed that the order of lastnames and firstnames returned is the
same.
Returns a list of Person objects.
*/
function getCreatorNames(creator){
console.info("looking for", creator);
var creatorsLastname = $("[name='" + creator + "-proxy-lastname']");
var creatorsFirstname = $("[name='" + creator + "-proxy-firstname']");
var persons = [];
Expand Down Expand Up @@ -183,11 +183,13 @@ TODO Test me
function renderContentCreatorListing(creatorType){
var hiddenLastnameProxy = document.createElement("input");
hiddenLastnameProxy.type = "hidden";
hiddenLastnameProxy.name = creatorType + "-lastname-proxy";
hiddenLastnameProxy.name = creatorType + "-proxy-lastname";
console.info("created hidden field with name", hiddenLastnameProxy.name);

var hiddenFirstnameProxy = document.createElement("input");
hiddenFirstnameProxy.type = "hidden";
hiddenFirstnameProxy.name = creatorType + "-lastname-proxy";
hiddenFirstnameProxy.name = creatorType + "-proxy-firstname";
console.info("created hidden field with name", hiddenFirstnameProxy.name);

var divRow = document.createElement("div");
$(divRow).addClass("row");
Expand Down Expand Up @@ -219,6 +221,8 @@ function renderContentCreatorListing(creatorType){

var listing = document.createElement("li");
listing.appendChild(divRow);
listing.appendChild(hiddenLastnameProxy);
listing.appendChild(hiddenFirstnameProxy);

return listing;
}
Expand Down

0 comments on commit 35ffdda

Please sign in to comment.