Last active
March 14, 2019 20:47
-
-
Save gfrice/34e30f0e53a0b81cc10a8ad9d467d131 to your computer and use it in GitHub Desktop.
Yearbook Order List View Formatting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", | |
"hideListHeader": true, | |
"hideSelection": true, | |
"rowFormatter": { | |
"elmType": "button", | |
"customRowAction": { | |
"action": "defaultClick" | |
}, | |
"attributes": { | |
"class": "ms-bgColor-white ms-bgColor-themeLight--hover" | |
}, | |
"style": { | |
"width": "100%", | |
"margin": "2px 0", | |
"padding": 0, | |
"border": "none", | |
"cursor": "pointer" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-borderColor-themePrimary ms-bgColor-themePrimary" | |
}, | |
"style": { | |
"min-width": "220px", | |
"display": "flex", | |
"border-width": "1px", | |
"border-style": "solid", | |
"box-sizing": "border-box", | |
"align-items": "center" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"iconName": "=if([$status] == 'processing', 'Processing')", | |
"class": "ms-fontSize-su ms-fontWeight-regular ms-fontColor-white", | |
"title": "[$status]" | |
}, | |
"style": { | |
"flex": "none", | |
"padding": "12px", | |
"padding-left": "18px", | |
"height": "42px" | |
} | |
}, | |
{ | |
"elmType": "div", | |
"style": { | |
"flex-grow": "1", | |
"text-align": "left", | |
"max-width": "140px" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-semibold ms-fontColor-white", | |
"title": "=toLocaleDateString([$Modified])" | |
}, | |
"style": { | |
"margin-right": "12px", | |
"overflow": "hidden", | |
"white-space": "nowrap", | |
"text-transform": "Capitalize" | |
}, | |
"txtContent": "=toLocaleDateString([$Modified])" | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontSize-l ms-fontWeight-semibold ms-fontColor-white", | |
"title": "[$status]" | |
}, | |
"style": { | |
"margin-right": "12px", | |
"overflow": "hidden", | |
"white-space": "nowrap", | |
"text-transform": "Capitalize" | |
}, | |
"txtContent": "[$status]" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"elmType": "div", | |
"attributes": { | |
"class": "ms-fontColor-themePrimary ms-borderColor-themePrimary ms-fontWeight-semibold ms-fontSize-l" | |
}, | |
"style": { | |
"border-width": "3px", | |
"border-style": "solid", | |
"box-sizing": "border-box", | |
"width": "100%", | |
"text-align": "left", | |
"padding": "21px 12px", | |
"overflow": "hidden" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"txtContent": "[$Title]", | |
"style": { | |
"height": "24px", | |
"text-transform": "capitalize" | |
}, | |
"attributes": { | |
"title": "[$Title]" | |
} | |
} | |
] | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", | |
"additionalRowClass": "=if([$status] == 'processing', 'sp-field-severity--severeWarning', if([$status] == 'completed', 'sp-field-severity--good',''))" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment