176 // Read any hash links
177 var hash = document.location.hash;
178 if (hash) {
179 $('.nav-tabs a[href="'+hash.replace(prefix,"")+'"]').tab('show');180 }
181};
182
171 // Change hash for page-reload
172 var prefix = "tab_";
173 $('.nav-tabs.maintabs a').on('shown.bs.tab', function (e) {
174 window.location.hash = e.target.hash.replace("#", "#" + prefix);175 })
176 // Read any hash links
177 var hash = document.location.hash;
151 });
152 $(".sa").click(function(){
153 var tabtitle = $(this).attr("id").replace("-selectall", "");
154 $("#" + tabtitle +"-ui input:enabled[type='checkbox']").prop('checked', true);155 });
156 $("#missingvalue").change(function(){
157 if ($(this).val() == '__custom__'){
143 var currentdiv = TABS[CURRENTTAB] +"-ui";
144 $("#"+currentdiv).css("display", "block");
145 var btndiv = TABS[CURRENTTAB] +"-btn";
146 $("#"+btndiv).removeClass().addClass("btn btn-primary");147
148 $('#next-btn').prop('disabled', ((CURRENTTAB + 1) == TABS.length));
149 $('#prev-btn').prop('disabled', (CURRENTTAB == 0));
142
143 var currentdiv = TABS[CURRENTTAB] +"-ui";
144 $("#"+currentdiv).css("display", "block");
145 var btndiv = TABS[CURRENTTAB] +"-btn";146 $("#"+btndiv).removeClass().addClass("btn btn-primary");
147
148 $('#next-btn').prop('disabled', ((CURRENTTAB + 1) == TABS.length));
In ES2015 (ES6), we can use template literals instead of string concatenation.
var str = `Hello, ${name}!`;
var str = "Hello, " + name + "!";
var str = "Time: " + (12 * 60 * 60 * 1000);
var str = "Hello World!";
var str = `Hello, ${name}!`;
var str = `Time: ${12 * 60 * 60 * 1000}`;
var str = "Hello, " + "World!";