diff --git a/plugins/star-rating/api/api.js b/plugins/star-rating/api/api.js index c4e0f7480a4..cb14fcee750 100644 --- a/plugins/star-rating/api/api.js +++ b/plugins/star-rating/api/api.js @@ -474,7 +474,7 @@ function uploadFile(myfile, id, callback) { params.app_user = params.app_user || {}; var user = JSON.parse(JSON.stringify(params.app_user)); - common.db.collection('feedback_widgets').find({"app_id": params.app_id + "", "status": true, type: "rating"}, {_id: 1, popup_header_text: 1, cohortID: 1, type: 1, appearance: 1, showPolicy: 1, trigger_position: 1, hide_sticker: 1, trigger_bg_color: 1, trigger_font_color: 1, trigger_button_text: 1, trigger_size: 1, target_pages: 1}).toArray(function(err, widgets) { + common.db.collection('feedback_widgets').find({"app_id": params.app_id + "", "status": true, type: "rating"}, {_id: 1, popup_header_text: 1, cohortID: 1, type: 1, appearance: 1, showPolicy: 1, trigger_position: 1, hide_sticker: 1, trigger_bg_color: 1, trigger_font_color: 1, trigger_button_text: 1, trigger_size: 1, target_pages: 1, wv: 1}).toArray(function(err, widgets) { if (err) { log.e(err); reject(err); @@ -492,6 +492,7 @@ function uploadFile(myfile, id, callback) { } widget.tg = widget.target_pages; widget.name = widget.popup_header_text; + widget.wv = widget.wv?.toString() || null; // remove this props from response delete widget.hide_sticker; delete widget.trigger_position; @@ -565,6 +566,11 @@ function uploadFile(myfile, id, callback) { phone: true, tablet: true }; + /** + * NOTE: This property is used to help SDK identify if the widget has the new handling for close button and + * allows widget to be fullscreen. Since the server will support this from here on, it can be hardcoded. + */ + widget.wv = 1; //widget.created_by = common.db.ObjectID(obParams.member._id); validateCreate(obParams, FEATURE_NAME, function(params) { diff --git a/plugins/star-rating/frontend/public/stylesheets/ratings-iframe.scss b/plugins/star-rating/frontend/public/stylesheets/ratings-iframe.scss index 99260c47082..56436bb3291 100644 --- a/plugins/star-rating/frontend/public/stylesheets/ratings-iframe.scss +++ b/plugins/star-rating/frontend/public/stylesheets/ratings-iframe.scss @@ -5,12 +5,13 @@ .ratings-popup .modal-content { .hidden { display: none; -} + } -.disabled { + .disabled { cursor: auto !important; opacity: 0.5; -} + } + border-radius: 13px; background-color: white; padding: 0px 25px 40px 25px; @@ -31,6 +32,17 @@ cursor: pointer; } } + + /* .ratings-popup .modal-content--fullscreen */ + &--fullscreen { + margin: 40px 0; + height: calc(100vh - 100px); + + /* .ratings-popup--fullscreen .modal-content__top */ + &__top { + margin-top: 0px; + } + } } .ratings-popup .emotions-area { @@ -228,4 +240,4 @@ .rating-loader-wrapper .rating-loader { width: 50px; -} \ No newline at end of file +} diff --git a/plugins/star-rating/frontend/public/templates/feedback-popup.html b/plugins/star-rating/frontend/public/templates/feedback-popup.html index b10699659dc..9850ce8c8dd 100644 --- a/plugins/star-rating/frontend/public/templates/feedback-popup.html +++ b/plugins/star-rating/frontend/public/templates/feedback-popup.html @@ -1,546 +1,707 @@ - - - Countly Feedback Popup - - - - - <% if (themeFiles && themeFiles.css) { %> - <% for(var i=0, l=themeFiles.css.length; i < l; i++) {%> - - <% } %> - <% } %> - - - - -
- -
-