/**
 * Interaction for the locale module
 *
 * @author	Thomas Deceuninck <thomasdeceuninck@netlash.com>
 */
jsBackend.locale =
{
	init: function()
	{
		jsBackend.locale.controls.init();
	}
}

jsBackend.locale.controls =
{
	init: function()
	{
		if($('select#application').length > 0 && $('select#module').length > 0)
		{
			// bind
			$('select#application').on('change', jsBackend.locale.controls.enableDisableModules);

			// call to start
			jsBackend.locale.controls.enableDisableModules();
		}

		if($('.dataGrid td.translationValue').length > 0)
		{
			// bind
			$('.dataGrid td.translationValue').inlineTextEdit(
			{
				params: { fork: { action: 'save_translation' } },
				tooltip: jsBackend.locale.msg('ClickToEdit'),
				afterSave: function(item)
				{
					if(item.find('span:empty').length == 1) item.addClass('highlighted');
					else item.removeClass('highlighted');
				}
			});

			// highlight all empty items
			$('.dataGrid td.translationValue span:empty').parents('td.translationValue').addClass('highlighted');
		}
	},

	enableDisableModules: function()
	{
		// frontend can't have specific module
		if($('select#application').val() == 'frontend')
		{
			// set all modules disabled
			$('select#module option').prop('disabled', true);

			// enable core
			$('select#module option[value=core]').prop('disabled', false).prop('selected', true);
		}

		// remove the disbaled stuff
		else
		{
			$('select#module option').prop('disabled', false);
		}
	}
}

$(jsBackend.locale.init);
@@ -111,22 +111,28 @@
 Backend.
-locale
+translations
  =%0A%7B%0A%09in
@@ -153,38 +153,44 @@
 %0A%09%7B%0A%09%09jsBackend.
-locale
+translations
 .controls.init()
@@ -199,38 +199,44 @@
 %09%7D%0A%7D%0A%0AjsBackend.
-locale
+translations
 .controls =%0A%7B%0A%09i
@@ -385,38 +385,44 @@
 nge', jsBackend.
-locale
+translations
 .controls.enable
@@ -472,22 +472,28 @@
 Backend.
-locale
+translations
 .control
@@ -1514,21 +1514,27 @@
 Backend.
-locale
+translations
 .init);

Update backend/modules/locale/js/locale.js