| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,8 +9,6 @@ import { stickyMpu, stickyCommentsMpu } from 'commercial/modules/sticky-mpu'; | |||
| 9 | 9 | import { applyCreativeTemplate } from 'commercial/modules/dfp/apply-creative-template'; | |
| 10 | 10 | import { renderAdvertLabel } from 'commercial/modules/dfp/render-advert-label'; | |
| 11 | 11 | import { geoMostPopular } from 'common/modules/onward/geo-most-popular'; | |
| 12 | - import { Toggles } from 'common/modules/ui/toggles'; | ||
| 13 | - import { recordUserAdFeedback } from 'commercial/modules/user-ad-feedback'; | ||
| 14 | 12 | import type { SlotRenderEndedEvent } from 'commercial/types'; | |
| 15 | 13 | /** | |
| 16 | 14 | * ADVERT RENDERING | |
@@ -199,46 +197,8 @@ export const renderAdvert = ( | |||
| 199 | 197 | }) | |
| 200 | 198 | : Promise.resolve(); | |
| 201 | 199 | ||
| 202 | - const addFeedbackDropdownToggle = () => | ||
| 203 | - isRendered | ||
| 204 | - ? fastdom.write(() => { | ||
| 205 | - if ( | ||
| 206 | - !advert.node.classList.contains('js-toggle-ready') | ||
| 207 | - ) { | ||
| 208 | - const toggles = new Toggles(advert.node); | ||
| 209 | - toggles.init(); | ||
| 210 | - } | ||
| 211 | - }) | ||
| 212 | - : Promise.resolve(); | ||
| 213 | - | ||
| 214 | - const applyFeedbackOnClickListeners = () => { | ||
| 215 | - const readyClass = 'js-onclick-ready'; | ||
| 216 | - return isRendered | ||
| 217 | - ? fastdom.write(() => { | ||
| 218 | - qwery( | ||
| 219 | - '.js-ad-feedback-option:not(.js-onclick-ready)' | ||
| 220 | - ).forEach(el => { | ||
| 221 | - const slotId = el.getAttribute('data-slot'); | ||
| 222 | - const problem = el.getAttribute('data-problem'); | ||
| 223 | - | ||
| 224 | - el.addEventListener('click', () => { | ||
| 225 | - recordUserAdFeedback( | ||
| 226 | - window.location.pathname, | ||
| 227 | - slotId, | ||
| 228 | - slotRenderEndedEvent, | ||
| 229 | - problem | ||
| 230 | - ); | ||
| 231 | - }); | ||
| 232 | - el.classList.add(readyClass); | ||
| 233 | - }); | ||
| 234 | - }) | ||
| 235 | - : Promise.resolve(); | ||
| 236 | - }; | ||
| 237 | - | ||
| 238 | 200 | return callSizeCallback() | |
| 239 | 201 | .then(() => renderAdvertLabel(advert.node)) | |
| 240 | - .then(addFeedbackDropdownToggle) | ||
| 241 | - .then(applyFeedbackOnClickListeners) | ||
| 242 | 202 | .then(addRenderedClass) | |
| 243 | 203 | .then(() => isRendered); | |
| 244 | 204 | }) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,16 +50,6 @@ | |||
| 50 | 50 | border-top-color: $brightness-20; | |
| 51 | 51 | background-color: transparent; | |
| 52 | 52 | } | |
| 53 | - | ||
| 54 | - &.feedback-submitted .ad-feedback, | ||
| 55 | - .ad-feedback__thanks-message { | ||
| 56 | - display: none; | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - &.feedback-submitted .ad-feedback__thanks-message { | ||
| 60 | - display: inline-block; | ||
| 61 | - float: right; | ||
| 62 | - } | ||
| 63 | 53 | } | |
| 64 | 54 | ||
| 65 | 55 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -234,80 +234,3 @@ $control-offset: 36 + $gs-gutter/2; | |||
| 234 | 234 | margin-bottom: -1px; | |
| 235 | 235 | } | |
| 236 | 236 | } | |
| 237 | - | ||
| 238 | - /* Ad feedback menu | ||
| 239 | - ========================================================================== */ | ||
| 240 | - .ad-feedback.popup__toggle { | ||
| 241 | - display: inline-block; | ||
| 242 | - cursor: pointer; | ||
| 243 | - | ||
| 244 | - &::after { | ||
| 245 | - border-top-color: $brightness-46; | ||
| 246 | - border-bottom-color: $brightness-46; | ||
| 247 | - } | ||
| 248 | - | ||
| 249 | - &::before { | ||
| 250 | - display: none; | ||
| 251 | - } | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - .ad-feedback.popup { | ||
| 255 | - width: 240px; | ||
| 256 | - top: 100%; | ||
| 257 | - border: 1px solid $brightness-86; | ||
| 258 | - z-index: $zindex-overlay; | ||
| 259 | - padding: 0; | ||
| 260 | - ul { | ||
| 261 | - margin: 0; | ||
| 262 | - } | ||
| 263 | - li.popup__item::before { | ||
| 264 | - content: none; | ||
| 265 | - } | ||
| 266 | - .popup__group-header { | ||
| 267 | - padding-bottom: $gs-baseline/2; | ||
| 268 | - } | ||
| 269 | - .popup__item--option { | ||
| 270 | - position: relative; | ||
| 271 | - border-top: 1px solid $brightness-86; | ||
| 272 | - > button { | ||
| 273 | - cursor: pointer; | ||
| 274 | - padding: 0 $gs-gutter/2; | ||
| 275 | - width: 100%; | ||
| 276 | - border: 0; | ||
| 277 | - background: transparent; | ||
| 278 | - text-align: left; | ||
| 279 | - &:focus, &:hover { | ||
| 280 | - background: $brightness-86; | ||
| 281 | - } | ||
| 282 | - } | ||
| 283 | - } | ||
| 284 | - | ||
| 285 | - .ad-slot--dark & { | ||
| 286 | - background: $brightness-7; | ||
| 287 | - border-color: $brightness-7; | ||
| 288 | - color: $brightness-86; | ||
| 289 | - .popup__group-header { | ||
| 290 | - color: $brightness-86; | ||
| 291 | - } | ||
| 292 | - .popup__item--option { | ||
| 293 | - border-top-color: $brightness-7; | ||
| 294 | - > button:hover { | ||
| 295 | - background: $brightness-7; | ||
| 296 | - } | ||
| 297 | - } | ||
| 298 | - } | ||
| 299 | - | ||
| 300 | - .fc-container .ad-slot--container-inline & { | ||
| 301 | - @include mq($until: tablet) { | ||
| 302 | - top: -$gs-gutter/2; | ||
| 303 | - left: $gs-gutter/2; | ||
| 304 | - } | ||
| 305 | - } | ||
| 306 | - .fc-slice__popular-mpu & { | ||
| 307 | - @include mq($until: desktop) { | ||
| 308 | - top: -$gs-gutter/2; | ||
| 309 | - left: $gs-gutter/2; | ||
| 310 | - } | ||
| 311 | - } | ||
| 312 | - | ||
| 313 | - } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments