Skip to content

Commit

Permalink
Add button next to headline header to toggle between working title an…
Browse files Browse the repository at this point in the history
…d headline
  • Loading branch information
waisingyiu committed Feb 3, 2025
1 parent 5c883c6 commit ab4b27b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
8 changes: 7 additions & 1 deletion public/components/content-list/_content-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ $tableHeaderRowHeight: 48px;

&-icon {
&--presence,
&--assignee {
&--assignee,
&--headline-toggle {
display: inline-block;
}

Expand All @@ -149,6 +150,11 @@ $tableHeaderRowHeight: 48px;
height: $content-list-icon-size;
margin-top: 3px;
}
&--headline-toggle {
width: $content-list-icon-size;
height: $content-list-icon-size;
margin-right: 5px;
}
}

&--notifier {
Expand Down
4 changes: 3 additions & 1 deletion public/components/icons/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions public/components/icons/src/toggle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion public/lib/column-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ const createSortTemplate = (colName, sortField, labelHTML, flipSortIconDirection
`;
};

const createCustomHeadlineLabelHtml = () => {
return `
<i ng-click="console.log('test'); showHeadline = !showHeadline; console.log('showHeadline ' + showHeadline); $event.stopPropagation()"
title="Click to toggle Headlines"
class="content-list-head__heading-icon--headline-toggle" wf-icon="toggle"/>Working title / Headline
`;
};

export const getSortField = column => column
&& column.isSortable
&& (column.sortField || [column.name]);
Expand Down Expand Up @@ -105,7 +113,7 @@ const columnDefaults = [{
},{
name: 'titles',
prettyName: 'Working title / Headline',
labelHTML: 'Working title / Headline',
labelHTML: createCustomHeadlineLabelHtml(),
colspan: 1,
title: '',
templateUrl: templateRoot + 'title.html',
Expand Down

0 comments on commit ab4b27b

Please sign in to comment.