Skip to content

Commit

Permalink
Merge branch 'master' into hideDropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
shinyichen committed Mar 29, 2021
2 parents 5fed7ae + c443837 commit e873ca1
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
</div>
</div>
<hr class="hr" />
<div class="row">
<div class="row" style="margin-left: 0; margin-right: 0">
<table class="libraries-list-container table table-hover table-responsive">
<thead>
<tr>
<th>
<th class="hide-xs">
<!--page num -->
<span class="sr-only">no data</span>
</th>
Expand Down Expand Up @@ -77,11 +77,11 @@
{{/compare}}{{/compare}}
</button>
</th>
<th>
<th class="hide-xs">
Last Modified
<button
title="sort by last modified"
class="btn btn-xs {{#compare sort 'date_last_modified'}} s-sort-active {{/compare}} btn-default"
class="btn btn-xs {{#compare sort 'date_last_modified'}} s-sort-active {{/compare}} btn-default hide-xs"
data-sort='{"sort":"date_last_modified","type":"date"}'
>
<i class="fa fa-lg fa-sort" aria-hidden="true"></i> {{#compare sort
Expand Down
4 changes: 2 additions & 2 deletions src/js/widgets/libraries_all/templates/library-item.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<td>
<td class="hide-xs">
{{libNum}}
</td>
<td>
Expand Down Expand Up @@ -28,4 +28,4 @@

<td>{{permission}}</td>

<td>{{date_last_modified}}</td>
<td class="hide-xs">{{date_last_modified}}</td>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--duplicating some stuff here in the interests of simplicity, maybe that's not ideal?-->

{{#if publicView}} {{#if loggedIn}}
<div class="pull-right" style="position:relative;z-index:1">
<div class="pull-right-md" style="position:relative;z-index:1">
{{#if largeLibrary}}
<button
class="btn btn-default bigquery-export"
Expand Down Expand Up @@ -156,7 +156,7 @@ <h5>Date Last Modified:</h5>
<!-- not public -->

{{#if edit}}
<div class="pull-right" style="position:relative;z-index:1">
<div class="pull-right-md" style="position:relative;z-index:1">
{{#if largeLibrary}}
<button
class="btn btn-default bigquery-export"
Expand Down Expand Up @@ -281,8 +281,8 @@ <h5>Owner:</h5>
data-target="#library-actions"
aria-expanded="false"
>
<i class="fa fa-cog" aria-hidden="true"></i> View editing options (You have
<b>{{permission}}</b> privileges)
<i class="fa fa-cog" aria-hidden="true"></i> View editing options<span class="hide-xs"> (You have
<b>{{permission}}</b> privileges)</span>
</button>
<div
class="collapse"
Expand Down
10 changes: 7 additions & 3 deletions src/js/widgets/library_individual/views/library_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ define([
template: LibraryHeaderTemplate,

events: {
'click .editable-item .toggle-form': 'showForm',
'click .editable-item .toggle-form': 'toggleShowForm',
'click .editable-item .btn-success': 'submitEdit',
'click .editable-item .btn-default': 'cancelEdit',
'click li[data-tab]:not(.active)': 'triggerSubviewNavigate',
Expand Down Expand Up @@ -94,10 +94,14 @@ define([
this.$('.bigquery-export .icon-loading').css('display', 'none');
},

showForm: function(e) {
toggleShowForm: function(e) {
this.currentEditField = $(e.target).data('field');
var formSelector = 'form[data-field="' + this.currentEditField + '"]';
$(formSelector).removeClass('hidden');
if ($(formSelector).hasClass('hidden')) {
$(formSelector).removeClass('hidden');
} else {
$(formSelector).addClass('hidden');
}
},

submitEdit: function(e) {
Expand Down
12 changes: 6 additions & 6 deletions src/js/widgets/library_list/templates/library-container.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
<h3 class="record-deleted"><i class="icon-success" aria-hidden="true" /> Record successfully deleted</h3>
{{/if}}
{{#if hasRecords}}
<div class="row">
<div class="col-sm-1" style="padding-left: 12.5px">
<div class="row" style="margin-left: 0">
<div class="col-xs-1 col-sm-1" style="padding-left: 12.5px; text-align: right;">
{{#unless public}}
<label for="select-all-docs" class="sr-only">Select All Docs</label>
<input type="checkbox" id="select-all-docs" name="select-all-docs" title="select all docs" {{#if allSelected}} checked {{/if}}>
{{/unless}}
</div>
<div class="col-sm-6">
<div class="col-xs-11 col-sm-6">
<div class="button-toolbar">
<button class="btn btn-danger btn-sm hidden" id="bulk-delete">Delete Selected</button>
<button class="btn btn-default btn-sm hidden" id="bulk-limit">
<i class="fa fa-archive" aria-hidden="true"></i> Show Selection in Results Page
</button>
</div>
</div>
<div class="col-sm-3 col-sm-offset-2">
<div id="sort-container"></div>
</div>
</div>
<div style="text-align: right;">
<div id="sort-container"></div>
</div>
{{/if}}
</div>
Expand Down
23 changes: 12 additions & 11 deletions src/js/widgets/library_list/templates/library-item-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
<div class="col-sm-12">

<div class="row s-top-row">
<div class="col-sm-1 col-xs-2 s-checkbox-col s-top-row-col">
{{indexToShow}}
<div class="col-xs-1 col-sm-1 s-checkbox-col s-top-row-col">
<span class="hidden-xs">{{indexToShow}}</span>
{{#if showCheckbox}}
<input type="checkbox" value={{identifier}} name="identifier" aria-label="select item {{indexToShow}}" {{#if chosen}} checked {{/if}}>
{{/if}}
</div>
<div class="col-sm-3 col-xs-4 s-top-row-col identifier s-identifier">
<div class="col-xs-4 col-sm-4 s-top-row-col identifier s-identifier">
<a href="#abs/{{identifier}}/abstract" aria-label="bibcode">
{{identifier}}
</a>
</div>
<div class="col-sm-1 s-top-row-col" aria-label="date published">
<div class="hidden-xs col-xs-2 col-sm-1 s-top-row-col" aria-label="date published">
{{formattedDate}}
</div>
<div class="col-sm-3 col-xs-6 s-top-row-col" title="citation count">
<div class="hidden-xs col-sm-2 s-top-row-col" title="citation count">
{{#if num_citations}}
{{#if normCiteSort}}
<a href="#abs/{{bibcode}}/citations">cited (n): {{num_citations}}.00</a>
Expand All @@ -25,13 +25,13 @@
{{/if}}
{{/if}}
</div>
<div class="col-sm-4">
<div class="col-xs-7 col-sm-4">
<span class="s-results-links">
{{#if links}}
<div class="letter-icon s-letter-icon">

<button class="btn-link {{#if links.text}} active-link s-active-link {{/if}}"
aria-disabled="{{#if links.text}} false {{else}} true {{/if}}">
style="padding: 0" aria-disabled="{{#if links.text}} false {{else}} true {{/if}}">
<i class="s-text-icon" aria-label="quick access to full text links"></i>
</button>
{{#if links.text}}
Expand All @@ -47,7 +47,7 @@
<div class="letter-icon s-letter-icon">

<button class="btn-link {{#if links.list}} active-link s-active-link {{/if}}"
aria-disabled="{{#if links.list}} false {{else}} true{{/if}}">
style="padding: 0" aria-disabled="{{#if links.list}} false {{else}} true{{/if}}">
<i class="s-list-icon" aria-label="quick links to lists of references, citations and more"></i>
</button>

Expand All @@ -63,7 +63,7 @@
<div class="letter-icon s-letter-icon">

<button class="btn-link {{#if links.data}} active-link s-active-link {{/if}}"
aria-disabled="{{#if links.data}} false {{else}} true {{/if}}">
style="padding: 0" aria-disabled="{{#if links.data}} false {{else}} true {{/if}}">
<i class="s-data-icon" aria-label="quick links to data associated with this article"></i>
</button>

Expand All @@ -81,7 +81,8 @@
</span>

{{#if permission}}
<button class="btn btn-sm btn-danger btn-inverse remove-record pull-right" title="delete record permanently from this library"><i class="fa fa-times" aria-hidden="true"></i></button>
<button class="hidden-xs btn btn-sm btn-danger btn-inverse remove-record pull-right" title="delete record permanently from this library"><i class="fa fa-times" aria-hidden="true"></i></button>
<button class="hidden-sm hidden-md hidden-lg btn btn-xs btn-danger btn-inverse remove-record pull-right" title="delete record permanently from this library"><i class="fa fa-times" aria-hidden="true"></i></button>
{{/if}}
</div>

Expand All @@ -100,7 +101,7 @@ <h3 class="s-results-title">{{{title}}}</h3>
</div>

<div class="row">
<div class="col-xs-10 col-xs-offset-1">
<div class="col-xs-12 col-xs-offset-1">
<ul class="list-inline just-authors s-results-authors" aria-label="authors">
{{#each authorFormatted}}
<li class="article-author">{{this}}</li>
Expand Down
4 changes: 3 additions & 1 deletion src/styles/sass/ads-sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ body {
&-content {
transition: opacity 0.6s ease, transform 0.6s ease;
&.full-width {
margin-left: -300px;
// margin-left: -300px;
display: block;
margin-left: 0;
}
}
}
Expand Down
Loading

0 comments on commit e873ca1

Please sign in to comment.