diff --git a/core/loaders/utils.py b/core/loaders/utils.py index 40b183f1..1d32581d 100644 --- a/core/loaders/utils.py +++ b/core/loaders/utils.py @@ -7,7 +7,7 @@ import unicodedata from regluit.core.models import Work, Edition, Author, PublisherName, Identifier, Subject from regluit.core.isbn import ISBN -from regluit.core.bookloader import add_by_isbn_from_google +from regluit.core.bookloader import add_by_isbn_from_google, merge_works from regluit.api.crosswalks import inv_relator_contrib from regluit.bisac.models import BisacHeading @@ -36,33 +36,49 @@ def utf8_general_ci_norm(s): def get_authors(book): authors=[] - for i in range(1,3): - fname=u'Author{}First'.format(i) - lname=u'Author{}Last'.format(i) - role=u'Author{}Role'.format(i) - authname = u'{} {}'.format(book[fname],book[lname]) - if authname != u' ': - role = book[role] if book[role].strip() else 'A01' - authors.append((authname,role)) - else: - break - authlist = book["AuthorsList"].replace(' and ', ', ').split(', ') - if len(authlist)>3: - for authname in authlist[3:]: - authors.append((authname, 'A01')) - + if book.get('AuthorsList',''): + #UMich + for i in range(1,3): + fname=u'Author{}First'.format(i) + lname=u'Author{}Last'.format(i) + role=u'Author{}Role'.format(i) + authname = u'{} {}'.format(book[fname],book[lname]) + if authname != u' ': + role = book[role] if book[role].strip() else 'A01' + authors.append((authname,role)) + else: + break + authlist = book["AuthorsList"].replace(' and ', ', ').split(', ') + if len(authlist)>3: + for authname in authlist[3:]: + authors.append((authname, 'A01')) + else: + #OBP + for i in range(1,6): + fname= book.get(u'Contributor {} first name'.format(i), '') + lname= book.get(u'Contributor {} surname'.format(i), '') + role= book.get(u'ONIX Role Code (List 17){}'.format(i), '') + authname = u'{} {}'.format(fname,lname) + if authname != u' ': + role = role if role.strip() else 'A01' + authors.append((authname,role)) + else: + break return authors def get_subjects(book): subjects=[] - for i in range(1,3): - key=u'BISACCode{}'.format(i) - if book[key] != '': + for i in range(1,5): + key = u'BISACCode{}'.format(i) #UMich dialect + key2 = u'BISAC subject code {}'.format(i) #OBP dialect + code = book.get(key,'') + code = code if code else book.get(key2,'') + if code != '': try: - bisac=BisacHeading.objects.get(notation=book[key]) + bisac=BisacHeading.objects.get(notation=code) subjects.append(bisac) except BisacHeading.DoesNotExist: - logger.warning( "Please add BISAC {}".format(book[key])) + logger.warning( "Please add BISAC {}".format(code)) return subjects def add_subject(subject_name, work, authority=''): @@ -72,7 +88,21 @@ def add_subject(subject_name, work, authority=''): subject=Subject.objects.create(name=subject_name, authority=authority) subject.works.add(work) +def get_title(book): + title = book.get('FullTitle','') #UMICH + if title: + return title + title = book.get('Title','') #OBP + sub = book.get('Subtitle','') + if sub: + return u'{}: {}'.format(title,sub) + else: + return title + def get_cover(book): + cover_url = book.get('Cover URL','') #OBP + if cover_url: + return cover_url url = book['URL'] if "10.3998" in url: # code for umich books; can generalize, of course! @@ -94,8 +124,9 @@ def get_cover(book): def get_isbns(book): isbns = [] edition = None - for code in ['eISBN','PaperISBN','ClothISBN']: - if book[code] not in ('','N/A'): + #'ISBN 1' is OBP, others are UMICH + for code in ['eISBN', 'ISBN 3','PaperISBN', 'ISBN 2', 'ClothISBN', 'ISBN 1', 'ISBN 4', 'ISBN 5']: + if book.get(code, '') not in ('','N/A'): values = book[code].split(',') for value in values: isbn = ISBN(value).to_string() @@ -106,15 +137,53 @@ def get_isbns(book): edition = Edition.get_by_isbn(isbn) return (isbns, edition ) +def get_pubdate(book): + value = book.get('CopyrightYear','') #UMICH + if value: + return value + value = book.get('publication year','') #OBP + sub = book.get('publication month','') + sub2 = book.get('publication day','') + if sub2: + return u'{}-{}-{}'.format(value,sub,sub2) + elif sub: + return u'{}-{}'.format(value,sub,sub2) + else: + return value + +def get_publisher(book): + value = book.get('Publisher','') + if value: + return value + if book.get('DOI prefix','')=='10.11647': + return "Open Book Publishers" + +def get_url(book): + url = book.get('URL','') + url = url if url else u'https://dx.doi.org/{}/{}'.format( book.get('DOI prefix',''),book.get('DOI suffix','')) + return url + +def get_description(book): + value = book.get('DescriptionBrief','') + value = value if value else book.get('Plain Text Blurb','') + return value + +def get_language(book): + value = book.get('ISO Language Code','') + return value + + def load_from_books(books): ''' books is an iterator of book dicts. each book must have attributes + (umich dialect) eISBN, ClothISBN, PaperISBN, Publisher, FullTitle, Title, Subtitle, AuthorsList, Author1Last, Author1First, Author1Role, Author2Last, Author2First, Author2Role, Author3Last, Author3First, Author3Role, AuthorBio, TableOfContents, Excerpt, DescriptionLong, DescriptionBrief, BISACCode1, BISACCode2, BISACCode3, CopyrightYear, ePublicationDate, eListPrice, ListPriceCurrencyType, List Price in USD (paper ISBN), eTerritoryRights, SubjectListMARC, , Book-level DOI, URL, License + ''' # Goal: get or create an Edition and Work for each given book @@ -125,12 +194,14 @@ def load_from_books(books): # try first to get an Edition already in DB with by one of the ISBNs in book (isbns, edition) = get_isbns(book) - title=book['FullTitle'] + if len(isbns)==0: + continue + title=get_title(book) authors = get_authors(book) # if matching by ISBN doesn't work, then create a Work and Edition # with a title and the first ISBN - if not edition and len(isbns): + if not edition: work = Work(title=title) work.save() edition= Edition(title=title, work=work) @@ -140,14 +211,18 @@ def load_from_books(books): work=edition.work # at this point, work and edition exist - - if book.get('URL'): - Identifier.set(type='http', value=book['URL'], edition=edition, work=work) + url = get_url(book) + if url: + Identifier.set(type='http', value=url, edition=edition, work=work) # make sure each isbn is represented by an Edition # also associate authors, publication date, cover, publisher for isbn in isbns: - edition = add_by_isbn_from_google(isbn) + edition = add_by_isbn_from_google(isbn, work=work) + if edition and edition.work != work: + merge_works(work, edition.work) + work = work if work.pk is not None else edition.work + edition.work=work # because integrity errors if not if not edition: edition= Edition(title=title, work=work) edition.save() @@ -156,16 +231,23 @@ def load_from_books(books): edition.authors.clear() for (author, role) in authors: edition.add_author(author, inv_relator_contrib.get(role, 'aut')) - edition.publication_date = book['CopyrightYear'] + edition.publication_date = get_pubdate(book) edition.cover_image = get_cover(book) - edition.set_publisher(book['Publisher']) edition.save() + edition.set_publisher(get_publisher(book)) # possibly replace work.description - description = book['DescriptionBrief'] + description = get_description(book) if len(description)>len (work.description): work.description = description - + work.save() + + # set language + lang= get_language(book) + if lang: + work.language = lang + work.save() + # add a bisac subject (and ancestors) to work for bisacsh in get_subjects(book): while bisacsh: @@ -178,9 +260,9 @@ def load_from_books(books): results.append((book, work, edition)) try: - logger.info ("{} {} {}\n".format(i, title, loading_ok)) + logger.info (u"{} {} {}\n".format(i, title, loading_ok)) except Exception as e: - logger.info ("{} {}\n".format(i, title, str(e) )) + logger.info (u"{} {}\n".format(i, title, str(e) )) return results @@ -195,9 +277,9 @@ def loaded_book_ok(book, work, edition): return False try: - url_id = Identifier.objects.get(type='http', value=book['URL']) + url_id = Identifier.objects.get(type='http', value=get_url(book)) if url_id is None: - logger.info ("url_id problem: work.id {}, url: {}".format(work.id, book['URL'])) + logger.info ("url_id problem: work.id {}, url: {}".format(work.id, get_url(book))) return False except Exception as e: logger.info (str(e)) @@ -224,14 +306,14 @@ def loaded_book_ok(book, work, edition): return False try: - edition_for_isbn.publication_date = book['CopyrightYear'] + edition_for_isbn.publication_date = get_pubdate(book) edition_for_isbn.cover_image = get_cover(book) - edition_for_isbn.set_publisher(book['Publisher']) + edition_for_isbn.set_publisher(get_publisher(book)) except: return False # work description - description = book['DescriptionBrief'] + description = get_description(book) if not ((work.description == description) or (len(description) +{{landing_object.publishers.0.name}} {% endblock %} {% block signin %} {% endblock %} {% block extra_css %} - - + + {% endif %} - + {% if progress %} + {% if questionset.questionnaire.name|add:"Progress"|getAssociatedStylesheets %} + + {% else %} + + {% endif %} + {% endif %} {% for x in jsinclude %} {% endfor %} @@ -38,15 +53,6 @@ {% block questionnaire %} {% if progress %} - {% if questionset.questionnaire.name|add:"Progress"|getAssociatedStylesheets %} - - {% else %} - - {% endif %}
{{progress}}% @@ -108,12 +114,14 @@ {% include qdict.template %} {% else %}
+
{% if error %} @@ -139,7 +147,7 @@
- +
diff --git a/questionnaire/views.py b/questionnaire/views.py index 629d2267..b9e37861 100644 --- a/questionnaire/views.py +++ b/questionnaire/views.py @@ -812,9 +812,9 @@ def _table_headers(questions): ql.sort(lambda x, y: numal_sort(x.number, y.number)) columns = [] for q in ql: - if q.type == 'choice-yesnocomment': + if q.type.startswith('choice-yesnocomment'): columns.extend([q.number, q.number + "-freeform"]) - elif q.type == 'choice-freeform': + elif q.type.startswith('choice-freeform'): columns.extend([q.number, q.number + "-freeform"]) elif q.type.startswith('choice-multiple'): cl = [c.value for c in q.choice_set.all()] @@ -1063,7 +1063,9 @@ def generate_run(request, questionnaire_id, subject_id=None, context={}): request.session['runcode'] = key questionnaire_start.send(sender=None, runinfo=run, questionnaire=qu) - return HttpResponseRedirect(reverse('questionnaire', kwargs=kwargs)) + response = HttpResponseRedirect(reverse('questionnaire', kwargs=kwargs)) + response.set_cookie('next', context.get('next','')) + return response def generate_error(request): return 400/0 @@ -1077,6 +1079,8 @@ class SurveyView(TemplateView): nonce = self.kwargs['nonce'] landing = get_object_or_404(Landing, nonce=nonce) context["landing"] = landing + context["next"] = self.request.GET.get('next', '') + return context diff --git a/requirements_versioned.pip b/requirements_versioned.pip index 1a43df51..827c969c 100644 --- a/requirements_versioned.pip +++ b/requirements_versioned.pip @@ -37,7 +37,7 @@ django-nose-selenium==0.7.3 #django-notification==0.2 git+git://github.com/eshellman/django-notification.git@8bb7afbbb07e8cad74bc1cf17e0ac6fc117c0497 django-registration==1.0 -django-selectable==0.7.0 +django-selectable==0.9.0 django-smtp-ssl==1.0 django-storages==1.1.6 django-tastypie==0.12.2 diff --git a/settings/common.py b/settings/common.py index 6f25fca9..92e52009 100644 --- a/settings/common.py +++ b/settings/common.py @@ -486,3 +486,7 @@ MOBIGEN_PASSWORD = "CXq5FSEQFgXtP_s" QUESTIONNAIRE_USE_SESSION = False QUESTIONNAIRE_DEBUG = True + +# Selenium related -- set if Se tests run +FIREFOX_PATH = '' +CHROMEDRIVER_PATH = '' diff --git a/static/css/campaign2.css b/static/css/campaign2.css index 0bac6c57..16623ea5 100644 --- a/static/css/campaign2.css +++ b/static/css/campaign2.css @@ -1 +1 @@ -.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#tabs{border-bottom:4px solid #6994a3;clear:both;float:left;margin-top:10px;width:100%}#tabs ul.book-list-view{margin-bottom:4px!important}#tabs-1,#tabs-2,#tabs-3,#tabs-4{display:none}#tabs-1.active,#tabs-2.active,#tabs-3.active,#tabs-4.active{display:inherit}#tabs-2 textarea{width:95%}ul.tabs{float:left;padding:0;margin:0;list-style:none;width:100%}ul.tabs li{float:left;height:46px;line-height:20px;padding-right:2px;width:116px;background:0;margin:0;padding:0 2px 0 0}ul.tabs li.tabs4{padding-right:0}ul.tabs li a{height:41px;line-height:18px;display:block;text-align:center;padding:0 10px;min-width:80px;-moz-border-radius:7px 7px 0 0;-webkit-border-radius:7px 7px 0 0;border-radius:7px 7px 0 0;background:#d6dde0;color:#3d4e53;padding-top:5px}ul.tabs li a:hover{text-decoration:none}ul.tabs li a div{padding-top:8px}ul.tabs li a:hover,ul.tabs li.active a{background:#6994a3;color:#fff}.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}.book-detail{float:left;width:100%;clear:both;display:block}#book-detail-img{float:left;margin-right:10px;width:151px}#book-detail-img img{padding:5px;border:solid 5px #edf3f4}.book-detail-info{float:left;width:309px}.book-detail-info h2.book-name,.book-detail-info h3.book-author,.book-detail-info h3.book-year{padding:0;margin:0;line-height:normal}.book-detail-info h2.book-name{font-size:19px;font-weight:bold;color:#3d4e53}.book-detail-info h3.book-author,.book-detail-info h3.book-year{font-size:13px;font-weight:normal;color:#3d4e53}.book-detail-info>div{width:100%;clear:both;display:block;overflow:hidden;border-top:1px solid #edf3f4;padding:10px 0}.book-detail-info>div.layout{border:0;padding:0}.book-detail-info>div.layout div.pubinfo{float:left;width:auto;padding-bottom:7px}.book-detail-info .btn_wishlist span{text-align:right}.book-detail-info .find-book label{float:left;line-height:31px}.book-detail-info .find-link{float:right}.book-detail-info .find-link img{padding:2px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.book-detail-info .pledged-info{padding:10px 0;position:relative}.book-detail-info .pledged-info.noborder{border-top:0;padding-top:0}.book-detail-info .pledged-info .campaign-status-info{float:left;width:50%;margin-top:13px}.book-detail-info .pledged-info .campaign-status-info span{font-size:15px;color:#6994a3;font-weight:bold}.book-detail-info .thermometer{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;border:solid 2px #d6dde0;width:291px;padding:7px;position:relative;overflow:visible;background:-webkit-gradient(linear,left top,right top,from(#8dc63f),to(#cf6944));background:-webkit-linear-gradient(left,#cf6944,#8dc63f);background:-moz-linear-gradient(left,#cf6944,#8dc63f);background:-ms-linear-gradient(left,#cf6944,#8dc63f);background:-o-linear-gradient(left,#cf6944,#8dc63f);background:linear-gradient(left,#cf6944,#8dc63f);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert',endColorstr='@call-to-action');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert', endColorstr='@call-to-action')"}.book-detail-info .thermometer.successful{border-color:#8ac3d7;background:#edf3f4}.book-detail-info .thermometer .cover{position:absolute;right:0;-moz-border-radius:0 10px 10px 0;-webkit-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;width:50px;height:14px;margin-top:-7px;background:#f3f5f6}.book-detail-info .thermometer span{display:none}.book-detail-info .thermometer:hover span{display:block;position:absolute;z-index:200;right:0;top:-7px;font-size:19px;color:#6994a3;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .explainer span.explanation{display:none}.book-detail-info .explainer:hover span.explanation{display:block;position:absolute;z-index:200;right:0;top:12px;font-size:13px;font-weight:normal;color:#3d4e53;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .status{position:absolute;top:50%;right:0;height:25px;margin-top:-12px}.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}ul.social a:hover{text-decoration:none}ul.social li{padding:5px 0 5px 30px!important;height:28px;line-height:28px!important;margin:0!important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}ul.social li.facebook{background:url("/static/images/icons/facebook.png") 10px center no-repeat;cursor:pointer}ul.social li.facebook span{padding-left:10px}ul.social li.facebook:hover{background:#8dc63f url("/static/images/icons/facebook-hover.png") 10px center no-repeat}ul.social li.facebook:hover span{color:#fff}ul.social li.twitter{background:url("/static/images/icons/twitter.png") 10px center no-repeat;cursor:pointer}ul.social li.twitter span{padding-left:10px}ul.social li.twitter:hover{background:#8dc63f url("/static/images/icons/twitter-hover.png") 10px center no-repeat}ul.social li.twitter:hover span{color:#fff}ul.social li.email{background:url("/static/images/icons/email.png") 10px center no-repeat;cursor:pointer}ul.social li.email span{padding-left:10px}ul.social li.email:hover{background:#8dc63f url("/static/images/icons/email-hover.png") 10px center no-repeat}ul.social li.email:hover span{color:#fff}ul.social li.embed{background:url("/static/images/icons/embed.png") 10px center no-repeat;cursor:pointer}ul.social li.embed span{padding-left:10px}ul.social li.embed:hover{background:#8dc63f url("/static/images/icons/embed-hover.png") 10px center no-repeat}ul.social li.embed:hover span{color:#fff}#js-page-wrap{overflow:hidden}#main-container{margin-top:20px}#js-leftcol .jsmodule,.pledge.jsmodule{margin-bottom:10px}#js-leftcol .jsmodule.rounded .jsmod-content,.pledge.jsmodule.rounded .jsmod-content{-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;background:#edf3f4;color:#3d4e53;padding:10px 20px;font-weight:bold;border:0;margin:0;line-height:16px}#js-leftcol .jsmodule.rounded .jsmod-content.ACTIVE,.pledge.jsmodule.rounded .jsmod-content.ACTIVE{background:#8dc63f;color:white;font-size:19px;font-weight:normal;line-height:20px}#js-leftcol .jsmodule.rounded .jsmod-content.No.campaign.yet,.pledge.jsmodule.rounded .jsmod-content.No.campaign.yet{background:#e18551;color:white}#js-leftcol .jsmodule.rounded .jsmod-content span,.pledge.jsmodule.rounded .jsmod-content span{display:inline-block;vertical-align:middle}#js-leftcol .jsmodule.rounded .jsmod-content span.spacer,.pledge.jsmodule.rounded .jsmod-content span.spacer{visibility:none}#js-leftcol .jsmodule.rounded .jsmod-content span.findtheungluers,.pledge.jsmodule.rounded .jsmod-content span.findtheungluers{cursor:pointer}.jsmodule.pledge{float:left;margin-left:10px}#js-slide .jsmodule{width:660px!important}a{color:#3d4e53}#js-search{margin:0 15px 0 15px!important}.alert>.errorlist{list-style-type:none;font-size:15px;border:0;text-align:left;font-weight:normal;font-size:13px}.alert>.errorlist>li{margin-bottom:14px}.alert>.errorlist .errorlist{margin-top:7px}.alert>.errorlist .errorlist li{width:auto;height:auto;padding-left:32px;padding-right:32px;font-size:13px}#js-maincol{float:left;width:470px;margin:0 10px}#js-maincol div#content-block{background:0;padding:0}.status{font-size:19px;color:#8dc63f}.add-wishlist,.add-wishlist-workpage,.remove-wishlist-workpage,.remove-wishlist,.on-wishlist,.create-account{float:right;cursor:pointer}.add-wishlist span,.add-wishlist-workpage span,.remove-wishlist-workpage span,.remove-wishlist span,.on-wishlist span,.create-account span{font-weight:normal;color:#3d4e53;text-transform:none;padding-left:20px}.add-wishlist span.on-wishlist,.add-wishlist-workpage span.on-wishlist,.remove-wishlist-workpage span.on-wishlist,.remove-wishlist span.on-wishlist,.on-wishlist span.on-wishlist,.create-account span.on-wishlist{background:url("/static/images/checkmark_small.png") left center no-repeat;cursor:default}.btn_wishlist .add-wishlist span,.add-wishlist-workpage span,.create-account span{background:url("/static/images/booklist/add-wishlist.png") left center no-repeat}.remove-wishlist-workpage span,.remove-wishlist span{background:url("/static/images/booklist/remove-wishlist-blue.png") left center no-repeat}div#content-block-content{padding-left:5px}div#content-block-content a{color:#6994a3}div#content-block-content #tabs-1 img{padding:5px;border:solid 5px #edf3f4}div#content-block-content #tabs-3{margin-left:-5px}.tabs-content{padding-right:5px}.tabs-content iframe{padding:5px;border:solid 5px #edf3f4}.tabs-content form{margin-left:-5px}.tabs-content .clearfix{margin-bottom:10px;border-bottom:2px solid #d6dde0}.work_supporter{height:auto;min-height:50px;margin-top:5px;vertical-align:middle}.work_supporter_avatar{float:left;margin-right:5px}.work_supporter_avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.work_supporter_name{height:50px;line-height:50px;float:left}.work_supporter_nocomment{height:50px;margin-top:5px;vertical-align:middle;min-width:235px;float:left}.show_supporter_contact_form{display:block;margin-left:5px;float:right}.supporter_contact_form{display:none;margin-left:5px}.contact_form_result{display:block;margin-left:5px}.work_supporter_wide{display:block;height:65px;margin-top:5px;float:none;margin-left:5px}.info_for_managers{display:block}.show_supporter_contact_form{cursor:pointer;opacity:.5}.show_supporter_contact_form:hover{cursor:pointer;opacity:1}.official{border:3px #8ac3d7 solid;padding:3px;margin-left:-5px}.editions div{float:left;padding-bottom:5px;margin-bottom:5px}.editions .image{width:60px;overflow:hidden}.editions .metadata{display:block;overflow:hidden;margin-left:5px}.editions a:hover{text-decoration:underline}.show_more_edition,.show_more_ebooks{cursor:pointer}.show_more_edition{text-align:right}.show_more_edition:hover{text-decoration:underline}.more_edition{display:none;clear:both;padding-bottom:10px;padding-left:60px}.more_ebooks{display:none}.show_more_ebooks:hover{text-decoration:underline}#js-rightcol .add-wishlist,#js-rightcol .on-wishlist,#js-rightcol .create-account{float:none}#js-rightcol .on-wishlist{margin-left:20px}#js-rightcol,#pledge-rightcol{float:right;width:235px;margin-bottom:20px}#js-rightcol h3.jsmod-title,#pledge-rightcol h3.jsmod-title{background:#a7c1ca;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px;height:auto;font-style:normal;font-size:15px;margin:0 0 10px 0;color:white}#js-rightcol h3.jsmod-title span,#pledge-rightcol h3.jsmod-title span{padding:0;color:#fff;font-style:normal;height:22px;line-height:22px}#js-rightcol .jsmodule,#pledge-rightcol .jsmodule{margin-bottom:10px}#js-rightcol .jsmodule a:hover,#pledge-rightcol .jsmodule a:hover{text-decoration:none}#pledge-rightcol{margin-top:7px}.js-rightcol-pad{border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}#widgetcode{display:none;border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}ul.support li{border-bottom:1px solid #d6dde0;padding:10px 5px 10px 10px;background:url("/static/images/icons/pledgearrow.png") 98% center no-repeat}ul.support li.no_link{background:0}ul.support li.last{border-bottom:0}ul.support li span{display:block;padding-right:10px}ul.support li span.menu-item-price{font-size:19px;float:left;display:inline;margin-bottom:3px}ul.support li span.menu-item-desc{float:none;clear:both;font-size:15px;font-weight:normal;line-height:19.5px}ul.support li:hover{color:#fff;background:#8dc63f url("/static/images/icons/pledgearrow-hover.png") 98% center no-repeat}ul.support li:hover a{color:#fff;text-decoration:none}ul.support li:hover.no_link{background:#fff;color:#8dc63f}.you_pledged{float:left;line-height:21px;font-weight:normal;color:#3d4e53;padding-left:20px;background:url("/static/images/checkmark_small.png") left center no-repeat}.thank-you{font-size:19px;font-weight:bold;margin:20px auto}div#libtools{border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;margin-left:0;margin-top:1em;padding:10px}div#libtools p{margin-top:0;margin-bottom:0}div#libtools span{margin-top:0;margin-left:.5em;display:inline-block}div#libtools input[type="submit"]{margin-left:4em} \ No newline at end of file +.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#tabs{border-bottom:4px solid #6994a3;clear:both;float:left;margin-top:10px;width:100%}#tabs ul.book-list-view{margin-bottom:4px!important}#tabs-1,#tabs-2,#tabs-3,#tabs-4{display:none}#tabs-1.active,#tabs-2.active,#tabs-3.active,#tabs-4.active{display:inherit}#tabs-2 textarea{width:95%}ul.tabs{float:left;padding:0;margin:0;list-style:none;width:100%}ul.tabs li{float:left;height:46px;line-height:20px;padding-right:2px;width:116px;background:0;margin:0;padding:0 2px 0 0}ul.tabs li.tabs4{padding-right:0}ul.tabs li a{height:41px;line-height:18px;display:block;text-align:center;padding:0 10px;min-width:80px;-moz-border-radius:7px 7px 0 0;-webkit-border-radius:7px 7px 0 0;border-radius:7px 7px 0 0;background:#d6dde0;color:#3d4e53;padding-top:5px}ul.tabs li a:hover{text-decoration:none}ul.tabs li a div{padding-top:8px}ul.tabs li a:hover,ul.tabs li.active a{background:#6994a3;color:#fff}.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}.book-detail{float:left;width:100%;clear:both;display:block}#book-detail-img{float:left;margin-right:10px;width:151px}#book-detail-img img{padding:5px;border:solid 5px #edf3f4}.book-detail-info{float:left;width:309px}.book-detail-info h2.book-name,.book-detail-info h3.book-author,.book-detail-info h3.book-year{padding:0;margin:0;line-height:normal}.book-detail-info h2.book-name{font-size:19px;font-weight:bold;color:#3d4e53}.book-detail-info h3.book-author,.book-detail-info h3.book-year{font-size:13px;font-weight:normal;color:#3d4e53}.book-detail-info h3.book-author span a,.book-detail-info h3.book-year span a{font-size:13px;font-weight:normal;color:#6994a3}.book-detail-info>div{width:100%;clear:both;display:block;overflow:hidden;border-top:1px solid #edf3f4;padding:10px 0}.book-detail-info>div.layout{border:0;padding:0}.book-detail-info>div.layout div.pubinfo{float:left;width:auto;padding-bottom:7px}.book-detail-info .btn_wishlist span{text-align:right}.book-detail-info .find-book label{float:left;line-height:31px}.book-detail-info .find-link{float:right}.book-detail-info .find-link img{padding:2px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.book-detail-info .pledged-info{padding:10px 0;position:relative}.book-detail-info .pledged-info.noborder{border-top:0;padding-top:0}.book-detail-info .pledged-info .campaign-status-info{float:left;width:50%;margin-top:13px}.book-detail-info .pledged-info .campaign-status-info span{font-size:15px;color:#6994a3;font-weight:bold}.book-detail-info .thermometer{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;border:solid 2px #d6dde0;width:291px;padding:7px;position:relative;overflow:visible;background:-webkit-gradient(linear,left top,right top,from(#8dc63f),to(#cf6944));background:-webkit-linear-gradient(left,#cf6944,#8dc63f);background:-moz-linear-gradient(left,#cf6944,#8dc63f);background:-ms-linear-gradient(left,#cf6944,#8dc63f);background:-o-linear-gradient(left,#cf6944,#8dc63f);background:linear-gradient(left,#cf6944,#8dc63f);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert',endColorstr='@call-to-action');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert', endColorstr='@call-to-action')"}.book-detail-info .thermometer.successful{border-color:#8ac3d7;background:#edf3f4}.book-detail-info .thermometer .cover{position:absolute;right:0;-moz-border-radius:0 10px 10px 0;-webkit-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;width:50px;height:14px;margin-top:-7px;background:#f3f5f6}.book-detail-info .thermometer span{display:none}.book-detail-info .thermometer:hover span{display:block;position:absolute;z-index:200;right:0;top:-7px;font-size:19px;color:#6994a3;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .explainer span.explanation{display:none}.book-detail-info .explainer:hover span.explanation{display:block;position:absolute;z-index:200;right:0;top:12px;font-size:13px;font-weight:normal;color:#3d4e53;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .status{position:absolute;top:50%;right:0;height:25px;margin-top:-12px}.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}ul.social a:hover{text-decoration:none}ul.social li{padding:5px 0 5px 30px!important;height:28px;line-height:28px!important;margin:0!important;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}ul.social li.facebook{background:url("/static/images/icons/facebook.png") 10px center no-repeat;cursor:pointer}ul.social li.facebook span{padding-left:10px}ul.social li.facebook:hover{background:#8dc63f url("/static/images/icons/facebook-hover.png") 10px center no-repeat}ul.social li.facebook:hover span{color:#fff}ul.social li.twitter{background:url("/static/images/icons/twitter.png") 10px center no-repeat;cursor:pointer}ul.social li.twitter span{padding-left:10px}ul.social li.twitter:hover{background:#8dc63f url("/static/images/icons/twitter-hover.png") 10px center no-repeat}ul.social li.twitter:hover span{color:#fff}ul.social li.email{background:url("/static/images/icons/email.png") 10px center no-repeat;cursor:pointer}ul.social li.email span{padding-left:10px}ul.social li.email:hover{background:#8dc63f url("/static/images/icons/email-hover.png") 10px center no-repeat}ul.social li.email:hover span{color:#fff}ul.social li.embed{background:url("/static/images/icons/embed.png") 10px center no-repeat;cursor:pointer}ul.social li.embed span{padding-left:10px}ul.social li.embed:hover{background:#8dc63f url("/static/images/icons/embed-hover.png") 10px center no-repeat}ul.social li.embed:hover span{color:#fff}#js-page-wrap{overflow:hidden}#main-container{margin-top:20px}#js-leftcol .jsmodule,.pledge.jsmodule{margin-bottom:10px}#js-leftcol .jsmodule.rounded .jsmod-content,.pledge.jsmodule.rounded .jsmod-content{-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;background:#edf3f4;color:#3d4e53;padding:10px 20px;font-weight:bold;border:0;margin:0;line-height:16px}#js-leftcol .jsmodule.rounded .jsmod-content.ACTIVE,.pledge.jsmodule.rounded .jsmod-content.ACTIVE{background:#8dc63f;color:white;font-size:19px;font-weight:normal;line-height:20px}#js-leftcol .jsmodule.rounded .jsmod-content.No.campaign.yet,.pledge.jsmodule.rounded .jsmod-content.No.campaign.yet{background:#e18551;color:white}#js-leftcol .jsmodule.rounded .jsmod-content span,.pledge.jsmodule.rounded .jsmod-content span{display:inline-block;vertical-align:middle}#js-leftcol .jsmodule.rounded .jsmod-content span.spacer,.pledge.jsmodule.rounded .jsmod-content span.spacer{visibility:none}#js-leftcol .jsmodule.rounded .jsmod-content span.findtheungluers,.pledge.jsmodule.rounded .jsmod-content span.findtheungluers{cursor:pointer}.jsmodule.pledge{float:left;margin-left:10px}#js-slide .jsmodule{width:660px!important}a{color:#3d4e53}#js-search{margin:0 15px 0 15px!important}.alert>.errorlist{list-style-type:none;font-size:15px;border:0;text-align:left;font-weight:normal;font-size:13px}.alert>.errorlist>li{margin-bottom:14px}.alert>.errorlist .errorlist{margin-top:7px}.alert>.errorlist .errorlist li{width:auto;height:auto;padding-left:32px;padding-right:32px;font-size:13px}#js-maincol{float:left;width:470px;margin:0 10px}#js-maincol div#content-block{background:0;padding:0}.status{font-size:19px;color:#8dc63f}.add-wishlist,.add-wishlist-workpage,.remove-wishlist-workpage,.remove-wishlist,.on-wishlist,.create-account{float:right;cursor:pointer}.add-wishlist span,.add-wishlist-workpage span,.remove-wishlist-workpage span,.remove-wishlist span,.on-wishlist span,.create-account span{font-weight:normal;color:#3d4e53;text-transform:none;padding-left:20px}.add-wishlist span.on-wishlist,.add-wishlist-workpage span.on-wishlist,.remove-wishlist-workpage span.on-wishlist,.remove-wishlist span.on-wishlist,.on-wishlist span.on-wishlist,.create-account span.on-wishlist{background:url("/static/images/checkmark_small.png") left center no-repeat;cursor:default}.btn_wishlist .add-wishlist span,.add-wishlist-workpage span,.create-account span{background:url("/static/images/booklist/add-wishlist.png") left center no-repeat}.remove-wishlist-workpage span,.remove-wishlist span{background:url("/static/images/booklist/remove-wishlist-blue.png") left center no-repeat}div#content-block-content{padding-left:5px}div#content-block-content a{color:#6994a3}div#content-block-content #tabs-1 img{padding:5px;border:solid 5px #edf3f4}div#content-block-content #tabs-3{margin-left:-5px}.tabs-content{padding-right:5px}.tabs-content iframe{padding:5px;border:solid 5px #edf3f4}.tabs-content form{margin-left:-5px}.tabs-content .clearfix{margin-bottom:10px;border-bottom:2px solid #d6dde0}.work_supporter{height:auto;min-height:50px;margin-top:5px;vertical-align:middle}.work_supporter_avatar{float:left;margin-right:5px}.work_supporter_avatar img{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.work_supporter_name{height:50px;line-height:50px;float:left}.work_supporter_nocomment{height:50px;margin-top:5px;vertical-align:middle;min-width:235px;float:left}.show_supporter_contact_form{display:block;margin-left:5px;float:right}.supporter_contact_form{display:none;margin-left:5px}.contact_form_result{display:block;margin-left:5px}.work_supporter_wide{display:block;height:65px;margin-top:5px;float:none;margin-left:5px}.info_for_managers{display:block}.show_supporter_contact_form{cursor:pointer;opacity:.5}.show_supporter_contact_form:hover{cursor:pointer;opacity:1}.official{border:3px #8ac3d7 solid;padding:3px;margin-left:-5px}.editions div{float:left;padding-bottom:5px;margin-bottom:5px}.editions .image{width:60px;overflow:hidden}.editions .metadata{display:block;overflow:hidden;margin-left:5px}.editions a:hover{text-decoration:underline}.show_more_edition,.show_more_ebooks{cursor:pointer}.show_more_edition{text-align:right}.show_more_edition:hover{text-decoration:underline}.more_edition{display:none;clear:both;padding-bottom:10px;padding-left:60px}.more_ebooks{display:none}.show_more_ebooks:hover{text-decoration:underline}#js-rightcol .add-wishlist,#js-rightcol .on-wishlist,#js-rightcol .create-account{float:none}#js-rightcol .on-wishlist{margin-left:20px}#js-rightcol,#pledge-rightcol{float:right;width:235px;margin-bottom:20px}#js-rightcol h3.jsmod-title,#pledge-rightcol h3.jsmod-title{background:#a7c1ca;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px;height:auto;font-style:normal;font-size:15px;margin:0 0 10px 0;color:white}#js-rightcol h3.jsmod-title span,#pledge-rightcol h3.jsmod-title span{padding:0;color:#fff;font-style:normal;height:22px;line-height:22px}#js-rightcol .jsmodule,#pledge-rightcol .jsmodule{margin-bottom:10px}#js-rightcol .jsmodule a:hover,#pledge-rightcol .jsmodule a:hover{text-decoration:none}#pledge-rightcol{margin-top:7px}.js-rightcol-pad{border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}#widgetcode{display:none;border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}ul.support li{border-bottom:1px solid #d6dde0;padding:10px 5px 10px 10px;background:url("/static/images/icons/pledgearrow.png") 98% center no-repeat}ul.support li.no_link{background:0}ul.support li.last{border-bottom:0}ul.support li span{display:block;padding-right:10px}ul.support li span.menu-item-price{font-size:19px;float:left;display:inline;margin-bottom:3px}ul.support li span.menu-item-desc{float:none;clear:both;font-size:15px;font-weight:normal;line-height:19.5px}ul.support li:hover{color:#fff;background:#8dc63f url("/static/images/icons/pledgearrow-hover.png") 98% center no-repeat}ul.support li:hover a{color:#fff;text-decoration:none}ul.support li:hover.no_link{background:#fff;color:#8dc63f}.you_pledged{float:left;line-height:21px;font-weight:normal;color:#3d4e53;padding-left:20px;background:url("/static/images/checkmark_small.png") left center no-repeat}.thank-you{font-size:19px;font-weight:bold;margin:20px auto}div#libtools{border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;margin-left:0;margin-top:1em;padding:10px}div#libtools p{margin-top:0;margin-bottom:0}div#libtools span{margin-top:0;margin-left:.5em;display:inline-block}div#libtools input[type="submit"]{margin-left:4em} \ No newline at end of file diff --git a/static/css/manage_campaign.css b/static/css/manage_campaign.css index b535d2bc..fd98be68 100644 --- a/static/css/manage_campaign.css +++ b/static/css/manage_campaign.css @@ -1 +1 @@ -.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#tabs{border-bottom:4px solid #6994a3;clear:both;float:left;margin-top:10px;width:100%}#tabs ul.book-list-view{margin-bottom:4px!important}#tabs-1,#tabs-2,#tabs-3,#tabs-4{display:none}#tabs-1.active,#tabs-2.active,#tabs-3.active,#tabs-4.active{display:inherit}#tabs-2 textarea{width:95%}ul.tabs{float:left;padding:0;margin:0;list-style:none;width:100%}ul.tabs li{float:left;height:46px;line-height:20px;padding-right:2px;width:116px;background:0;margin:0;padding:0 2px 0 0}ul.tabs li.tabs4{padding-right:0}ul.tabs li a{height:41px;line-height:18px;display:block;text-align:center;padding:0 10px;min-width:80px;-moz-border-radius:7px 7px 0 0;-webkit-border-radius:7px 7px 0 0;border-radius:7px 7px 0 0;background:#d6dde0;color:#3d4e53;padding-top:5px}ul.tabs li a:hover{text-decoration:none}ul.tabs li a div{padding-top:8px}ul.tabs li a:hover,ul.tabs li.active a{background:#6994a3;color:#fff}.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}.book-detail{float:left;width:100%;clear:both;display:block}#book-detail-img{float:left;margin-right:10px;width:151px}#book-detail-img img{padding:5px;border:solid 5px #edf3f4}.book-detail-info{float:left;width:309px}.book-detail-info h2.book-name,.book-detail-info h3.book-author,.book-detail-info h3.book-year{padding:0;margin:0;line-height:normal}.book-detail-info h2.book-name{font-size:19px;font-weight:bold;color:#3d4e53}.book-detail-info h3.book-author,.book-detail-info h3.book-year{font-size:13px;font-weight:normal;color:#3d4e53}.book-detail-info>div{width:100%;clear:both;display:block;overflow:hidden;border-top:1px solid #edf3f4;padding:10px 0}.book-detail-info>div.layout{border:0;padding:0}.book-detail-info>div.layout div.pubinfo{float:left;width:auto;padding-bottom:7px}.book-detail-info .btn_wishlist span{text-align:right}.book-detail-info .find-book label{float:left;line-height:31px}.book-detail-info .find-link{float:right}.book-detail-info .find-link img{padding:2px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.book-detail-info .pledged-info{padding:10px 0;position:relative}.book-detail-info .pledged-info.noborder{border-top:0;padding-top:0}.book-detail-info .pledged-info .campaign-status-info{float:left;width:50%;margin-top:13px}.book-detail-info .pledged-info .campaign-status-info span{font-size:15px;color:#6994a3;font-weight:bold}.book-detail-info .thermometer{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;border:solid 2px #d6dde0;width:291px;padding:7px;position:relative;overflow:visible;background:-webkit-gradient(linear,left top,right top,from(#8dc63f),to(#cf6944));background:-webkit-linear-gradient(left,#cf6944,#8dc63f);background:-moz-linear-gradient(left,#cf6944,#8dc63f);background:-ms-linear-gradient(left,#cf6944,#8dc63f);background:-o-linear-gradient(left,#cf6944,#8dc63f);background:linear-gradient(left,#cf6944,#8dc63f);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert',endColorstr='@call-to-action');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert', endColorstr='@call-to-action')"}.book-detail-info .thermometer.successful{border-color:#8ac3d7;background:#edf3f4}.book-detail-info .thermometer .cover{position:absolute;right:0;-moz-border-radius:0 10px 10px 0;-webkit-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;width:50px;height:14px;margin-top:-7px;background:#f3f5f6}.book-detail-info .thermometer span{display:none}.book-detail-info .thermometer:hover span{display:block;position:absolute;z-index:200;right:0;top:-7px;font-size:19px;color:#6994a3;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .explainer span.explanation{display:none}.book-detail-info .explainer:hover span.explanation{display:block;position:absolute;z-index:200;right:0;top:12px;font-size:13px;font-weight:normal;color:#3d4e53;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .status{position:absolute;top:50%;right:0;height:25px;margin-top:-12px}.preview_campaign{float:right;margin-right:40px}input[name="launch"]{display:none}#launchme{margin:15px auto}#premium_add span,#premium_add input[type="text"],#premium_add textarea{float:left}#premium_add input[type="submit"]{float:right}#premium_add input[type="text"]{width:33%}#premium_add textarea{width:60%}#premium_add .premium_add_label{width:30%;margin-right:2%}#premium_add .premium_field_label{width:1%;margin-left:-1%}div.edition_form{margin-bottom:2em} \ No newline at end of file +.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#tabs{border-bottom:4px solid #6994a3;clear:both;float:left;margin-top:10px;width:100%}#tabs ul.book-list-view{margin-bottom:4px!important}#tabs-1,#tabs-2,#tabs-3,#tabs-4{display:none}#tabs-1.active,#tabs-2.active,#tabs-3.active,#tabs-4.active{display:inherit}#tabs-2 textarea{width:95%}ul.tabs{float:left;padding:0;margin:0;list-style:none;width:100%}ul.tabs li{float:left;height:46px;line-height:20px;padding-right:2px;width:116px;background:0;margin:0;padding:0 2px 0 0}ul.tabs li.tabs4{padding-right:0}ul.tabs li a{height:41px;line-height:18px;display:block;text-align:center;padding:0 10px;min-width:80px;-moz-border-radius:7px 7px 0 0;-webkit-border-radius:7px 7px 0 0;border-radius:7px 7px 0 0;background:#d6dde0;color:#3d4e53;padding-top:5px}ul.tabs li a:hover{text-decoration:none}ul.tabs li a div{padding-top:8px}ul.tabs li a:hover,ul.tabs li.active a{background:#6994a3;color:#fff}.header-text{display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;border:1px solid transparent;color:white;cursor:pointer;font-size:13px;font-weight:normal;padding:0 15px;margin:5px 0}.errors{-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}.book-detail{float:left;width:100%;clear:both;display:block}#book-detail-img{float:left;margin-right:10px;width:151px}#book-detail-img img{padding:5px;border:solid 5px #edf3f4}.book-detail-info{float:left;width:309px}.book-detail-info h2.book-name,.book-detail-info h3.book-author,.book-detail-info h3.book-year{padding:0;margin:0;line-height:normal}.book-detail-info h2.book-name{font-size:19px;font-weight:bold;color:#3d4e53}.book-detail-info h3.book-author,.book-detail-info h3.book-year{font-size:13px;font-weight:normal;color:#3d4e53}.book-detail-info h3.book-author span a,.book-detail-info h3.book-year span a{font-size:13px;font-weight:normal;color:#6994a3}.book-detail-info>div{width:100%;clear:both;display:block;overflow:hidden;border-top:1px solid #edf3f4;padding:10px 0}.book-detail-info>div.layout{border:0;padding:0}.book-detail-info>div.layout div.pubinfo{float:left;width:auto;padding-bottom:7px}.book-detail-info .btn_wishlist span{text-align:right}.book-detail-info .find-book label{float:left;line-height:31px}.book-detail-info .find-link{float:right}.book-detail-info .find-link img{padding:2px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.book-detail-info .pledged-info{padding:10px 0;position:relative}.book-detail-info .pledged-info.noborder{border-top:0;padding-top:0}.book-detail-info .pledged-info .campaign-status-info{float:left;width:50%;margin-top:13px}.book-detail-info .pledged-info .campaign-status-info span{font-size:15px;color:#6994a3;font-weight:bold}.book-detail-info .thermometer{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;border:solid 2px #d6dde0;width:291px;padding:7px;position:relative;overflow:visible;background:-webkit-gradient(linear,left top,right top,from(#8dc63f),to(#cf6944));background:-webkit-linear-gradient(left,#cf6944,#8dc63f);background:-moz-linear-gradient(left,#cf6944,#8dc63f);background:-ms-linear-gradient(left,#cf6944,#8dc63f);background:-o-linear-gradient(left,#cf6944,#8dc63f);background:linear-gradient(left,#cf6944,#8dc63f);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert',endColorstr='@call-to-action');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='@alert', endColorstr='@call-to-action')"}.book-detail-info .thermometer.successful{border-color:#8ac3d7;background:#edf3f4}.book-detail-info .thermometer .cover{position:absolute;right:0;-moz-border-radius:0 10px 10px 0;-webkit-border-radius:0 10px 10px 0;border-radius:0 10px 10px 0;width:50px;height:14px;margin-top:-7px;background:#f3f5f6}.book-detail-info .thermometer span{display:none}.book-detail-info .thermometer:hover span{display:block;position:absolute;z-index:200;right:0;top:-7px;font-size:19px;color:#6994a3;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .explainer span.explanation{display:none}.book-detail-info .explainer:hover span.explanation{display:block;position:absolute;z-index:200;right:0;top:12px;font-size:13px;font-weight:normal;color:#3d4e53;background:white;border:2px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:5px}.book-detail-info .status{position:absolute;top:50%;right:0;height:25px;margin-top:-12px}.preview_campaign{float:right;margin-right:40px}input[name="launch"]{display:none}#launchme{margin:15px auto}#premium_add span,#premium_add input[type="text"],#premium_add textarea{float:left}#premium_add input[type="submit"]{float:right}#premium_add input[type="text"]{width:33%}#premium_add textarea{width:60%}#premium_add .premium_add_label{width:30%;margin-right:2%}#premium_add .premium_field_label{width:1%;margin-left:-1%}div.edition_form{margin-bottom:2em} \ No newline at end of file diff --git a/static/less/book_detail.less b/static/less/book_detail.less index af67961d..34b449b4 100644 --- a/static/less/book_detail.less +++ b/static/less/book_detail.less @@ -41,6 +41,12 @@ font-weight:normal; color:@text-blue; } + + h3.book-author span a, h3.book-year span a{ + font-size: @font-size-default; + font-weight:normal; + color:@link-color; + } > div { width:100%; diff --git a/test/campaigntest.py b/test/campaigntest.py index 8a530b26..61874964 100644 --- a/test/campaigntest.py +++ b/test/campaigntest.py @@ -11,6 +11,7 @@ from urlparse import (urlparse, urlunparse) from selenium import selenium, webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities """ django imports @@ -42,6 +43,21 @@ def set_test_logging(): sel.setLevel(logging.INFO) +def selenium_driver(browser='firefox'): + + if browser == 'firefox': + firefox_capabilities = DesiredCapabilities.FIREFOX + firefox_capabilities['marionette'] = True + firefox_capabilities['binary'] = settings.FIREFOX_PATH + driver = webdriver.Firefox(capabilities=firefox_capabilities) + elif browser == 'htmlunit': + # HTMLUNIT with JS -- not successful + driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.HTMLUNITWITHJS) + else: + driver = webdriver.Chrome(executable_path=settings.CHROMEDRIVER_PATH) + + return driver + class GoogleWebDriverTest(unittest.TestCase): @@ -51,7 +67,7 @@ class GoogleWebDriverTest(unittest.TestCase): # This is an empty array where we will store any verification errors # we find in our tests - self.selenium = webdriver.Firefox() + self.selenium = selenium_driver(browser='firefox') set_test_logging() def test_google_rc(self): @@ -174,16 +190,8 @@ def test_relaunch(unglue_it_url = settings.LIVE_SERVER_TEST_URL, do_local=True, # this assumes that we don't have donation functionality on assert settings.NONPROFIT.is_on == False - - if browser == 'firefox': - sel = webdriver.Firefox() - elif browser == 'chrome': - sel = webdriver.Chrome(executable_path='/Users/raymondyee/C/src/Gluejar/regluit/test/chromedriver') - elif browser == 'htmlunit': - # HTMLUNIT with JS -- not successful - sel = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.HTMLUNITWITHJS) - else: - sel = webdriver.Firefox() + + sel = selenium_driver(browser=browser) time.sleep(5) @@ -356,7 +364,7 @@ def successful_campaign_signal(): def berkeley_search(): - sel = webdriver.Firefox() + sel = selenium_driver(browser='firefox') sel.get("http://berkeley.edu") search = WebDriverWait(sel,5).until(lambda d: d.find_element_by_css_selector('input[id="search_text"]')) search.send_keys("quantum computing")