|
74 | 74 | </span> |
75 | 75 | </header> |
76 | 76 | <section id="DashboardScroller" class="sidebyside-scrollable"> |
77 | | - <template |
78 | | - v-for="entry of data.entries" |
79 | | - :key="'template-' + entry.xpstrid" |
80 | | - > |
81 | | - <template v-if="anyCatIsShown(entry.cats)"> |
82 | | - <p |
83 | | - v-if="!(hideChecked && entry.checked)" |
84 | | - :key="'dash-item-' + entry.xpstrid" |
85 | | - :id="'dash-item-' + entry.xpstrid" |
86 | | - :class=" |
87 | | - 'dash-' + (lastClicked === entry.xpstrid ? ' last-clicked' : '') |
88 | | - " |
89 | | - > |
90 | | - <span class="dashEntry"> |
91 | | - <a |
92 | | - v-bind:href="getLink(locale, entry)" |
93 | | - @click="() => setLastClicked(entry.xpstrid)" |
94 | | - > |
95 | | - <span v-bind:key="cat" v-for="cat of entry.cats"> |
| 77 | + <template v-if="updatingVisibility"> |
| 78 | + <a-spin delay="1000" size="large" /> |
| 79 | + </template> |
| 80 | + <template v-else> |
| 81 | + <template |
| 82 | + v-for="entry of data.entries" |
| 83 | + :key="'template-' + entry.xpstrid" |
| 84 | + > |
| 85 | + <template v-if="anyCatIsShown(entry.cats)"> |
| 86 | + <p |
| 87 | + v-if="!(hideChecked && entry.checked)" |
| 88 | + :key="'dash-item-' + entry.xpstrid" |
| 89 | + :id="'dash-item-' + entry.xpstrid" |
| 90 | + :class=" |
| 91 | + 'dash-' + |
| 92 | + (lastClicked === entry.xpstrid ? ' last-clicked' : '') |
| 93 | + " |
| 94 | + > |
| 95 | + <span class="dashEntry"> |
| 96 | + <a |
| 97 | + v-bind:href="getLink(locale, entry)" |
| 98 | + @click="() => setLastClicked(entry.xpstrid)" |
| 99 | + > |
| 100 | + <span v-bind:key="cat" v-for="cat of entry.cats"> |
| 101 | + <span |
| 102 | + v-if="!catIsHidden[cat]" |
| 103 | + class="category" |
| 104 | + :title="describeAbbreviation(cat)" |
| 105 | + >{{ abbreviate(cat) }}</span |
| 106 | + > |
| 107 | + </span> |
| 108 | + <span class="section-page" title="section—page">{{ |
| 109 | + humanize(entry.section + "—" + entry.page) |
| 110 | + }}</span> |
| 111 | + | |
96 | 112 | <span |
97 | | - v-if="!catIsHidden[cat]" |
98 | | - class="category" |
99 | | - :title="describeAbbreviation(cat)" |
100 | | - >{{ abbreviate(cat) }}</span |
| 113 | + v-if="entry.header" |
| 114 | + class="entry-header" |
| 115 | + title="entry header" |
| 116 | + >{{ entry.header }}</span |
101 | 117 | > |
102 | | - </span> |
103 | | - <span class="section-page" title="section—page">{{ |
104 | | - humanize(entry.section + "—" + entry.page) |
105 | | - }}</span> |
106 | | - | |
107 | | - <span |
108 | | - v-if="entry.header" |
109 | | - class="entry-header" |
110 | | - title="entry header" |
111 | | - >{{ entry.header }}</span |
112 | | - > |
113 | | - | |
114 | | - <span class="code" title="code">{{ entry.code }}</span> |
115 | | - | |
116 | | - <cldr-value |
117 | | - class="previous-english" |
118 | | - title="previous English" |
119 | | - lang="en" |
120 | | - dir="ltr" |
121 | | - v-if="entry.previousEnglish" |
122 | | - >{{ entry.previousEnglish }} →</cldr-value |
123 | | - > |
124 | | - <cldr-value |
125 | | - class="english" |
126 | | - lang="en" |
127 | | - dir="ltr" |
128 | | - title="English" |
129 | | - v-if="entry.english" |
130 | | - >{{ entry.english }}</cldr-value |
131 | | - > |
132 | | - | |
133 | | - <cldr-value |
134 | | - v-if="entry.winning" |
135 | | - class="winning" |
136 | | - title="Winning" |
137 | | - >{{ entry.winning }}</cldr-value |
138 | | - > |
139 | | - <template v-if="entry.comment"> |
140 | 118 | | |
141 | | - <span v-html="entry.comment" title="comment"></span> |
142 | | - </template> |
143 | | - <span v-if="entry.cats.has('Reports')" |
144 | | - >{{ humanizeReport(entry.code) }} Report</span |
145 | | - > |
146 | | - </a> |
147 | | - </span> |
148 | | - <input |
149 | | - v-if="canBeHidden(entry.cats)" |
150 | | - type="checkbox" |
151 | | - class="right-control" |
152 | | - title="You can hide checked items with the hide checkbox above" |
153 | | - v-model="entry.checked" |
154 | | - @change=" |
155 | | - (event) => { |
156 | | - entryCheckmarkChanged(event, entry); |
157 | | - } |
158 | | - " |
159 | | - /> |
160 | | - </p> |
| 119 | + <span class="code" title="code">{{ entry.code }}</span> |
| 120 | + | |
| 121 | + <cldr-value |
| 122 | + class="previous-english" |
| 123 | + title="previous English" |
| 124 | + lang="en" |
| 125 | + dir="ltr" |
| 126 | + v-if="entry.previousEnglish" |
| 127 | + >{{ entry.previousEnglish }} →</cldr-value |
| 128 | + > |
| 129 | + <cldr-value |
| 130 | + class="english" |
| 131 | + lang="en" |
| 132 | + dir="ltr" |
| 133 | + title="English" |
| 134 | + v-if="entry.english" |
| 135 | + >{{ entry.english }}</cldr-value |
| 136 | + > |
| 137 | + | |
| 138 | + <cldr-value |
| 139 | + v-if="entry.winning" |
| 140 | + class="winning" |
| 141 | + title="Winning" |
| 142 | + >{{ entry.winning }}</cldr-value |
| 143 | + > |
| 144 | + <template v-if="entry.comment"> |
| 145 | + | |
| 146 | + <span v-html="entry.comment" title="comment"></span> |
| 147 | + </template> |
| 148 | + <span v-if="entry.cats.has('Reports')" |
| 149 | + >{{ humanizeReport(entry.code) }} Report</span |
| 150 | + > |
| 151 | + </a> |
| 152 | + </span> |
| 153 | + <input |
| 154 | + v-if="canBeHidden(entry.cats)" |
| 155 | + type="checkbox" |
| 156 | + class="right-control" |
| 157 | + title="You can hide checked items with the hide checkbox above" |
| 158 | + v-model="entry.checked" |
| 159 | + @change=" |
| 160 | + (event) => { |
| 161 | + entryCheckmarkChanged(event, entry); |
| 162 | + } |
| 163 | + " |
| 164 | + /> |
| 165 | + </p> |
| 166 | + </template> |
161 | 167 | </template> |
| 168 | + <p class="bottom-padding">...</p> |
162 | 169 | </template> |
163 | | - <p class="bottom-padding">...</p> |
164 | 170 | </section> |
165 | 171 | </template> |
166 | 172 | </nav> |
@@ -190,6 +196,7 @@ export default { |
190 | 196 | level: null, |
191 | 197 | downloadMessage: null, |
192 | 198 | catIsHidden: {}, |
| 199 | + updatingVisibility: false, |
193 | 200 | }; |
194 | 201 | }, |
195 | 202 |
|
@@ -366,7 +373,16 @@ export default { |
366 | 373 | // the user may click again thinking the first click wasn't recognized. Postponing |
367 | 374 | // the DOM update of thousands of rows ensures that the header checkbox updates |
368 | 375 | // without delay. |
369 | | - setTimeout(() => (this.catIsHidden[category] = !event.target.checked), 0); |
| 376 | + this.updatingVisibility = true; |
| 377 | + setTimeout( |
| 378 | + () => this.updateVisibility(event.target.checked, category), |
| 379 | + 0 |
| 380 | + ); |
| 381 | + }, |
| 382 | +
|
| 383 | + updateVisibility(checked, category) { |
| 384 | + this.catIsHidden[category] = !checked; |
| 385 | + this.updatingVisibility = false; |
370 | 386 | }, |
371 | 387 |
|
372 | 388 | canBeHidden(cats) { |
|
0 commit comments