From bcd6c3060eedc596181cd5ab87ba711117f17942 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Wed, 12 Feb 2025 10:34:37 +0530 Subject: [PATCH] Updated the desing and optmized the modal code --- .../default/sass/controllers/_products.sass | 2 + .../controllers/products/configuration.tpl | 100 +++++++++--------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/admin/themes/default/sass/controllers/_products.sass b/admin/themes/default/sass/controllers/_products.sass index d9dcdc1dd..04a07cd8b 100644 --- a/admin/themes/default/sass/controllers/_products.sass +++ b/admin/themes/default/sass/controllers/_products.sass @@ -11,6 +11,8 @@ thead tr background-color: #f1f1f1 +.add_disable_date_row_container + margin-top: 5px #deactiveDatesModal .fc-popover-body .fc-daygrid-event-harness diff --git a/admin/themes/default/template/controllers/products/configuration.tpl b/admin/themes/default/template/controllers/products/configuration.tpl index 3bcadf771..00ee8be1d 100644 --- a/admin/themes/default/template/controllers/products/configuration.tpl +++ b/admin/themes/default/template/controllers/products/configuration.tpl @@ -321,39 +321,40 @@ - - - - + + + + + @@ -897,7 +898,7 @@ BulkUpdateRoomModal.hideErrors(); }, addNewRow: function() { - $('#bulkUpdateRoomModal tbody').append(this.disableDatesRowHtml); + $('#bulkUpdateRoomModal tbody').append(this.getDisableDatesRowHtml()); }, removeAllInvalidRowDataMarkers: function(tr) { $('#bulkUpdateRoomModal .room-disable-dates tr').css('outline', ''); @@ -983,22 +984,19 @@ }); } }, - disableDatesRowHtml: ` - - - - - - - - - - - - - - - `, + getDisableDatesRowHtml: function () { + let dateFromElem = $('').addClass('col-sm-2 center').append($('').attr('type', 'text').addClass('form-control disabled_date_from').prop('readonly', 'readonly')); + let dateToElem = $('').addClass('col-sm-2 center').append($('').attr('type', 'text').addClass('form-control disabled_date_to').prop('readonly', 'readonly')); + let reasonElem = $('').addClass('col-sm-6 center').append($('').attr('type', 'text').addClass('form-control room_disable_reason')); + let removeRowElem = $('').addClass('col-sm-1 center').append($('').attr('href', '#').addClass('remove-room-bulk-disable-dates-button btn btn-default').append($('').addClass('icon-trash'))); + let rowElem = $('').addClass('disabledDatesTr') + .append(dateFromElem) + .append(dateToElem) + .append(reasonElem) + .append(removeRowElem); + + return $(rowElem).prop('outerHTML'); + } }; // Init full calender object. @@ -1601,4 +1599,4 @@ } }); - \ No newline at end of file +