当我尝试在我的网站上打开模式时,它要么无法打开,要么在打开后立即关闭。我可以看到模式半秒钟,然后关闭它。 等待一分钟后,我可以打开模式,没有任何问题。 我不使用引导程序。
谢谢!
<!-- Modal Structure -->
<div id=<%- dsi_cell %> class="modal modal-fixed-footer bigmodal">
<div class="modal-content">
<h2><%- dsi_method %></h2>
</div>
<div class="modal-footer">
<input type="text" class= "modal-filter" id =<%- dsi_filter %> placeholder="Enter something to filter">
<button class="to_close_btn btn waves-effect waves-light overlay" type="text">Close
<i class="material-icons right">close</i>
</button>
<button class="btn waves-effect waves-light overlay" type="text" id="hideEvent">Hide Event
<i class="material-icons right">visibility_off</i>
</button>
<button class="btn waves-effect waves-light overlay" type="text" id="textual_jumper">Jump to Textual Log
<i class="material-icons right">arrow_forward</i>
</button>
<button class="btn waves-effect waves-light overlay" type="text" id="rsi_jumper">Jump to RSI
<i class="material-icons right">arrow_forward</i>
</button>
<button class="to_clipboard_btn btn waves-effect waves-light overlay" type="text">Copy
<i class="material-icons right">content_copy</i>
</button>
</div>
</div>
var dsiExtraView = Backbone.View.extend({
template: _.template($("#dsi-extra").html()),
dsi_cell: "",
trace: "",
jumper: "",
gridCreated: false,
initialize: function (elem) {
console.log("DsiExtraView.js - initialize() has been called");
this.render(elem);
},
events: {
"click .modal-trigger": "prepare",
input: "filter",
"click .to_clipboard_btn": "clipboard",
"click #textual_jumper": "jumpTextual",
"click #rsi_jumper": "jumpRSI",
"click #hideEvent": "hideEvent",
"click .to_close_btn": "close",
},
render: function (elem) {
console.log("DsiExtraView.js - render() has been called");
this.$el.empty();
this.$el.html(this.template(elem));
this.dsi_cell = elem.dsi_cell;
this.trace = elem.trace;
this.jumper = elem.jumper;
$("#" + this.dsi_cell).ready(function () {
$(".modal").modal();
});
},