Sha256: 26f6bdf38871b7eaa4199546c31bbc74ceb36e5e7352039f2d1f604ceb5a74b4

Contents?: true

Size: 835 Bytes

Versions: 2

Compression:

Stored size: 835 Bytes

Contents

jQuery(function()
{
	var controller = jQuery( '.controller-releaf-translations' );

	// adjust translations table head cell width

	var headCells = controller.find( '.translations_table_head .th' );
	//console.log( headCells );
	var adjustHeadCellWidth = function()
	{
        var row = jQuery( '.module-translations .translations_table thead tr:first th' );

		for( var i = 0; i < headCells.length; i++ )
		{
			jQuery( headCells[i] ).width( jQuery( row[i] ).outerWidth() - 2 );
		}
	};
	adjustHeadCellWidth();
	jQuery( window ).resize( adjustHeadCellWidth );

	// highlight selected entry

	if( location.hash )
	{
		jQuery( location.hash ).addClass( 'highlighted' );
	}

    controller.on('itemadd', function() {
        controller.find('table.translations tbody tr:last td.translation_name input[type="text"]').focus();
    });
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
releaf-0.1.2 app/assets/javascripts/releaf/controllers/releaf/translations.js
releaf-0.1.1 app/assets/javascripts/releaf/controllers/releaf/translations.js