123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Controls;
- (function (Controls) {
- let ItemDetails;
- (function (ItemDetails) {
- class ItemsCarousel extends Unibase.Platform.Core.BaseComponent {
- constructor() {
- super(...arguments);
- this.appsHtml = '';
- this.IsAppRefresh = false;
- }
- jsFiles() {
- return ['apps/transact/controls/itemdetails/itemscarousel.js'];
- }
- cssFiles() {
- return [];
- }
- html(id, containerid) {
- var instance = this;
- let html = ` <div id="img-modal" class="modal-content h-100">
-
- <div class="modal-header pa-10"> <strong class="modal-title biz-highlight-bg-color" id="imagegalleryheading">Items</strong>
- <div class="d-flex align-items-center justify-content-between">
-
- <div> </div>
- </div>
- <div id="divEditFiltersErrMsg" class="form-error-message"></div>
- </div>
- <div class="modal-body simple-scroll-bar edit-filters-body py-0 bg-cyan-light-5">
- <div class="d-flex" id="galleryheightmodel" style="gap: 10px;align-items: center;height:80vh">
- <a style="opacity: 1; width:20px; " class="carousel-control-prev position-static" href="#carouselExampleControls" role="button"
- data-slide="prev"> <span style="background-image: none;" class="carousel-control-prev-icon"
- aria-hidden="true"> <i class="fa fa-angle-double-left " style=" color: black; font-size: 34px; "></i>
- </span> <span class="preImgHandler sr-only">Previous</span> </a>
- <div class="card bg-transparent border-0 shadow-none" id="staticFiltersCard" style="
- flex-grow: 1;
- ">
- <div id="carouselExampleControls" data-interval="2000" class="carousel slide-fade" data-ride="carousel">
- <div class="carousel-inner" style="padding:10px "> </div>
- </div>
- </div>
- <a style="opacity: 1;width: 20px;" class="carousel-control-next position-static" href="#carouselExampleControls" role="button"
- data-slide="next"> <span style="background-image: none;" class="carousel-control-next-icon"
- aria-hidden="true"> <i class="fa fa-angle-double-right" style=" color: black; font-size: 34px;"></i>
- </span> <span class="sr-only ">Next</span> </a>
- </div>
- </div>
-
- <div class="modal-footer pa-10"> <button type="button"
- onclick="Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp()" id="btn_CloseForm_${id}"
- class="btn btn-light btn-sm mr-auto">Close</button>
-
-
- </div>
- </div>`;
- return html;
- }
- load(id, containerid, callback) {
- var instance = this;
- instance.carouselModel(id);
- $('.carousel').carousel({
- interval: 2000,
- wrap: false,
- });
- }
- carouselModel(id) {
- var instance = this;
- instance.fileCacheHelper.loadJsFile("platform/files/managers/filemanager.js", function () {
- Unibase.Platform.Files.Managers.FileManager.Instance().getDocumentByRefIdApi(id).then(function (response) {
- var document = response.result.sort().reverse();
- var documentfiles = response.result.map(x => x.DocumentFiles);
- let html = '';
- for (let i = 0; i < documentfiles.length; i++) {
- if (documentfiles[i].length > 0) {
- let DocumentFilePath = documentfiles[i][0].DocumentFilePath;
- if (i == 0) {
- html = `<div style = "max-height: 100vh !important" class="carousel-item active" >
- <img class="mh-100 mw-100 w-100" src = "${DocumentFilePath}" alt = "image not found" onerror = "ReloadImage(event)" data-dynamic="1" data-loaded="0"></div>`;
- }
- else {
- html = `<div style = "max-height: 100vh !important" class="carousel-item" >
- <img class="mh-100 mw-100 w-100" src="${DocumentFilePath}" alt="image not found" onerror = "ReloadImage(event)" data-dynamic="1" data-loaded="0"></div>`;
- }
- $(".carousel-inner").append(html);
- if (i == documentfiles.length - 1) {
- return;
- }
- ;
- }
- }
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new ItemsCarousel();
- return this._instance;
- }
- }
- ItemDetails.ItemsCarousel = ItemsCarousel;
- })(ItemDetails = Controls.ItemDetails || (Controls.ItemDetails = {}));
- })(Controls = Transact.Controls || (Transact.Controls = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|