我在Kendo UI Window.close()
上有两个或更多按钮,这些按钮迟早会在某些业务逻辑之后调用事件。
例如,下面的屏幕:“关闭”按钮将直接关闭窗口,但“保存”按钮将检查某些条件然后触发关闭。
现在,我已经添加了我的条件
that.bind('close', function(){
//check some condition
// here if condition met, let the flow continue else call preventDefault()
});
当两个按钮都被点击时,这个拦截就会触发。如何检查哪个按钮触发了事件?
FYA,我已经扩展了 Kendo UI Window 小部件,因此that.bind()
拦截已经到位。