Forum Stats

  • 3,757,785 Users
  • 2,251,265 Discussions
  • 7,869,915 Comments

Discussions

Issue after lux upgrade from 4.1.0 to 9.1.0

User_XQLJ4
User_XQLJ4 Member Posts: 4 Employee

Hi,

We have a web module based on lux. Current version is Lux 4.1.0. Last update was done long back. We observed that dialog box opens and closes within seconds without any user interaction. We are guessing upgrade is the issue could anyone please provide solution to this problem

below is the code snippet

Dialog box code snippet:

 calling function

---------------


  self.updateApiStatus = function(api, status) {

   var pmname = $.sessionStorage.get('pm.name');

   var pmpwd = outil.decodeAES($.sessionStorage.get('pm.mimakey'));

   outil.openConfirm('Confirmation',

       'You are attempting to change api status from ' + api.status + ' to ' + status,

       function(){

      var updateApiStatusObj = {

        apiName: api.apiId,

apiVersion: api.apiVersion,

        status: status

      };

      var formData = {updateApiStatus:updateApiStatusObj};

      if(window.console)console.log("updateApiStatus request:", JSON.stringify(formData));

      $.ajax({

       url : outil.convertProxyUrl("/prm_pm_rest/services/prm_pm/services/partner_manager/api/PartnerManagerApi/updateApiStatus"),

       type: "POST",

       data : JSON.stringify(formData),

       dataType : 'json',

       timeout : 10000,

       contentType : 'application/json',

       mimeType : 'application/json',

       //username : pmname,

       //password : pmpwd,

       headers: outil.makeAuthorizationHeader("Basic " + outil.base64.encode(pmname + ":" + pmpwd)),

       success: function(data, textStatus, jqXHR){

        var page=$(".oj-selected").attr("data-oj-pagenum");

        if(page==0)

        {

          self.refreshTable();

        }else{

          self.refreshTable();

           setTimeout("$('#paging-top').ojPagingControl( 'page', "+page+" )",50);

        }

       },

       error: function (jqXHR, textStatus, errorThrown) {

        if(window.console)console.log("API update life cycle failed.", jqXHR); 

        outil.openAlert("Error", "API update life cycle failed. " + outil.getReasonFromErrRespTxt(jqXHR.responseText));

       }

      });

     });

  }


called function

openConfirm: function(title, info, callback, type) {

                      if(type != 'info' && type != 'success' && type != 'warning' && type != 'error'){

                             type = 'info';

                      }

type = 'modal-'+type;

 var $confirmDiv = $('<div>', {'id': 'confirm'+divId, 'title': title});

   $(['<div class="oj-dialog-body">','<p>', info, '</p>','</br>','</div>'].join('')).appendTo($confirmDiv);

   var $confirmFooterDiv=$('<div>', {'class': 'oj-dialog-footer'});

   var $endButton=$('<button>', {'id': 'endButton'+divId,'text':'OK'});

   var $cancelButton=$('<button>', {'id': 'cancelButton'+divId,'text':'Cancel'});

   $confirmFooterDiv.append($endButton).append($cancelButton).appendTo($confirmDiv);

    $confirmDiv.ojDialog({

    initialVisibility: 'show',

    modality: "modalless",

    width: 500,

    height: 250,

    position: {

     my: "center center",

     at: "top+40%",

     of: window

    },

    });


   $confirmDiv.ojDialog( "open" );

   $confirmDiv.parent().parent(".oj-dialog-layer").css("height", "0px");

   $("#endButton"+divId).click(function() {

       $confirmDiv.ojDialog("close");

       callback();

      });

   $("#cancelButton"+divId).click(function() {

       $confirmDiv.ojDialog("close");

      });

    divId++;   

Tagged:

Answers