I had a look through your module and there are a few issues:
* you should remove all $Id$ tags from the top of files, these are no long required in GIT and were all removed from projects in the conversion from CVS to GIT
* you don't need to add the file LICENSE.txt to your the module directory. In agreeing to the drupal git terms all code committed must be GPL. This file is added to releases packages (tar.gz) automatically.
* In sms_sendform.info there are lines that are automatically added by drupal's release system. So you should remove the following lines:
; Information added by drupal.org packaging script on 2011-01-31\r
version = "6.x-1.0"\r
core = "6.x"\r
project = "smsframework"\r
datestamp = "1282538450"\r
* drupal's coding standard specifies that indentations should be 2 ' ' (space) characters, you have some spaces and some tabs - http://drupal.org/coding-standards#indenting
* in the README.txt, sms_sendform.info & sms_sendform.js you line endings are \r\n (windows), you should use the \n (UNIX) format - http://drupal.org/coding-standards#indenting
* translations folder should be removed, instead translations for drupal are now managed from http://localize.drupal.org/translate
* The last point I would make is related to the following code:
$form['message'] = array(
'#type' => 'textarea',
'#title' => t('Message'),
'#description' => t('Write text to send it to phone number.<br>Message Char:<span id="numChars" style="color:blue">0</span>, Message count:<span id="numMsgs" style="color:blue">1</span>'),
'#cols' => 35,
'#attributes' => array('onkeydown' => 'javascript:charPlus()', 'onkeyup' => 'javascript:charPlus()'),
'#rows' => 2
);
This is not really the preferred way to handle this type of things, the better way of handling javascript events: is with jquery and Drupal behaviours - http://drupal.org/node/205296
You would start by removing the javascript and styles (which should be in a css file) from the form:
$form['message'] = array(
'#type' => 'textarea',
'#title' => t('Message'),
'#description' => t('Write text to send it to phone number.<br>Message Char:<span class="numChars">0</span>, Message count:<span class="numMsgs">1</span>'),
'#cols' => 35,
'#attributes' => array('class' => 'sms_sendform_message'),
'#rows' => 2
);
And create a Drupal Behaviour
Drupal.behaviors.sms_sendform = function(context) {
$('.sms_sendform_message').keydown(function(event) {
var message_box = event.target;
// need to merge your charPlus() code here to calculate the length etc...
// but to update the numChar, you could do something like:
var numChars = message_box.html().length;
message_box.siblings('.description').find('.numChars').html(numChars);
});
}
Note: I haven't tested the above jQuery, it probably has bugs and will need some further work.
Comments
Comment #1
qahmad commentedhi univate
i added this issues from more than month
http://drupal.org/node/1083872
http://drupal.org/node/1083878
and fix all your point, can you reeview?