Skip to content
Permalink
Browse files

fixing availability btn style names in availability.js (#1882)

* fixing availability btn style names in availability.js
* Fixing the /edit page UI
  • Loading branch information...
mekarpeles committed Feb 15, 2019
1 parent 7e79a93 commit 20098819aa72cb2290a1ed9f0d1546ba0c412a94
@@ -220,15 +220,15 @@ $(function(){
link = ' href="/books/' + work.openlibrary_edition + '/x/borrow" ';

if (work.status === 'open') {
cls = 'cta-btn--available cta-btn';
cls = 'cta-btn--available';
msg = 'Read';
} else if (work.status === 'borrow_available') {
cls = 'cta-btn--available cta-btn';
cls = 'cta-btn--available';
msg = 'Borrow';
} else if (work.status === 'borrow_unavailable') {
tag = 'span';
link = '';
cls = 'cta-btn cta-btn--unavailable';
cls = 'cta-btn--unavailable';
msg = '<form method="POST" action="/books/' + work.openlibrary_edition + '/x/borrow?action=join-waitinglist" class="join-waitlist waitinglist-form"><input type="hidden" name="action" value="join-waitinglist">';
if (work.num_waitlist !== '0') {
msg += 'Join Waitlist <span class="cta-btn__badge">' + work.num_waitlist + '</span></form>';
@@ -615,6 +615,10 @@
<fieldset class="minor">
<legend>$_("Dimensions")</legend>
$ dimensions = book.get_physical_dimensions() or storage(height="", width="", depth="", units="inches")
<span class="tip">
$:radiobuttons("edition--physical_dimensions--units", ["centimeters", "inches"], dimensions.units)
</span>

<div class="formElement">
<div class="input">
<table cellpadding="1">
@@ -626,11 +630,7 @@
</tr>
<tr>
<td><span class="tip"><label for="dimensions-width">$_("Width:")</label> </span></td>
<td><input name="edition--physical_dimensions--width" type="number" id="dimensions-width" size="6" value="$dimensions.width"/>
<span class="tip">
$:radiobuttons("edition--physical_dimensions--units", ["centimeters", "inches"], dimensions.units)
</span>
</td>
<td><input name="edition--physical_dimensions--width" type="number" id="dimensions-width" size="6" value="$dimensions.width"/></td>
</tr>
<tr>
<td><span class="tip"><label for="dimensions-depth">$_("Depth:")</label> </span></td>
@@ -747,6 +747,7 @@
\$("a#libraryMode").on('click', function(event) {
event.preventDefault();
\$(".librarian").toggleClass("hidden");
\$(".librarian").toggleClass("librarian-on");
\$(this).parent().find('#modeToggle').toggleText("Turn on","Exit");
});
@@ -6,7 +6,7 @@
// override default anchor styles
a.cta-btn {
font-size: 14px;
color: @white;
color: @white !important;
width: 100%;
display: block;
border: 0;
@@ -132,17 +132,6 @@
width: 90%;
}

&.books {
.major {
// stylelint-disable-next-line max-nesting-depth
input[type=text],
input[type=email],
input[type=password],
textarea {
width: 848px;
}
}
}
.input {
select {
width: 130px;
@@ -66,6 +66,7 @@
img {
max-width: 100%;
max-height: 300px;
width: 175px;
}
}
.imageLg {
@@ -108,12 +109,9 @@
.list-books {
.searchResultItem {
flex-wrap: nowrap;
.bookcover {
.bookcover {
width: 175px;
text-align: right;
img {
width: 175px;
}
}
.imageLg {
width: 175px;
@@ -49,7 +49,6 @@
/* stylelint-disable no-descending-specificity */
fieldset.major .wmd-preview,
form.olform.books .formElement .input .wmd-preview {
width: 848px;
min-height: 47px;
padding: 3px;
}
@@ -2300,23 +2300,19 @@ div#subjectLists {
They may be used in another places as well */
fieldset {
&.minor {
float: left;
width: 400px;
}
}
table.identifiers {
width: 395px;
}
.formBack {
float: left;
width: 830px;
&Left {
float: left;
width: 670px;
}
&Right {
float: left;
width: 120px;
}
}
/**

0 comments on commit 2009881

Please sign in to comment.
You can’t perform that action at this time.