js/script.js
// make the HTML to display book information for the viewDiv

make the HTML to display book information for the viewDiv
make the HTML to display book information for the viewDiv
function makeTheHTMLforOneBook ( oneBook ) {
   var htmlText = '';
   for ( var propertyName in oneBook ) {
      if ( propertyName === titleProperty ) {
	 htmlText += '<h5>' + oneBook[propertyName] + '</h5>';
	 if ( searchMode ) {
	    htmlText += buttonGroupBeginHTML + copyButtonHTML + editButtonHTML + deleteButtonHTML + buttonGroupEndHTML;
	 }
	 htmlText += '<ul>';
      } else if ( propertyName !== bookNumberProperty && oneBook[propertyName] !== false && oneBook[propertyName] !== '' ) {
	 htmlText += '<li>';
	 if ( oneBook[propertyName] === true ) {
	    htmlText += propertyName.charAt(0).toUpperCase() + propertyName.substr(1).replace(/([^A-Z]*)([A-Z].*)/, '$1 $2');
	 } else {
	    htmlText += oneBook[propertyName].charAt(0).toUpperCase() + oneBook[propertyName].substr(1).replace(/([^A-Z]*)([A-Z].*)/, '$1 $2');
	 }
	 htmlText +='</li>';
      }
   }
   htmlText += '</ul>';
   return htmlText;
}
function makeTheHTMLforOneBook ( oneBook ) { var htmlText = '' ; for ( var propertyName in oneBook ) { if ( propertyName === titleProperty ) { htmlText += '<h5>' + oneBook [ propertyName ] + '</h5>' ; if ( searchMode ) { htmlText += buttonGroupBeginHTML + copyButtonHTML + editButtonHTML + deleteButtonHTML + buttonGroupEndHTML ; } htmlText += '<ul>' ; } else if ( propertyName !== bookNumberProperty && oneBook [ propertyName ] !== false && oneBook [ propertyName ] !== '' ) { htmlText += '<li>' ; if ( oneBook [ propertyName ] === true ) { htmlText += propertyName . charAt ( 0 ) . toUpperCase ( ) + propertyName . substr ( 1 ) . replace ( / ([^A-Z]*)([A-Z].*) / , '$1 $2' ) ; } else { htmlText += oneBook [ propertyName ] . charAt ( 0 ) . toUpperCase ( ) + oneBook [ propertyName ] . substr ( 1 ) . replace ( / ([^A-Z]*)([A-Z].*) / , '$1 $2' ) ; } htmlText += '</li>' ; } } htmlText += '</ul>' ; return htmlText ; }
make the HTML to display book information for the viewDiv
make the HTML to display book information for the viewDiv