ripple-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arzhan Kinzhalin (JIRA)" <>
Subject [jira] [Created] (RIPPLE-85) notifications: button index is incremented twice
Date Fri, 15 May 2015 04:26:59 GMT
Arzhan Kinzhalin created RIPPLE-85:

             Summary: notifications: button index is incremented twice
                 Key: RIPPLE-85
             Project: Apache Ripple
          Issue Type: Bug
            Reporter: Arzhan Kinzhalin

    btnArray.forEach(function(btnLabel,index) {
        var button = {};
        button["text"] = btnLabel;
        button["click"] = function () {
            if(resultCallback !== typeof "undefined")
            jQuery( this ).dialog( "close" );
        var callback = resultCallback && function(r) {

        notifications.confirmNotification(message, callback, title, buttonLabels);
The latter calls the former and in both cases the index is adjusted to be 1-based instead
of 0-based.

Also, the check {{if(resultCallback !== typeof "undefined")}} does not make any sense: it
ensures {{resultCallback}} is not a string {{"string"}}. Should be just {{typeof resultCalback
!== "undefined"}}.

This message was sent by Atlassian JIRA

View raw message