equal
deleted
inserted
replaced
68 }); |
68 }); |
69 |
69 |
70 |
70 |
71 }; |
71 }; |
72 |
72 |
73 function testAndClose(old_close) { |
73 function testAndClose(close_fn) { |
74 |
74 |
75 return function(force) { |
75 return function(force) { |
76 // Here we ask LDT if the current work is modified and if the user want to save it. |
76 // Here we ask LDT if the current work is modified and if the user want to save it. |
77 var ldtSwf = $('#ldtInitSwf',$.nmTop().store.iframe.contents()).get(0); |
77 var ldtSwf = $('#ldtInitSwf',$.nmTop().store.iframe.contents()).get(0); |
78 // In the ldt_link_create case, the modal page can be the form, or the ldt swf. So we have to test. |
78 // In the ldt_link_create case, the modal page can be the form, or the ldt swf. So we have to test. |
79 if (!force && ldtSwf && ldtSwf.name=="ldtInitSwf" && ldtSwf.isModified()=="true") { |
79 if (!force && ldtSwf && ldtSwf.name=="ldtInitSwf" && ldtSwf.isModified()=="true") { |
80 ldtSwf.askSave(); |
80 ldtSwf.askSave(); |
81 } |
81 } |
82 else { |
82 else { |
83 old_close.apply(this); |
83 close_fn.apply(this); |
84 } |
84 } |
85 }; |
85 }; |
86 } |
86 } |
87 |
87 |
88 |
88 |