Index: lams_common/src/flash/org/lamsfoundation/lams/common/util/LFError.as =================================================================== diff -u -r56d58ccf90b6fda52ef1668dab4c7ffe2f1827bc -r15c0db03cebc344a387508598241c0199f6b0441 --- lams_common/src/flash/org/lamsfoundation/lams/common/util/LFError.as (.../LFError.as) (revision 56d58ccf90b6fda52ef1668dab4c7ffe2f1827bc) +++ lams_common/src/flash/org/lamsfoundation/lams/common/util/LFError.as (.../LFError.as) (revision 15c0db03cebc344a387508598241c0199f6b0441) @@ -25,11 +25,12 @@ Debugger.log('Ref:'+ref,Debugger.CRITICAL,'LFError','LFError'); Debugger.log('debugInfo:'+debugInfo,Debugger.CRITICAL,'LFError','LFError'); - title = Dictionary.getValue('al_alert') + //title = Dictionary.getValue('al_alert') } public function showErrorAlert(okHandler){ + title = Dictionary.getValue('al_alert') var a:Alert; if(okHandler != undefined){ @@ -43,28 +44,30 @@ a.setSize(500,250); } - -/** - * Shows a confrim dialog that allows the user to send a dump tothe server. - * @see Debugger.crashDataDump(); + /** + * Shows an alert confirm dialogue. It is centred in the root time line and diplays the standard LAMS alert icon * @usage + * @param msg The message to display + * @param handler A handler for the click events broadcast when the buttons are clicked. In addition to the standard click event object properties, there is an additional detail property, which contains the flag value of the button that was clicked (Alert.OK, Alert.CANCEL, Alert.YES, Alert.NO). This handler can be a function or an object * @return */ - public function showMessageConfirm(){ + public static function showSendErrorRequest(msg:String, msgTitle:String, okHandler:Function, cancelHandler:Function){ var alt:Alert; + var customTitle = Dictionary.getValue(msgTitle) var handlerObj = new Object(); handlerObj.click = function(e){ if(e.detail == Alert.OK){ - Debugger.crashDataDump(); + okHandler(); }else if(e.detail == Alert.CANCEL){ - //cancelHandler(); + cancelHandler(); }else{ Debugger.log('Unknown event detail form confirm:'+e.detail,Debugger.CRITICAL,"showMessageConfirm",'LFMessage'); } } - //TODO: Make __confirm__ be in the dictionary - alt = Alert.show(message,"__Confirm__",Alert.OK | Alert.CANCEL, null, handlerObj, null, Alert.OK); + alt = Alert.show(msg, customTitle ,Alert.OK | Alert.CANCEL, null, handlerObj, null, Alert.OK); + //var winHeight = alt.title._height + alt.content._height + alt.buttonHeight + 10; + alt.setSize(250, 600); }