0
我改变模型与X编辑帮助属性。
我需要什么:
检查一些条件做出改变之前。
什么问题:
this.$el.find("#my-field").editable({
type : 'text',
name : myFieldTitle,
value : myCurrentValue,
pk : this.model.get('id'),
url : '',
success : function(response, newValue) {
//PROBLEM: At this moment visual representation of a model has been already changed
//no matter if condition is true or false
if (condition)
self.model.set(field.name, newValue);
}
});
问:
我如何可以改变视觉呈现(我的模型)与帮助X编辑只条件检查后?
上面的代码示例中没有透露太多,围绕这个更多的代码,将有助于 –