KnockoutJS对话框

时间:2016-10-26 13:14:55

标签: javascript jquery knockout.js

大家好,我有一个问题。我有敲除JS和java的应用程序,当我点击一个图标打开一个对话框表单时,它没有打开。 js的代码是:

this.pageStates = {
            view: 0,
            showDetails: 1,
            mpshowStagingDetails: 2,

};



this.mpShowDetails = function () {
                backoffice.viewModels.ajaxOverlay.showLoader();
                backoffice.viewModels.ajaxOverlay.hide();
                self.pageState(self.pageStates.mpshowStagingDetails);
};
this.pageState = ko.observable(this.pageStates.view);



this.mpdetailsStagingIsVisible = ko.computed({
            read:  function() {
                return self.pageState() == self.pageStates.mpshowStagingDetails;
            },
            write: function(value) {
                if (value) {
                    self.mpShowDetails();
                } else {
                    self.hideDetails();
                }
            }
        });

在jsp中的代码是:

<div id="offerCreditDetails"
     class="details" style="display: none;" data-bind="dialog: { prop: mpshowStagingDetails , title: 'title', cssClass: 'role medium'}" >

     <jsp:include page="../views/mp_offerCredit.jsp" />
</div>

0 个答案:

没有答案