? LICENSE.txt
Index: modules/inline_msg/inline_msg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drupal_tweaks/modules/inline_msg/Attic/inline_msg.module,v
retrieving revision 1.1.2.6
diff -r1.1.2.6 inline_msg.module
55,70c55,101
<   global $inline_msg_ids;
<   $js_code[] = "if (Drupal.jsEnabled) { $(document).ready(function(){ ";
<   foreach ($messages as $type => $type_messages) {
<     $js_code[] = "msg_". $type . ' = $(\'.messages.' . $type . "')"; // get message section by type <ul>
<     foreach ($type_messages as $key => $message) { // to each element...
<       if (is_array($inline_msg_ids) && array_key_exists($message, $inline_msg_ids)) {
<         $id_msg = "inline-msg-" . $inline_msg_ids[$message];
<         $js_code[] = "msg_old" . $key . " = $('.messages." . $type . "').find('li').eq(" . $key . ").attr('id', '" . $id_msg . "')"; // apply custom id
<         $js_code[] = "id_from" . $key . " = $('.messages." . $type . "').find('li').eq(" . $key . ").attr('id')"; // get id of the message
<         $js_code[] = "id_to" . $key . " = $('.messages." . $type . "').find('li').eq(" . $key . ").attr('id').substr(11)"; // get id of destination element
<         $js_code[] = "obj_to" . $key . " = $('#'+id_to" . $key . ")"; // get object of destination element
<         $js_code2[] = "obj_new" . $key . " = msg_" . $type . ".eq(0).clone()"; // clone old messages
<         $js_code2[] = "$('#'+id_to" . $key . ").before( obj_new" . $key . ")"; // and copy all messages object into element
<         $js_code2[] = "obj_new" . $key . ".find('li').not('#'+id_from" . $key . ").remove()"; // remove all messages from cloned object exempt the correct one
<         $js_code[] = "obj_to" . $key . " = $('#'+id_to" . $key . ")"; // get object of destination element
<       }
---
>     global $inline_msg_ids;
> 
>     if(!is_array($inline_msg_ids))
>         $inline_msg_ids = form_get_errors();
> 
>     $js_code = "
>         if (Drupal.jsEnabled) {
>             $(document).ready(function(){
>                 var remove = false;";
>     foreach ($messages as $type => $type_messages)
>     {
>         $js_code .= "\nvar msg_". $type . ' = $(\'.messages.' . $type . "')"; // get message section by type <ul>
>         foreach ($type_messages as $key => $message)
>         { // to each element...
>             if (in_array($message, $inline_msg_ids))
>             {
>                 foreach($inline_msg_ids as $id => $err)
>                 {
>                     if($err == $message)
>                     {
>                         $id_msg = "inline-msg-" . $id;
> 
>                         $js1 .= "
>                             var msg_old" . $key . " = $('.messages." . $type . "').find('li').eq(" . $key . ").attr('id', '" . $id_msg . "');
>                             var id_from" . $key . " = '".$id_msg."';
>                             var id_to" . $key . " = '#edit-".$id."';
>                             ";
>                         $js2 .= "
>                             if($(id_to".$key.").length)
>                             {
>                                 remove = true;
>                                 var obj_new" . $key . " = msg_" . $type . ".eq(0).clone();
>                                 $(id_to" . $key . ").before( obj_new" . $key . " );
>                                 obj_new" . $key . ".find('li').not('#'+id_from" . $key . ").remove();
>                                 msg_". $type . ".find('li').eq(" . $key . ").remove();
>                             }
>                             else
>                             {
>                                 remove = false;
>                             }
>                             ";
>                     }
>                 }
>             }
>         }
> 
>         $js2 .= "if(remove) $('.messages." . $type . "').eq(0).remove();";
72,76c103,105
<     $js_code2[] = "$('.messages." . $type . "').eq(0).remove()";
<   }
<   $js_code2[] = "})}";
<   $js_code_all = implode(";\n", array_merge($js_code, $js_code2)) . ';';
<   drupal_add_js($js_code_all, 'inline');
---
>     
>     $js_code_all = $js_code . $js1 . $js2 . "\n})};";
>     drupal_add_js($js_code_all, 'inline');
