#62: Multi-record editor: clean JS code
---------------------+------------------------------------------------------
 Reporter:  simko    |       Owner:  jmartinm
     Type:  defect   |      Status:  new     
 Priority:  minor    |   Milestone:  v1.0    
Component:  BibEdit  |     Version:          
 Keywords:           |  
---------------------+------------------------------------------------------
 The JS code of the Multi-record Editor tool should be cleaned.
 E.g. here is the recent output of jslint:

 {{{
 $ java -jar jslint4java-1.3.3.jar /opt/cds-
 invenio/var/www/js/bibeditmulti.js
 jslint:bibeditmulti.js:70:20:'updateView' was used before it was defined.
 jslint:bibeditmulti.js:74:24:'rebindControls' was used before it was
 defined.
 jslint:bibeditmulti.js:97:36:'onButtonGoToFirstPageClick' was used before
 it was defined.
 jslint:bibeditmulti.js:101:39:'onButtonGoToPreviousPageClick' was used
 before it was defined.
 jslint:bibeditmulti.js:105:35:'onButtonGoToNextPageClick' was used before
 it was defined.
 jslint:bibeditmulti.js:110:27:'onResultItemClick' was used before it was
 defined.
 jslint:bibeditmulti.js:129:42:'onButtonOutputFormatMarcXMLClick' was used
 before it was defined.
 jslint:bibeditmulti.js:132:44:'onButtonOutputFormatHTMLBriefClick' was
 used before it was defined.
 jslint:bibeditmulti.js:135:47:'onButtonOutputFormatHTMLDetailedClick' was
 used before it was defined.
 jslint:bibeditmulti.js:138:39:'onButtonOutputFormatMARCClick' was used
 before it was defined.
 jslint:bibeditmulti.js:141:25:'setOutputFormat' was used before it was
 defined.
 jslint:bibeditmulti.js:159:36:'onButtonBackToResultsClick' was used before
 it was defined.
 jslint:bibeditmulti.js:175:33:'onButtonTestSearchClick' was used before it
 was defined.
 jslint:bibeditmulti.js:185:37:'onButtonPreviewResultsClick' was used
 before it was defined.
 jslint:bibeditmulti.js:196:36:'onButtonSubmitChangesClick' was used before
 it was defined.
 jslint:bibeditmulti.js:205:28:'performAJAXRequest' was used before it was
 defined.
 jslint:bibeditmulti.js:222:24:'createJSONData' was used before it was
 defined.
 jslint:bibeditmulti.js:250:28:'createCommandsList' was used before it was
 defined.
 jslint:bibeditmulti.js:256:10:Bad for in variable 'fieldID'.
 jslint:bibeditmulti.js:261:14:Bad for in variable 'subfieldID'.
 jslint:bibeditmulti.js:261:9:The body of a for in should be wrapped in an
 if statement to filter unwanted properties from the prototype.
 jslint:bibeditmulti.js:272:4:Mixed spaces and tabs.
 jslint:bibeditmulti.js:274:4:Mixed spaces and tabs.
 jslint:bibeditmulti.js:256:5:The body of a for in should be wrapped in an
 if statement to filter unwanted properties from the prototype.
 jslint:bibeditmulti.js:280:24:'onRequestError' was used before it was
 defined.
 jslint:bibeditmulti.js:291:13:Bad line breaking before '+'.
 jslint:bibeditmulti.js:292:13:Bad line breaking before '+'.
 jslint:bibeditmulti.js:297:31:'displayResultsPreview' was used before it
 was defined.
 jslint:bibeditmulti.js:312:13:'gFields' was used before it was defined.
 jslint:bibeditmulti.js:331:38:'rebindActionsRelatedControls' was used
 before it was defined.
 jslint:bibeditmulti.js:364:20:Use '===' to compare with 'null'.
 jslint:bibeditmulti.js:383:31:'onButtonNewFieldClick' was used before it
 was defined.
 jslint:bibeditmulti.js:391:37:'onButtonCancelNewFieldClick' was used
 before it was defined.
 jslint:bibeditmulti.js:396:46:Use '===' to compare with ' '.
 jslint:bibeditmulti.js:456:35:'onButtonSaveNewFieldClick' was used before
 it was defined.
 jslint:bibeditmulti.js:480:4:Mixed spaces and tabs.
 jslint:bibeditmulti.js:488:34:'onButtonDeleteFieldClick' was used before
 it was defined.
 jslint:bibeditmulti.js:496:10:Bad for in variable 'subfieldID'.
 jslint:bibeditmulti.js:496:5:The body of a for in should be wrapped in an
 if statement to filter unwanted properties from the prototype.
 jslint:bibeditmulti.js:506:34:'onButtonNewSubfieldClick' was used before
 it was defined.
 jslint:bibeditmulti.js:524:40:'onButtonCancelNewSubfieldClick' was used
 before it was defined.
 jslint:bibeditmulti.js:528:38:'onButtonSaveNewSubfieldClick' was used
 before it was defined.
 jslint:bibeditmulti.js:558:37:'onButtonDeleteSubfieldClick' was used
 before it was defined.
 jslint:bibeditmulti.js:570:36:'onSubfieldActionTypeChange' was used before
 it was defined.
 jslint:bibeditmulti.js:576:42:'displayProperSubfieldInformation' was used
 before it was defined.
 jslint:bibeditmulti.js:580:20:Use '===' to compare with 'null'.
 jslint:bibeditmulti.js:599:4:Mixed spaces and tabs.
 }}}

-- 
Ticket URL: <http://invenio-software.org/ticket/62>
Invenio <http://invenio-software.org>

Reply via email to