From: Konstantin R. <gr...@us...> - 2002-01-31 03:45:56
|
Update of /cvsroot/squirrelmail/squirrelmail/plugins/squirrelspell/js In directory usw-pr-cvs1:/tmp/cvs-serv12763/js Modified Files: crypto_settings.js decrypt_error.js init.js Log Message: Some small bugfixes. Still testing. Index: crypto_settings.js =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/squirrelspell/js/crypto_settings.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- crypto_settings.js 2001/10/31 06:10:21 1.1 +++ crypto_settings.js 2002/01/31 03:45:53 1.2 @@ -1,17 +1,26 @@ /** - CRYPTO_SETTINGS.JS - ------------------- - Some client-side checks. Nothing fancy. - **/ + * crypto_settings.js + * ------------------- + * Some client-side checks. Nothing fancy. + * + * $Id$ + * + * @author Konstantin Riabitsev <ic...@du...> ($Author$) + * @version $Date$ + */ +/** + * This function is the only thing. It is called on form submit and + * asks the user some questions. + */ function checkMe(){ if (!document.forms[0].action.checked){ - alert ("Please make a selection first."); + alert (ui_makesel); return false; } if (document.forms[0].action.value=="encrypt") - cmsg="This will encrypt your personal dictionary and store it in an encrypted format. Proceed?"; + cmsg=ui_encrypt; if (document.forms[0].action.value=="decrypt") - cmsg="This will decrypt your personal dictionary and store it in a clear-text format. Proceed?"; + cmsg=ui_decrypt; return confirm(cmsg); } Index: decrypt_error.js =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/squirrelspell/js/decrypt_error.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- decrypt_error.js 2001/10/31 06:10:21 1.1 +++ decrypt_error.js 2002/01/31 03:45:53 1.2 @@ -1,21 +1,26 @@ /** - DECRYPT_ERROR.JS - ----------------- - Some client-side form-checks. Trivial stuff. - **/ + * decrypt_error.js + * ----------------- + * Some client-side form-checks. Trivial stuff. + * + * $Id$ + * + * @author Konstantin Riabitsev <ic...@du...> ($Author$) + * @version $Date$ + */ function AYS(){ if (document.forms[0].delete_words.checked && document.forms[0].old_key.value){ - alert ("You can either delete your dictionary or type in the old password. Not both."); + alert (ui_candel); return false; } if (!document.forms[0].delete_words.checked && !document.forms[0].old_key.value){ - alert("First make a choice."); + alert(ui_choice); return false; } if (document.forms[0].delete_words.checked) - return confirm("This will delete your personal dictionary file. Proceed?"); + return confirm(ui_willdel); return true; } Index: init.js =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/plugins/squirrelspell/js/init.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- init.js 2001/10/31 06:10:21 1.1 +++ init.js 2002/01/31 03:45:53 1.2 @@ -1,12 +1,24 @@ /** - INIT.JS - ------- - Grabs the text from the SquirrelMail field and submits it to - the squirrelspell. - **/ + * init.js + * ------- + * Grabs the text from the SquirrelMail field and submits it to + * the squirrelspell. + * + * $Id$ + * + * @author Konstantin Riabitsev <ic...@du...> ($Author$) + * @version $Date$ + */ + +/** + * This is the work function. + * + * @param flag tells the function whether to automatically submit the + * form, or wait for user input. True submits the form, while + * false doesn't. + * @return void + */ function sqspell_init(flag){ - // flag tells the function whether to automatically submit the form, or - // wait for user input. True submits the form, while False doesn't. textToSpell = opener.document.forms[0].subject.value + "\n" + opener.document.forms[0].body.value; document.forms[0].sqspell_text.value = textToSpell; if (flag) document.forms[0].submit(); |