Skip to content

Commit

Permalink
Adds level sort to feature table (#2053)
Browse files Browse the repository at this point in the history
* Adds level sort to feature table

* Adds new POI DC check fields.

These fields are optional and do not block submissions nor apply to old
POIs.

This commit also adds some new flex utilities present in Bootstrap 4/5
but not in 3 and they're really nice.

This commit also redoes the Wealth Quick Spend to use these new
utilities.

POI DC checks can be set to any text and number value, but the skill
autopopulates the basic skills and stats.

* Fixes merge issue

* Addresses PR comment
  • Loading branch information
Sonictherocketman committed Nov 3, 2021
1 parent 7edbe94 commit e90fa38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/charactersheet/viewmodels/character/features/index.html
Expand Up @@ -7,6 +7,10 @@
<span class="clickable">Feature</span>
<span data-bind="css: sortArrow('name')"></span>
</th>
<th class="col-xs-4" data-bind="click: function(){sortBy('level');}">
<span class="clickable">Level</span>
<span data-bind="css: sortArrow('level')"></span>
</th>
<th class="col-xs-4" data-bind="click: function(){sortBy('characterClass');}">
<span class="clickable">Class</span>
<span data-bind="css: sortArrow('characterClass')"></span>
Expand All @@ -31,10 +35,10 @@
<span data-bind="text: $component.shortText(name)"></span>
</td>
<td>
<span data-bind="text: $component.shortText(characterClass)"></span>
<span class="text-muted"
data-bind="text:`(Level ${level()})`"></span>
<span data-bind="text: level"></span>
</td>
<td>
<span data-bind="text: $component.shortText(characterClass)"></span>
<td class="col-xs-1 text-right">
<span data-toggle="collapse"
data-bind="attr:{'data-target': `#feature_list_${uuid()}`}"
Expand Down
4 changes: 3 additions & 1 deletion src/charactersheet/viewmodels/character/features/index.js
Expand Up @@ -24,7 +24,9 @@ export class FeaturesViewModel extends AbstractTabularViewModel {
return {
...super.sorts(),
'characterClass asc': { field: 'characterClass', direction: 'asc'},
'characterClass desc': { field: 'characterClass', direction: 'desc'}
'characterClass desc': { field: 'characterClass', direction: 'desc'},
'level asc': { field: 'level', direction: 'asc'},
'level desc': { field: 'level', direction: 'desc'},
};
}
}
Expand Down
1 change: 0 additions & 1 deletion src/style/site.css
Expand Up @@ -2087,7 +2087,6 @@ tr .panel {
background-color: #fff;
}

<<<<<<< HEAD
/* Fix for BS 3 selects as input-group-btn */
.input-group-btn>select.form-control {
padding: 2px;
Expand Down

0 comments on commit e90fa38

Please sign in to comment.