From 5d0266edadf398cfa33ad754e90c38425bff98e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20B=C3=BCnte?= Date: Wed, 19 Feb 2014 08:11:11 +0100 Subject: [PATCH] Use tabs for indention --- javascript/CMSMain.Translatable.js | 56 +++++++++++++++--------------- 1 file changed, 28 insertions(+), 28 deletions(-) mode change 100755 => 100644 javascript/CMSMain.Translatable.js diff --git a/javascript/CMSMain.Translatable.js b/javascript/CMSMain.Translatable.js old mode 100755 new mode 100644 index cba1a8d..0d67edb --- a/javascript/CMSMain.Translatable.js +++ b/javascript/CMSMain.Translatable.js @@ -40,35 +40,35 @@ var locale = {locale: $(e.target).val()}; var url = document.location.href; - // Check existing url - search = /locale=[^&]*/; - if(url.match(search)) { - // Replace locale code - url = url.replace(search, $.param(locale)); - } else { - // Add locale code - url = $.path.addSearchParams(url, locale); - } + // Check existing url + search = /locale=[^&]*/; + if(url.match(search)) { + // Replace locale code + url = url.replace(search, $.param(locale)); + } else { + // Add locale code + url = $.path.addSearchParams(url, locale); + } - // Get id for translation and fix redirect url - var selectedTreeItem = $('.cms-tree').jstree('get_selected'); - if(selectedTreeItem.length > 0) { - selectedTreeItem = selectedTreeItem.eq(0); - $.get( - $.path.addSearchParams(this.data('translationUrl'), { - 'requestedLocale': $(e.target).val(), - 'id': selectedTreeItem.data('id'), - 'class': selectedTreeItem.data('pagetype') - }), - function(data) { - if(data != '') { - url = data; - } - $('.cms-container').loadPanel(url); - } - ); - return false; - } + // Get id for translation and fix redirect url + var selectedTreeItem = $('.cms-tree').jstree('get_selected'); + if(selectedTreeItem.length > 0) { + selectedTreeItem = selectedTreeItem.eq(0); + $.get( + $.path.addSearchParams(this.data('translationUrl'), { + 'requestedLocale': $(e.target).val(), + 'id': selectedTreeItem.data('id'), + 'class': selectedTreeItem.data('pagetype') + }), + function(data) { + if(data != '') { + url = data; + } + $('.cms-container').loadPanel(url); + } + ); + return false; + } $('.cms-container').loadPanel(url); return false;