Code cleanup and bug fixes

addresses https://github.com/OpenBazaar/OpenBazaar/issues/282 https://github.com/OpenBazaar/OpenBazaar/issues/322 and a few similar issues
@devTristan @mariosal feel free to define our JS coding standard as
you see fit, fix existing issues, and implement enforcement in our
travis build. I feel our JS code could use some restructuring and
cleanup, so be be bold in your edits :)

On Mon, Sep 1, 2014 at 8:55 PM, Tristan Davies <notifications@github.com> wrote:
> In html/addContract.html:
>
>> @@ -5,9 +5,9 @@ <h3 class="modal-title">Add Contract</h3>
>>  <div class="modal-body"  style="text-align:left;">
>>
>>      <ul class="nav nav-pills">
>> -      <li class="active"><a href="#"
>> onclick="$(this).parent().addClass('active');$(this).parent().siblings().removeClass('active');$('#add-product-fixed').show();$('#add-product-fixed').siblings().hide();">Fixed
>> Price</a></li>
>> -      <!--<li><a href="#"
>> onclick="$(this).parent().addClass('active');$(this).parent().siblings().removeClass('active');$('#add-product-auction').show();$('#add-product-auction').siblings().hide();">Auction</a></li>-->
>> -      <li><a href="#"
>> onclick="$(this).parent().addClass('active');$(this).parent().siblings().removeClass('active');$('#add-product-import').show();$('#add-product-import').siblings().hide();">Import
>> Contract</a></li>
>> +      <li class="active"><a href="#"
>> onclick="$(this).parent().addClass('active');$(this).parent().siblings().removeClass('active');$('#add-product-fixed').show();$('#add-product-fixed').siblings().hide();return
>> false;">Fixed Price</a></li>
>
> I agree, but wanted to minimize changes until I know how to proceed re: #180
>
> —
> Reply to this email directly or view it on GitHub.