Guest User

Yardi CRM Flex - Attachments Fix

a guest
Jul 30th, 2025
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.37 KB | Fixit | 0 0
  1. // ==UserScript==
  2. // @name CRM Flex – fix Description / Attachment overflow
  3. // @namespace DIY Leasing Fixer
  4. // @version 1.0
  5. // @description Make “Description” and “Attachment” columns wrap instead of creating a horizontal scroll bar since Yardi devs don't care.
  6. // @match https://www.yardipcu.com/*/rescrm*
  7. // @grant GM_addStyle
  8. // ==/UserScript==
  9.  
  10. (() => {
  11. GM_addStyle(`
  12. /*/* --------------------------------------------------------
  13. HIGH-LEVEL TABLE SETTINGS
  14. ---------------------------------------------------------*/
  15. #form_filetable{
  16. table-layout: fixed !important; /* let column widths matter */
  17. width: 100% !important; /* keep table inside its panel */
  18. }
  19.  
  20. /* --------------------------------------------------------
  21. DESCRIPTION (class="desc")
  22. ---------------------------------------------------------*/
  23. #form_filetable td.desc,
  24. #form_filetable th.desc{
  25. max-width: 220px !important; /* tweak to taste */
  26. white-space: normal !important; /* wrap at spaces */
  27. word-break: break-word !important; /* …and inside long tokens */
  28. overflow-wrap: anywhere !important;
  29. }
  30.  
  31. /* --------------------------------------------------------
  32. ATTACHMENT (class="link")
  33. ---------------------------------------------------------*/
  34. #form_filetable td.link,
  35. #form_filetable th.link{
  36. max-width: 260px !important; /* tweak to taste */
  37. white-space: normal !important;
  38. word-break: break-word !important;
  39. overflow-wrap: anywhere !important;
  40. }
  41. /* make the <a> tag inside Attachment behave too */
  42. #form_filetable td.link a{
  43. word-break: break-word !important;
  44. overflow-wrap: anywhere !important;
  45. }
  46.  
  47. /* --------------------------------------------------------
  48. EDIT / DELETE – narrow & centre
  49. ---------------------------------------------------------*/
  50. #form_filetable td.edit,
  51. #form_filetable td.delete,
  52. #form_filetable th.edit,
  53. #form_filetable th.delete{
  54. width: 65px !important;
  55. text-align: center !important;
  56. } */
  57.  
  58. /* --------------------------------------------------------
  59. KILL ANY HORIZONTAL SCROLL ON THE GRID WRAPPER
  60. ---------------------------------------------------------*/
  61. div[id*="attachmentContainer"],
  62. div[id*="content"]{
  63. overflow-x: hidden !important;
  64. }
  65. /* --------------------------------------------------------
  66. NAME columns – make them skinnier
  67. (applies to every <td class="name"> & <th class="name">)
  68. ---------------------------------------------------------*/
  69. #form_filetable td.name,
  70. #form_filetable th.name{
  71. /* 1) tighten the space they’re allowed to take */
  72. max-width: 115px !important; /* tweak to taste */
  73. width: 115px !important;
  74.  
  75. /* 2) use the space efficiently: */
  76. white-space: nowrap !important; /* keep short items on one line */
  77. overflow: hidden !important; /* if it’s still too long… */
  78. text-overflow: ellipsis !important; /* …add … at the end */
  79.  
  80. /* 3) pull the text a tad closer to its neighbours */
  81. padding-left: 2px !important;
  82. padding-right: 2px !important;
  83. }
  84.  
  85. /* exception – the picture cell has no class="name" so no change is needed */
  86. /* HEADERS ---------------------------------------------------*/
  87. #form_filetable thead td:nth-child( 1){width: 4% !important;}
  88. #form_filetable thead td:nth-child( 2){width: 6% !important;}
  89. #form_filetable thead td:nth-child( 3){width: 1% !important;}
  90. #form_filetable thead td:nth-child( 4){width: 5% !important;}
  91. #form_filetable thead td:nth-child( 5){width: 1% !important;}
  92. #form_filetable thead td:nth-child( 6){width: 6% !important;}
  93. #form_filetable thead td:nth-child( 7){width: 1% !important;}
  94. #form_filetable thead td:nth-child( 8){width: 5% !important;}
  95. #form_filetable thead td:nth-child( 9){width: 1% !important;}
  96. #form_filetable thead td:nth-child(10){width: 7% !important;}
  97. #form_filetable thead td:nth-child(11){width: 1% !important;}
  98. #form_filetable thead td:nth-child(12){width: 15% !important;}
  99. #form_filetable thead td:nth-child(13){width: 1% !important;}
  100. #form_filetable thead td:nth-child(14){width:3.5% !important;}
  101. #form_filetable thead td:nth-child(15){width: 18% !important;}
  102. #form_filetable thead td:nth-child(16){width: 0% !important;}
  103. #form_filetable thead td:nth-child(17){width: 4% !important;}
  104. #form_filetable thead td:nth-child(18){width: 4% !important;}
  105.  
  106. /* BODY CELLS — mirror the same widths ----------------------*/
  107. #form_filetable tbody td:nth-child( 1){width: 2% !important;}
  108. #form_filetable tbody td:nth-child( 2){width: 6% !important;}
  109. #form_filetable tbody td:nth-child( 3){width: 1% !important;}
  110. #form_filetable tbody td:nth-child( 4){width: 5% !important;}
  111. #form_filetable tbody td:nth-child( 5){width: 1% !important;}
  112. #form_filetable tbody td:nth-child( 6){width: 6% !important;}
  113. #form_filetable tbody td:nth-child( 7){width: 1% !important;}
  114. #form_filetable tbody td:nth-child( 8){width: 5% !important;}
  115. #form_filetable tbody td:nth-child( 9){width: 1% !important;}
  116. #form_filetable tbody td:nth-child(10){width: 7% !important;}
  117. #form_filetable tbody td:nth-child(11){width: 1% !important;}
  118. #form_filetable tbody td:nth-child(12){width: 15% !important;}
  119. #form_filetable tbody td:nth-child(13){width: 1% !important;}
  120. #form_filetable tbody td:nth-child(14){width:3.5% !important;}
  121. #form_filetable tbody td:nth-child(15){width: 20% !important;}
  122. #form_filetable tbody td:nth-child(16){width: 1% !important;}
  123. #form_filetable tbody td:nth-child(17){width: 4% !important;}
  124. #form_filetable tbody td:nth-child(18){width: 4% !important;}
  125.  
  126. /* Let long words wrap so no horizontal scrollbar appears ---*/
  127. #form_filetable td.desc,
  128. #form_filetable td.link{
  129. white-space: normal !important; /* break the line */
  130. word-break: break-all !important; /* break long token */
  131. `);
  132. })();
  133.  
Advertisement
Add Comment
Please, Sign In to add comment