Project

General

Profile

« Previous | Next » 

Revision 9878

Move the "MultiSelector" JS from the entryForm.tmpl to the entryForm.js. This ensures that the JS will run after all the functions in entryForm.js are declared. This was causing JS bugs in the registry and metacatui.

View differences:

lib/style/common/templates/metacatui/entryForm.js
1475 1475
function capitalize(word) {
1476 1476
    return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase();
1477 1477
}
1478

  
1479
//Now execute all JS that needs to run after the entry form template and this JS file are loaded
1480
var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 10);
1481
multi_selector.addElement( document.getElementById( 'file_element' ) );
lib/style/common/templates/metacatui/entryForm.tmpl
1493 1493
											[% cnt = cnt + 1 %]
1494 1494
									  [% END %]
1495 1495
									[% END %]
1496
								</table>
1497
								  
1498
								<script language="JavaScript" type="text/JavaScript">
1499
									var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 10);
1500
								    multi_selector.addElement( document.getElementById( 'file_element' ) );
1501
								</script>
1502
							
1503
								
1496
								</table>	
1504 1497
						    </div>
1505 1498
						</div>
1506 1499
						

Also available in: Unified diff