Index: trunk/extensions/MoodBar/modules/ext.moodBar/ext.moodBar.core.js |
— | — | @@ -341,6 +341,11 @@ |
342 | 342 | $( '#mw-moodBar-feedbackInput' ) |
343 | 343 | .NobleCount('#mw-moodBar-charCount', { |
344 | 344 | max_chars:140, |
| 345 | + /* |
| 346 | + * Callbacks: |
| 347 | + * function on_negative: called when text field is negative in remaining characters. |
| 348 | + * @param t_obj is the text object. need to pass to the callback to add modifiers. |
| 349 | + */ |
345 | 350 | on_negative: function( t_obj ) { |
346 | 351 | $( t_obj ) |
347 | 352 | .addClass('mw-moodBar-feedback-invalid') |
— | — | @@ -348,6 +353,10 @@ |
349 | 354 | .find('.mw-moodBar-formNote') |
350 | 355 | .addClass('red-bold'); |
351 | 356 | }, |
| 357 | + /* |
| 358 | + * function on_positive: called when text field has available remaining characters. |
| 359 | + * @param t_obj is the text object. need to pass to the callback to add modifiers. |
| 360 | + */ |
352 | 361 | on_positive: function( t_obj ) { |
353 | 362 | $( t_obj ) |
354 | 363 | .removeClass( 'mw-moodBar-feedback-invalid') |
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.js |
— | — | @@ -463,13 +463,22 @@ |
464 | 464 | .find('.fbd-response-text') |
465 | 465 | .NobleCount('.fbd-response-charCount', { |
466 | 466 | max_chars:5000, |
467 | | - on_negative: function( t_obj ) { |
| 467 | + /* |
| 468 | + * Callbacks: |
| 469 | + * function on_negative: called when text field is negative in remaining characters. |
| 470 | + * @param t_obj is the text object. need to pass to the callback to add modifiers. |
| 471 | + */ |
| 472 | + on_negative: function( t_obj ) { |
468 | 473 | $( t_obj ) |
469 | 474 | .addClass('fbd-response-text-invalid') |
470 | 475 | .prev() |
471 | 476 | .find('span') |
472 | 477 | .addClass('red-bold'); |
473 | 478 | }, |
| 479 | + /* |
| 480 | + * function on_positive: called when text field has available remaining characters. |
| 481 | + * @param t_obj is the text object. need to pass to the callback to add modifiers. |
| 482 | + */ |
474 | 483 | on_positive: function( t_obj ) { |
475 | 484 | $( t_obj ) |
476 | 485 | .removeClass( 'fbd-response-text-invalid') |