|
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <title>Countly Feedback Popup</title> |
5 | | - <link href="../../star-rating/stylesheets/ratings-iframe.css" rel="stylesheet"/> |
6 | | - <link href="../../stylesheets/font-awesome/css/font-awesome.min.css" rel="stylesheet"/> |
7 | | - <link href="../stylesheets/ionicons/css/ionicons.min.css" rel="stylesheet"/> |
| 5 | + <link href="<%= `${countlyPath}/star-rating/stylesheets/ratings-iframe.css` %>" rel="stylesheet"/> |
| 6 | + <link href="<%= `${countlyPath}/stylesheets/font-awesome/css/font-awesome.min.css` %>" rel="stylesheet"/> |
| 7 | + <link href="<%= `${countlyPath}/stylesheets/ionicons/css/ionicons.min.css` %>" rel="stylesheet"/> |
8 | 8 | <!-- TODO: check where are this themeFiles --> |
9 | 9 | <% if (themeFiles && themeFiles.css) { %> |
10 | 10 | <% for(var i=0, l=themeFiles.css.length; i < l; i++) {%> |
11 | 11 | <link href='<%= themeFiles.css[i]%>' rel='stylesheet' type='text/css'> |
12 | 12 | <% } %> |
13 | 13 | <% } %> |
14 | 14 | <meta content="width=device-width, initial-scale=1" name="viewport"> |
| 15 | + <style> |
| 16 | + .rating-emotion-emojis { |
| 17 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji.svg` %>'); |
| 18 | + } |
| 19 | + |
| 20 | + .rating-emotion-emojis1 { |
| 21 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_1.svg` %>'); |
| 22 | + } |
| 23 | + |
| 24 | + .rating-emotion-emojis2 { |
| 25 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_2.svg` %>'); |
| 26 | + } |
| 27 | + |
| 28 | + .rating-emotion-emojis3 { |
| 29 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_3.svg` %>'); |
| 30 | + } |
| 31 | + |
| 32 | + .rating-emotion-emojis4 { |
| 33 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_4.svg` %>'); |
| 34 | + } |
| 35 | + |
| 36 | + .rating-emotion-emojis5 { |
| 37 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_5.svg` %>'); |
| 38 | + } |
| 39 | + |
| 40 | + .rating-emotion-emojis-fill { |
| 41 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_filled.svg` %>'); |
| 42 | + } |
| 43 | + |
| 44 | + .rating-emotion-emojis1-fill { |
| 45 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_filled_1.svg` %>'); |
| 46 | + } |
| 47 | + |
| 48 | + .rating-emotion-emojis2-fill { |
| 49 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_filled_2.svg` %>'); |
| 50 | + } |
| 51 | + |
| 52 | + .rating-emotion-emojis3-fill { |
| 53 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_filled_3.svg` %>'); |
| 54 | + } |
| 55 | + |
| 56 | + .rating-emotion-emojis4-fill { |
| 57 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_filled_4.svg` %>'); |
| 58 | + } |
| 59 | + |
| 60 | + .rating-emotion-emojis5-fill { |
| 61 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/emoji_filled_5.svg` %>'); |
| 62 | + } |
| 63 | + |
| 64 | + .rating-emotion-thumbs { |
| 65 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/thumbs.svg` %>'); |
| 66 | + } |
| 67 | + |
| 68 | + .rating-emotion-thumbs-fill { |
| 69 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/thumbs_filled.svg` %>'); |
| 70 | + } |
| 71 | + |
| 72 | + .rating-emotion-stars { |
| 73 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/stars.svg` %>'); |
| 74 | + } |
| 75 | + |
| 76 | + .rating-emotion-stars-fill { |
| 77 | + background-image: url('<%= `${countlyPath}/star-rating/images/star-rating/stars_filled.svg` %>'); |
| 78 | + } |
| 79 | + </style> |
15 | 80 | </head> |
16 | | - <body class="ratings-popup cly-vue-ratings-preview"> |
| 81 | + <body class="ratings-popup cly-vue-ratings-preview" data-countly-path="<%= countlyPath %>"> |
17 | 82 | <div class="rating-loader-wrapper"> |
18 | 83 | <img |
19 | 84 | class="rating-loader" |
20 | | - src="../../star-rating/images/star-rating/loader.svg" |
| 85 | + src="<%= `${countlyPath}/star-rating/images/star-rating/loader.svg` %>" |
21 | 86 | /> |
22 | 87 | </div> |
23 | 88 | <div |
|
156 | 221 | > |
157 | 222 | <img |
158 | 223 | id="powered-by-countly" |
159 | | - src="../../star-rating/images/star-rating/powered-by-countly.svg" |
| 224 | + src="<%= `${countlyPath}/star-rating/images/star-rating/powered-by-countly.svg` %>" |
160 | 225 | > |
161 | 226 | </a> |
162 | 227 | </div> |
|
186 | 251 | > |
187 | 252 | <img |
188 | 253 | id="powered-by-countly" |
189 | | - src="../../star-rating/images/star-rating/powered-by-countly.svg" |
| 254 | + src="<%= `${countlyPath}/star-rating/images/star-rating/powered-by-countly.svg` %>" |
190 | 255 | > |
191 | 256 | </a> |
192 | 257 | </div> |
193 | 258 | </div> |
194 | | - <script src="../../star-rating/javascripts/tippy.all.min.js"></script> |
195 | | - <script src="../../javascripts/dom/jquery/jquery.js"></script> |
| 259 | + <script src="<%= `${countlyPath}/star-rating/javascripts/tippy.all.min.js` %>"></script> |
| 260 | + <script src="<%= `${countlyPath}/javascripts/dom/jquery/jquery.js` %>"></script> |
196 | 261 | <script> |
197 | 262 | var CLOSE_BUTTON_ID = '#close-btn'; |
198 | 263 | var WIDGET_BODY_FULLSCREEN_CLASS = 'modal-content--fullscreen'; |
|
291 | 356 | var widget_id = getParameterByName('widget_id'); |
292 | 357 | let widgetVersion = null; |
293 | 358 |
|
| 359 | + var countlyPath = $('body').data().countlyPath || ''; |
| 360 | + |
294 | 361 | if (!platform || (platform === "undefined") || (platform === "null")) { |
295 | 362 | platform = DEFAULT_PLATFORM; |
296 | 363 | } |
|
401 | 468 | } |
402 | 469 |
|
403 | 470 | if (response.globalLogo) { |
404 | | - $('#powered-by-countly').attr('src', url + response.logo); |
| 471 | + $('#powered-by-countly').attr('src', url + countlyPath + '/' + response.logo); |
405 | 472 | } |
406 | 473 | else { |
407 | | - $('#powered-by-countly').attr('src', url + '/star-rating/images/' + response.logo); |
| 474 | + $('#powered-by-countly').attr('src', url + countlyPath + '/star-rating/images/' + response.logo); |
408 | 475 | } |
409 | 476 |
|
410 | 477 | $('#powered-by-countly').parent().attr('href', 'void(0)'); |
|
437 | 504 | }); |
438 | 505 | }, |
439 | 506 | type: "GET", |
440 | | - url: url + "/o/feedback/widget" |
| 507 | + url: url + countlyPath + '/o/feedback/widget' |
441 | 508 | }); |
442 | 509 |
|
443 | 510 | var eventObject = { |
|
630 | 697 | }, 5000); |
631 | 698 | }, |
632 | 699 | type: "GET", |
633 | | - url: url + '/i/feedback/input?events=' + encodeURIComponent(JSON.stringify([eventObject])) + '&app_key=' + app_key + '&device_id=' + device_id + '&sdk_name=' + sdk_name + (sdk_version ? '&sdk_version=' + sdk_version : '') + '×tamp=' + Date.now() + '&hour=' + h + '&dow=' + dow + '&app_version=' + app_version |
| 700 | + url: url + countlyPath + '/i/feedback/input?events=' + encodeURIComponent(JSON.stringify([eventObject])) + '&app_key=' + app_key + '&device_id=' + device_id + '&sdk_name=' + sdk_name + (sdk_version ? '&sdk_version=' + sdk_version : '') + '×tamp=' + Date.now() + '&hour=' + h + '&dow=' + dow + '&app_version=' + app_version |
634 | 701 | }); |
635 | 702 | } |
636 | 703 |
|
|
0 commit comments