Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

arv: Fix retrieving the sock names

Morebits' getTexts was broken.
It's not used anywhere else, and not really needed anyway since you can get at everything via jQuery quite easily, so I'll just remove it.
  • Loading branch information...
commit c2e7694a191e2381af9dee2f8094c0d6ef450674 1 parent 9188560
@Amalthea Amalthea authored
Showing with 1 addition and 20 deletions.
  1. +1 −1  modules/twinklearv.js
  2. +0 −19 morebits.js
View
2  modules/twinklearv.js
@@ -476,7 +476,7 @@ Twinkle.arv.callback.evaluate = function(e) {
}
sockParameters.uid = puppetReport ? form.sockmaster.value.rtrim() : uid;
- sockParameters.sockpuppets = puppetReport ? [uid] : (form.getTexts( 'sockpuppet' ) || []);
+ sockParameters.sockpuppets = puppetReport ? [uid] : $.map( $('input:text[@name=sockpuppet]',form), function(o){ return $(o).val(); });
SimpleWindow.setButtonsEnabled( false );
Status.init( form );
View
19 morebits.js
@@ -591,9 +591,6 @@ QuickForm.element.generateTooltip = function QuickFormElementGenerateTooltip( no
* that have selected set to true. (don't try to mix selects with radio/checkboxes, please)
* Type is optional and can specify if either radio or checkbox (for the event
* that both checkboxes and radiobuttons have the same name.
- * getTexts:
- * Returns an array containing the values of elements with the given name, that has non-empty strings
- * type is "text" or given.
*/
HTMLFormElement.prototype.getChecked = function( name, type ) {
@@ -639,22 +636,6 @@ HTMLFormElement.prototype.getChecked = function( name, type ) {
return return_array;
};
-HTMLFormElement.prototype.getTexts = function( name, type ) {
- type = type || 'text';
- var elements = this.elements[name];
- if( !elements ) {
- // if the element doesn't exists, return null.
- return null;
- }
- var return_array = [];
- for( var i = 0; i < elements.length; ++i ) {
- if( elements[i].values ) {
- return_array.push( elements[i].value );
- }
- }
- return return_array;
-};
-
/**
* **************** RegExp ****************
Please sign in to comment.
Something went wrong with that request. Please try again.