1function getOS() { 2 var OSName = "W"; 3 if (window.navigator.userAgent.indexOf("Windows NT 10.0") != -1) OSName = "W"; 4 if (window.navigator.userAgent.indexOf("Windows NT 6.2") != -1) OSName = "W"; 5 if (window.navigator.userAgent.indexOf("Windows NT 6.1") != -1) OSName = "W"; 6 if (window.navigator.userAgent.indexOf("Windows NT 6.0") != -1) OSName = "W"; 7 if (window.navigator.userAgent.indexOf("Windows NT 5.1") != -1) OSName = "W"; 8 if (window.navigator.userAgent.indexOf("Windows NT 5.0") != -1) OSName = "W"; 9 if (window.navigator.userAgent.indexOf("Mac") != -1) OSName = "M"; 10 if (window.navigator.userAgent.indexOf("X11") != -1) OSName = "L"; 11 if (window.navigator.userAgent.indexOf("Linux") != -1) OSName = "L"; 12 return OSName; 13} 14 15function setCookie(cname, cvalue, exdays) { 16 var d = new Date(); 17 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 18 var expires = "expires=" + d.toUTCString(); 19 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 20} 21 22function getCookie(name) { 23 const value = `; ${document.cookie}`; 24 const parts = value.split(`; ${name}=`); 25 if (parts.length === 2) return decodeURIComponent(parts.pop().split(';').shift()); 26 return null; 27} 28 29function selectPlatformTab() { 30 var OS = location.hash.substr(1); 31 if (OS == "" && getCookie('platform') !== null) { 32 OS = getCookie('platform'); 33 } 34 if (OS == "") { 35 OS = getOS(); 36 } 37 return OS[0]; 38} 39 40function getProductBannerClassName(product) { 41 switch(true) { 42 case product.includes("premium") && product.includes("lite"): 43 return "navicat-essentials-banner"; 44 case product.includes("premium"): 45 return "navicat-premium-banner"; 46 case product.includes("mysql"): 47 return "navicat-mysql-banner"; 48 case product.includes("pgsql"): 49 return "navicat-postgresql-banner"; 50 case product.includes("mongodb"): 51 return "navicat-mongodb-banner"; 52 case product.includes("mariadb"): 53 return "navicat-mariadb-banner"; 54 case product.includes("sqlserver"): 55 return "navicat-sqlserver-banner"; 56 case product.includes("ora"): 57 return "navicat-oracle-banner"; 58 case product.includes("sqlite"): 59 return "navicat-sqlite-banner"; 60 case product.includes("redis"): 61 return "navicat-redis-banner"; 62 case product.includes("snowflake"): 63 return "navicat-snowflake-banner"; 64 case product.includes("navicatdatamodeler") && product.includes("lite"): 65 return "navicat-modeler-essentials-banner"; 66 case product.includes("navicatdatamodeler"): 67 return "navicat-modeler-banner"; 68 case product.includes("navicatbiviewer"): 69 return "navicat-charts-viewer-banner"; 70 case product.includes("navicatbi"): 71 return "navicat-charts-creator-banner"; 72 case product.includes("navicatonpremserver"): 73 return "navicat-on-prem-server-banner"; 74 case product.includes("navicatmonitor"): 75 return "navicat-monitor-banner"; 76 default: 77 return "navicat-premium-banner";; 78 } 79} 80 81function getProductCode(product, os, edition, language) { 82 var code = ""; 83 code = code + product + "-" + os + edition + language + "-ESD"; 84 return code; 85} 86 87function isPositiveInteger(n) { 88 return 0 === n % (!isNaN(parseFloat(n)) && 0 <= ~~n); 89} 90 91function releaseNotesOSControl() { 92 var OS = location.hash.substr(1); 93 if (OS == "") { 94 OS = getOS(); 95 } 96 97 jQuery(".release-notes-ver").removeClass("selected"); 98 if (OS == "W") { 99 jQuery("#win-ver").addClass("selected"); 100 } else if (OS == "M") { 101 jQuery("#mac-ver").addClass("selected"); 102 } else if (OS == "L") { 103 jQuery("#lin-ver").addClass("selected"); 104 } else { 105 jQuery("#win-ver").addClass("selected"); 106 OS = "W" 107 } 108 jQuery(".release-notes-table").hide(); 109 jQuery(".release-notes-table[platform='" + OS + "']").show(); 110 111 jQuery(".release-notes-ver").click(function () { 112 var btn = jQuery(this); 113 btn.siblings().removeClass("selected"); 114 btn.addClass("selected"); 115 location.hash = btn.attr("platform"); 116 jQuery(".release-notes-table").hide(); 117 jQuery(".release-notes-table[platform='" + btn.attr('platform') + "']").show(); 118 }); 119 120} 121 122function roundDp(floatValue, dp, preferFloatString) { 123 var factor = Math.pow(10, dp); 124 var ret = Math.round((+floatValue + 1e-15) * factor) / factor; // Special case: 1.005 * 100 = 100.49999999999999. Thus, round 1.005 to 2 d.p. gives 1 instead of 1.01. + 1e-15 (optional) solves this. Not work for 55.555, 555.555 etc. 125 if (preferFloatString !== false) { 126 ret = ret.toFixed(2); 127 /*if (factor >= 10 && ret.search(/^[+-]?\d+$/) != -1) // no floating point -> add ".0" for float string representation like in Ruby's round(n) when n > 0 128 ret += ".00";*/ 129 } 130 131 var lang_tag = jQuery("html").attr("lang"); 132 if (lang_tag == "de-de") { 133 ret = ret.toString().replace(".", ","); 134 return ret.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); 135 } 136 return ret.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); 137 138 //return ret; 139}; 140 141function getUrlVars() { 142 var vars = [], hash; 143 var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); 144 for (var i = 0; i < hashes.length; i++) { 145 hash = hashes[i].split('='); 146 vars.push(hash[0]); 147 vars[hash[0]] = hash[1]; 148 } 149 return vars; 150} 151 152function productInfoScript(data = []) { 153 var isOprem = jQuery(".info-container").hasClass("on-prem-product-info"); 154 var OS = location.hash.substr(1); 155 if (OS == "") { 156 OS = getOS(); 157 } 158 var classNameOS = [".Windows-container", ".Mac-container", ".Linux-container"]; 159 var lang = "_FR"; 160 161 jQuery(".info-switcher-in3-container .info-switcher-in3, .info-switcher-in4-container .info-switcher-in4").removeClass("selected"); 162 jQuery(".info-content.Linux-container, .info-content.Mac-container, .info-content.Windows-container").hide(); 163 if (OS == "L") { 164 jQuery(".info-switcher-in3-container .info-switcher-in3[os='linux'], .info-switcher-in4-container .info-switcher-in4[os='linux']").addClass("selected"); 165 jQuery(".Linux-container").show(); 166 jQuery(".Linux-container").addClass("platform-selected"); 167 168 } else if (OS == "M") { 169 jQuery(".info-switcher-in3-container .info-switcher-in3[os='mac'], .info-switcher-in4-container .info-switcher-in4[os='mac']").addClass("selected"); 170 jQuery(".Mac-container").show(); 171 jQuery(".Mac-container").addClass("platform-selected"); 172 } else { 173 jQuery(".info-switcher-in3-container .info-switcher-in3[os='win'], .info-switcher-in4-container .info-switcher-in4[os='win']").addClass("selected"); 174 jQuery(".Windows-container").show(); 175 jQuery(".Windows-container").addClass("platform-selected"); 176 } 177 178 jQuery(".product-info-switcher").click(function () { 179 var ele = jQuery(this); 180 ele.siblings().removeClass("selected"); 181 ele.addClass("selected"); 182 jQuery(".product-info-features-content").hide(); 183 jQuery(".product-info-features-content." + ele.attr("os")).show(); 184 }); 185 186 jQuery(".product-info-screenshot-number div").click(function () { 187 var ele = jQuery(this); 188 ele.parent().siblings().removeClass("selected"); 189 ele.parent().addClass("selected"); 190 jQuery(this).parent().parent().parent().find(".product-info-screenshot").removeClass("show"); 191 jQuery(".product-info-screenshot[index='" + ele.attr("index") + "']").addClass("show"); 192 }); 193 194 for (let i = 0; i < classNameOS.length; i++) { 195 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div > div:not(.product-info-screenshot-title-v17-dot-container)").click(function () { 196 let index = jQuery(this).attr("index") - 1; 197 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div").removeClass("selected").find("> div").removeClass("selected"); 198 jQuery(this).addClass("selected").parent().addClass("selected"); 199 updateScreenshotByIndex(index, classNameOS[i]) 200 }); 201 jQuery(classNameOS[i] + " .product-info-screenshot-button-v17-back").click(function () { 202 let index = jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div > div.selected").attr("index") - 1; 203 if (index != 0) { 204 index--; 205 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div").removeClass("selected").find("> div").removeClass("selected"); 206 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div> div > div[index='" + (index + 1) + "']").addClass("selected").parent().addClass("selected"); 207 updateScreenshotByIndex(index, classNameOS[i]); 208 } 209 if (index <= 0) { 210 jQuery(this).css("opacity", 0.5); 211 } else { 212 jQuery(this).css("opacity", 1); 213 } 214 jQuery(classNameOS[i] + " .product-info-screenshot-button-v17-next").css("opacity", 1); 215 }); 216 jQuery(classNameOS[i] + " .product-info-screenshot-button-v17-next").click(function () { 217 let index = jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div> div.selected").attr("index") - 1; 218 let count = data.length; 219 if (index < count - 1) { 220 index++; 221 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div").removeClass("selected").find("> div").removeClass("selected"); 222 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17 > div > div > div[index='" + (index + 1) + "']").addClass("selected").parent().addClass("selected"); 223 updateScreenshotByIndex(index, classNameOS[i]); 224 } 225 if (index >= count - 1) { 226 jQuery(this).css("opacity", 0.5); 227 } else { 228 jQuery(this).css("opacity", 1); 229 } 230 jQuery(classNameOS[i] + " .product-info-screenshot-button-v17-back").css("opacity", 1); 231 }); 232 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-back").click(function () { 233 let page = jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column.selected").attr("page"); 234 page--; 235 if (page != 0) { 236 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column").removeClass("selected"); 237 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column[page='" + page + "']").addClass("selected"); 238 } 239 }); 240 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-next").click(function () { 241 let page = jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column.selected").attr("page"); 242 page++; 243 if (page <= 3) { 244 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column").removeClass("selected"); 245 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column[page='" + page + "']").addClass("selected"); 246 } 247 }); 248 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-dot").click(function () { 249 let page = jQuery(this).attr("page"); 250 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column").removeClass("selected"); 251 jQuery(classNameOS[i] + " .product-info-screenshot-title-v17-column[page='" + page + "']").addClass("selected"); 252 }); 253 } 254 255 if (!isOprem) { 256 for (let i = 0; i < data.length; i++) { 257 if (data[i].product === "17_Data_Dictionary") { 258 preloadImage("/images/product_screenshot/Screenshot_Navicat_" + data[i].product + ".png") 259 } else { 260 preloadImage("/images/product_screenshot/Screenshot_Navicat_" + data[i].product + "_Windows" + data[i].image + lang + ".png") 261 preloadImage("/images/product_screenshot/Screenshot_Navicat_" + data[i].product + "_Mac" + data[i].image + lang + ".png") 262 preloadImage("/images/product_screenshot/Screenshot_Navicat_" + data[i].product + "_Linux" + data[i].image + lang + ".png") 263 } 264 } 265 } 266 267 function updateScreenshotByIndex(index, className) { 268 if (isOprem) { 269 if (index === 9) { 270 jQuery(className + " .product-info-screenshot-v17 p").hide(); 271 jQuery(className + " .product-info-screenshot-v17 .screenshot").hide(); 272 jQuery(".on-prem-product-info-supported-container").show(); 273 jQuery(".on-prem-product-info-supported").on("scroll", function () { 274 if (jQuery(this).scrollTop() === jQuery(".on-prem-product-info-supported-list:first-child").outerHeight() + jQuery(".on-prem-product-info-supported-list:nth-child(2)").outerHeight() - 320) { 275 jQuery(".on-prem-product-info-supported-list-arrow-up").show(); 276 jQuery(".on-prem-product-info-supported-list-arrow-down").hide(); 277 } else { 278 jQuery(".on-prem-product-info-supported-list-arrow-up").hide(); 279 jQuery(".on-prem-product-info-supported-list-arrow-down").show(); 280 } 281 }); 282 jQuery(window).on("resize", function () { 283 var windoWidth = jQuery(window).width(); 284 if (windoWidth > 766) { 285 jQuery(".on-prem-product-info-supported-list-arrow-up").hide(); 286 jQuery(".on-prem-product-info-supported-list-arrow-down").hide(); 287 console.log("!!!!"); 288 } else { 289 if (jQuery(".on-prem-product-info-supported").scrollTop() === jQuery(".on-prem-product-info-supported-list:first-child").outerHeight() + jQuery(".on-prem-product-info-supported-list:nth-child(2)").outerHeight() - 320) { 290 jQuery(".on-prem-product-info-supported-list-arrow-up").show(); 291 jQuery(".on-prem-product-info-supported-list-arrow-down").hide(); 292 } else { 293 jQuery(".on-prem-product-info-supported-list-arrow-up").hide(); 294 jQuery(".on-prem-product-info-supported-list-arrow-down").show(); 295 } 296 } 297 }); 298 } else { 299 jQuery(".on-prem-product-info-supported-container").hide(); 300 jQuery(className + " .product-info-screenshot-v17 p").show(); 301 jQuery(className + " .product-info-screenshot-v17 .screenshot").show(); 302 } 303 jQuery(className + " .product-info-screenshot-v17 h3").html(data[index].title); 304 jQuery(className + " .product-info-screenshot-v17 p").html(data[index].description); 305 jQuery(className + " .product-info-screenshot-v17 .screenshot").attr("src", "/images/product_screenshot/" + data[index].image + lang + ".png"); 306 if (data[index].fullScreenshot) { 307 jQuery(className + " .product-info-screenshot-v17 .screenshot").css("box-shadow", "rgba(0, 0, 0, 0.2) 0px 10px 40px"); 308 } else { 309 jQuery(className + " .product-info-screenshot-v17 .screenshot").css("box-shadow", "none"); 310 } 311 jQuery(className + " .product-info-screenshot-v17 .fancybox").attr("href", "/images/product_screenshot/" + data[index].image + lang + ".png"); 312 jQuery(className + " .product-info-screenshot-v17 .fancybox").attr("data-fancybox-title", data[index].title); 313 } else { 314 let os_tmp = jQuery(".info-switcher-in3.selected, .info-switcher-in4.selected").attr("os"); 315 switch (os_tmp) { 316 case "win": 317 os_tmp = "Windows"; 318 break; 319 case "mac": 320 os_tmp = "Mac"; 321 break; 322 case "linux": 323 os_tmp = "Linux"; 324 break; 325 default: 326 os_tmp = "Windows"; 327 } 328 jQuery(className + " .product-info-screenshot-v17 h3").html(data[index].title); 329 jQuery(className + " .product-info-screenshot-v17 p").html(data[index].description); 330 if (data[index].product === "17_Data_Dictionary") { 331 jQuery(className + " .product-info-screenshot-v17 .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_" + data[index].product + lang + ".png"); 332 jQuery(className + " .product-info-screenshot-v17 .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_" + data[index].product + lang + ".png"); 333 } else { 334 jQuery(className + " .product-info-screenshot-v17 .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_" + data[index].product + "_" + os_tmp + data[index].image + lang + ".png"); 335 jQuery(className + " .product-info-screenshot-v17 .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_" + data[index].product + "_" + os_tmp + data[index].image + lang + ".png"); 336 } 337 jQuery(className + " .product-info-screenshot-v17 .fancybox").attr("data-fancybox-title", data[index].title); 338 if ((data[index].product === "17_MongoDB" && data[index].image === "_Data_Manipulation") || data[index].product === "17_Data_Dictionary" || data[index].product === "17_Premium_Lite_Import_Export") { 339 jQuery(className + " .product-info-screenshot-v17 .screenshot").css("box-shadow", "none"); 340 jQuery(className + " .product-info-screenshot-v17 .screenshot").css("-webkit-box-shadow", "none"); 341 } else { 342 jQuery(className + " .product-info-screenshot-v17 .screenshot").css("box-shadow", "0 10px 40px rgba(0, 0, 0, 0.2)"); 343 jQuery(className + " .product-info-screenshot-v17 .screenshot").css("-webkit-box-shadow", "0 10px 40px rgba(0, 0, 0, 0.2)"); 344 }�
344 345 } 346 } 347 348 function preloadImage(url) { 349 var img = new Image(); 350 img.src = url; 351 } 352 353 jQuery(".product-info-table-cell-container").each(function () { 354 if (jQuery(this).find(".product-info-table-arrow").length !== 0) { 355 jQuery(this).css("cursor", "pointer"); 356 } 357 }); 358 359 jQuery(".product-info-table-cell-container").click(function () { 360 var window_width = window.innerWidth; 361 var column = 3; 362 var position = 0; 363 var appendPosition = 0; 364 if (jQuery(this).find(".product-info-table-arrow").length !== 0) { 365 if (jQuery(this).hasClass("selected")) { 366 jQuery(this).removeClass("selected"); 367 jQuery(this).siblings(".product-info-table-cell-details-container-appended").remove(); 368 } else { 369 position = jQuery(this).attr("p"); 370 if (window_width < 992) { 371 if (position.substring(0, 1) !== "s") 372 column = 2; 373 if (window_width < 768) { 374 column = 1; 375 } 376 } 377 jQuery(this).siblings().removeClass("selected"); 378 jQuery(this).addClass("selected"); 379 jQuery(this).siblings(".product-info-table-cell-details-container-appended").remove(); 380 appendPosition = Math.min(Math.ceil(position.substring(2) / column) * column, jQuery(this).siblings(".product-info-table-cell-container").length + 1); 381 jQuery(".product-info-table-cell-container[p='" + position.substring(0, 2) + appendPosition + "']").after( 382 "<div class='product-info-table-cell-details-container col-sm-12 product-info-table-cell-details-container-appended'><div class='product-info-table-cell-details-triangle-background'><img src='/images/blue_triangle.png' /></div>" 383 + jQuery(".product-info-table-cell-details-container[p='" + position + "']").html() + "</div>" 384 ); 385 jQuery(this).parent().find(".product-info-table-cell-details-container-appended .product-info-table-cell-details-triangle-background").css("left", Math.round(jQuery(this).position().left - jQuery(this).parent().position().left + jQuery(this).width() / 2 - 38 / 2)); 386 } 387 } 388 }); 389 390 $(window).on("resize", function () { 391 jQuery(".product-info-table-cell-container").removeClass("selected"); 392 jQuery(".product-info-table-cell-container").siblings(".product-info-table-cell-details-container-appended").remove(); 393 }); 394} 395 396function productInfoV18Script(data = []) { 397 const queryString = window.location.search; 398 const urlParams = new URLSearchParams(queryString); 399 const feature = urlParams.get('feature'); 400 401 if(!feature) { 402 jQuery(".info-content-menu-item[index='0']").addClass("selected"); 403 } 404 405 var window_width = window.innerWidth; 406 // calProductInfoBackgroundPosition(); 407 var data_length = data.length; 408 var preloaded_images = []; 409 410 jQuery(".info-content-menu .info-content-menu-item, .info-content-platform-item").click(function () { 411 var ele = jQuery(this); 412 ele.siblings().removeClass("selected"); 413 ele.addClass("selected"); 414 if(ele.hasClass("info-content-menu-item")) { 415 var index = ele.attr("index"); 416 var platform = jQuery(".info-content-platform-item.selected").attr("platform"); 417 jQuery(".info-content-mobile-menu-selected").html(data[index].title); 418 jQuery(".info-content-details .info-content-details-title").html(data[index].slogan); 419 jQuery(".info-content-details .info-content-details-desc").html(data[index].description); 420 jQuery(".info-content-details-screenshot-container .screenshot").removeClass("selected"); 421 jQuery(".info-content-details-screenshot-container .screenshot[index='" + index + "'][platform='" + platform + "']").addClass("selected"); 422 checkScreenshotArrow(index); 423 jQuery(".info-content-details-learn-more-link").attr("href", "/products/" + data[index].link + "?" + jQuery(".info-content-details-learn-more-link").attr("href").split('?')[1]); 424 if((data[index].image_name_1 == "MongoDB" && data[index].image_name_2 == "Data_Editor") || data[index].image_name_2 == "Data_Dictionary" || data[index].image_name_2 == "NoSQL_Support" || data[index].image_name_2 == "Backup_Restore" || data[index].image_name_2 == "Import_Export") { 425 jQuery(".info-container-v18 .screenshot-container .screenshot").addClass("no-shadow"); 426 } else { 427 jQuery(".info-container-v18 .screenshot-container .screenshot").removeClass("no-shadow"); 428 } 429 if(jQuery(".screenshot.selected").length != 0)
430 jQuery(".info-content-details-screenshot-expand").css("right", 10 + jQuery(".screenshot.selected").position().left); 431 } else { 432 var index = jQuery(".info-content-menu-item.selected").attr("index"); 433 var platform = ele.attr("platform"); 434 if(platform == "iOS") { 435 jQuery(".info-content").hide(); 436 jQuery(".info-content.IOS-container").show(); 437 } else { 438 jQuery(".info-content-details-screenshot-container .screenshot").removeClass("selected"); 439 if(!preloaded_images.includes(platform)) { 440 for (let i = 0; i < data.length; i++) { 441 let t = 500; 442 if(index == i || feature == data[i].link) { 443 t = 0; 444 } 445 setTimeout(() => { 446 jQuery(".info-content-details-screenshot-container").append("<a class='fancybox' rel='gallery1' href='" + imageLink(data[i].image_name_1, data[i].image_name_2, platform) + "'><img class='screenshot" + (index == i ? " selected": "") + "' index='" + i + "' platform='" + platform + "' src='" + imageLink(data[i].image_name_1, data[i].image_name_2, platform) + "' /></a>"); 447 if((data[index].image_name_1 == "MongoDB" && data[index].image_name_2 == "Data_Editor") || data[index].image_name_2 == "Data_Dictionary" || data[index].image_name_2 == "NoSQL_Support" || data[index].image_name_2 == "Backup_Restore" || data[index].image_name_2 == "Import_Export") { 448 jQuery(".info-container-v18 .screenshot-container .screenshot").addClass("no-shadow"); 449 } else { 450 jQuery(".info-container-v18 .screenshot-container .screenshot").removeClass("no-shadow"); 451 } 452 }, t); 453 } 454 preloaded_images.push(platform); 455 } else { 456 jQuery(".info-content-details-screenshot-container .screenshot[index='" + index + "'][platform='" + platform + "']").addClass("selected"); 457 } 458 window.location.hash = ele.attr("platform"); 459 setCookie("platform", ele.attr("platform"), 90); 460 jQuery(".info-content").show(); 461 jQuery(".info-content.IOS-container").hide(); 462 } 463 } 464 }); 465 466 jQuery(".info-content-mobile-menu-selected, .info-content-mobile-menu-arrow").click(function () { 467 jQuery(".info-content-mobile-menu, .info-content-mobile-menu-option").toggleClass("open"); 468 if(jQuery(".info-content-mobile-menu").hasClass("open")) { 469 jQuery('.info-content-menu .info-content-menu-item').each(function() { 470 jQuery(".info-content-mobile-menu-option").append(jQuery(this).prop("outerHTML")); 471 }); 472 jQuery(".info-content-mobile-menu-option .info-content-menu-item").click(function () { 473 jQuery(".info-content-menu .info-content-menu-item[index='" + jQuery(this).attr("index") + "']").click(); 474 jQuery(".info-content-mobile-menu-selected").click(); 475 }); 476 } else { 477 jQuery(".info-content-mobile-menu-option").html(""); 478 jQuery(".info-content-mobile-menu-option .info-content-menu-item").off("click"); 479 } 480 }); 481 jQuery(document).on("click", function (event) { 482 if (jQuery(event.target).closest(".info-content-mobile-menu").length === 0) { 483 jQuery(".info-content-mobile-menu, .info-content-mobile-menu-option").removeClass("open"); 484 jQuery(".info-content-mobile-menu-option").html(""); 485 jQuery(".info-content-mobile-menu-option .info-content-menu-item").off("click"); 486 } 487 }); 488 489 jQuery(".info-content-details-arrow > div").click(function () { 490 if(!jQuery(this).hasClass("disabled")) { 491 var index = jQuery(".info-content-menu-item.selected").attr("index"); 492 if(jQuery(this).hasClass("info-content-details-arrow-back")) { 493 jQuery(".info-content-menu .info-content-menu-item[index='" + (Number(index) - 1) + "']").click(); 494 } else { 495 jQuery(".info-content-menu .info-content-menu-item[index='" + (Number(index) + 1) + "']").click(); 496 } 497 } 498 }); 499 500 jQuery(".product-info-table-cell-container").each(function () { 501 if (jQuery(this).find(".product-info-table-arrow").length !== 0) { 502 jQuery(this).css("cursor", "pointer"); 503 } 504 }); 505 jQuery(".product-info-table-cell-container").click(function () { 506 var window_width = window.innerWidth; 507 var column = 3; 508 var position = 0; 509 var appendPosition = 0; 510 if (jQuery(this).find(".product-info-table-arrow").length !== 0) { 511 if (jQuery(this).hasClass("selected")) { 512 jQuery(this).removeClass("selected"); 513 jQuery(this).siblings(".product-info-table-cell-details-container-appended").remove(); 514 } else { 515 position = jQuery(this).attr("p"); 516 if (window_width < 992) { 517 if (position.substring(0, 1) !== "s") 518 column = 2; 519 if (window_width < 768) { 520 column = 1; 521 } 522 } 523 jQuery(this).siblings().removeClass("selected"); 524 jQuery(this).addClass("selected"); 525 jQuery(this).siblings(".product-info-table-cell-details-container-appended").remove(); 526 appendPosition = Math.min(Math.ceil(position.substring(2) / column) * column, jQuery(this).siblings(".product-info-table-cell-container").length + 1); 527 jQuery(".product-info-table-cell-container[p='" + position.substring(0, 2) + appendPosition + "']").after( 528 "<div class='product-info-table-cell-details-container col-sm-12 product-info-table-cell-details-container-appended'><div class='product-info-table-cell-details-triangle-background'><img src='/images/blue_triangle.png' /></div>" 529 + jQuery(".product-info-table-cell-details-container[p='" + position + "']").html() + "</div>" 530 ); 531 jQuery(this).parent().find(".product-info-table-cell-details-container-appended .product-info-table-cell-details-triangle-background").css("left", Math.round(jQuery(this).position().left - jQuery(this).parent().position().left + jQuery(this).width() / 2 - 38 / 2)); 532 } 533 } 534 }); 535 536 jQuery(".info-content-platform-item[OS='" + selectPlatformTab() + "']").click(); 537 if(feature) { 538 jQuery('html, body').animate({ scrollTop: jQuery(".info-content-details-title").offset().top - 100 }, 0); 539 jQuery(document).ready(function() { 540 setTimeout(() => { 541 jQuery(".info-content-menu-item[feature='" + feature + "']").click(); 542 }, 0); 543 }); 544 } 545 546 jQuery(window).on("load", function() {
547 jQuery(".info-content-details-screenshot-expand").css("right", 10 + jQuery(".screenshot.selected").position().left); 548 }); 549 550 jQuery(window).resize(function () { 551 // calProductInfoBackgroundPosition(); 552 jQuery(".product-info-table-cell-container").removeClass("selected"); 553 jQuery(".product-info-table-cell-container").siblings(".product-info-table-cell-details-container-appended").remove(); 554 }); 555 556 function checkScreenshotArrow(i) { 557 jQuery(".info-content-details-arrow > div").removeClass("disabled"); 558 if(i == 0) { 559 jQuery(".info-content-details-arrow-back").addClass("disabled"); 560 } else if(i == data_length - 1) { 561 jQuery(".info-content-details-arrow-next").addClass("disabled"); 562 } 563 } 564 565 function imageLink(image_name_1, image_name_2, platform) { 566 if(image_name_2 == "Data_Dictionary" || image_name_2 == "NoSQL_Support") { 567 return "/images/product_screenshot/Screenshot_Navicat_" + image_name_2 + ".png"; 568 } 569 if(image_name_1 == "") { 570 return "/images/product_screenshot/Screenshot_Navicat_" + platform + "_" + image_name_2 + ".png"; 571 } 572 return "/images/product_screenshot/Screenshot_Navicat_" + image_name_1 + "_" + platform + "_" + image_name_2 + ".png"; 573 } 574 575 //screenshot 576 $(".fancybox").fancybox({openEffect : 'none', closeEffect : 'none' }); 577} 578 579function navicatV18HighlightScript() { 580 var window_width = window.innerWidth; 581 var container_width = jQuery(".container.navicat-v18-highlights").width(); 582 var card_width = 800; 583 var card_width_2 = 1000; 584 var card_margin = 50; 585 586 scrollableLayoutUpdate(); 587 setTimeout(() => { 588 jQuery(".navicat-v18-highlights-header").addClass("loaded"); 589 }, 200); 590 591 jQuery(".navicat-v18-highlights-card-switcher-item").click(function() { 592 var ele = jQuery(this); 593 var card_name = jQuery(this).attr("card"); 594 ele.siblings().removeClass("selected"); 595 ele.addClass("selected"); 596 var card = jQuery(".navicat-v18-highlights-card[card='" + card_name + "']"); 597 card.siblings().removeClass("selected"); 598 card.addClass("selected"); 599 card.parent().animate({ scrollLeft: 0}, 0); 600 scrollableLayoutUpdate(); 601 if(!card.hasClass("navicat-v18-highlights-card-scrollable")) { 602 card.parent().width("auto").css("left", 0); 603 } 604 if(card_name == "data-editor") { 605 jQuery(".navicat-v18-highlights-data-editor").show(); 606 } else { 607 jQuery(".navicat-v18-highlights-data-editor").hide(); 608 } 609 if(card_name == "code-insight") { 610 jQuery(".navicat-v18-highlights-code-insight").show(); 611 if(ele.parent().parent().parent().attr("id") == "navicat-v18-highlights-section-query-editing") 612 jQuery("#navicat-v18-highlights-section-query-editing .navicat-v18-highlights-scrollable-arrow-row").show(); 613 } else { 614 jQuery(".navicat-v18-highlights-code-insight").hide(); 615 if(ele.parent().parent().parent().attr("id") == "navicat-v18-highlights-section-query-editing") 616 jQuery("#navicat-v18-highlights-section-query-editing .navicat-v18-highlights-scrollable-arrow-row").hide(); 617 } 618 card.parent().parent().find(".navicat-v18-highlights-scrollable-arrow").removeClass("disabled"); 619 }); 620 621 jQuery(".navicat-v18-highlights-section-mobile-2 .navicat-v18-highlights-card").click(function() { 622 var ele = jQuery(this); 623 var card_name = jQuery(this).attr("card"); 624 jQuery(".navicat-v18-highlights-card-switcher-item[card='" + card_name + "']").click(); 625 }); 626 627 jQuery(".navicat-v18-highlights-section-mobile-1 .navicat-v18-highlights-card-scrollable .navicat-v18-highlights-card-item").click(function() { 628 if(window_width < 768) { 629 var ele = jQuery(this); 630 ele.siblings().removeClass("selected"); 631 ele.addClass("selected"); 632 } 633 }); 634 635 jQuery(".navicat-v18-highlights-scrollable-arrow").click(function() { 636 var ele = jQuery(this); 637 var scrollable_card = ele.parent().parent().find(".navicat-v18-highlights-card-scrollable.selected"); 638 var number_child = parseInt(scrollable_card.children().length); 639 var current_showing = parseInt(scrollable_card.attr("current")); 640 var card_width_this = card_width; 641 if(scrollable_card.parent().parent().attr("id") == "navicat-v18-highlights-section-query-editing") { 642 card_width_this = card_width_2; 643 } 644 scrollable_card.attr("current"); 645 if(ele.hasClass("navicat-v18-highlights-scrollable-arrow-back")) { 646 if(current_showing == 1 ) { 647 current_showing = 1; 648 } else if(current_showing == number_child) { 649 current_showing = current_showing - 1; 650 } else if(scrollable_card.parent().scrollLeft() % (card_width_this + card_margin) != 0) { 651 current_showing = current_showing; 652 } else { 653 current_showing = current_showing - 1; 654 } 655 } else {
656 if(current_showing + 1 >= number_child) { 657 current_showing = number_child; 658 } else { 659 current_showing = current_showing + 1; 660 } 661 } 662 scrollable_card.parent().animate({ scrollLeft: (current_showing - 1) * (card_width_this + card_margin)}, 300); 663 scrollable_card.attr("current", current_showing); 664 scrollable_card.find(".navicat-v18-highlights-card-item").removeClass("selected"); 665 scrollable_card.find(".navicat-v18-highlights-card-item:nth-child(" + current_showing + ")").addClass("selected"); 666 if(window_width < 992) { 667 ele.siblings().removeClass("disabled"); 668 if(current_showing == 1) { 669 ele.parent().find(".navicat-v18-highlights-scrollable-arrow-back").addClass("disabled"); 670 } else if(current_showing == number_child) { 671 ele.parent().find(".navicat-v18-highlights-scrollable-arrow-next").addClass("disabled"); 672 } 673 } 674 }); 675 676 jQuery(".navicat-v18-highlights-cards-container").on('scroll', function() { 677 var ele = jQuery(this); 678 var card_width_this = card_width; 679 if(ele.parent().attr("id") == "navicat-v18-highlights-section-query-editing") { 680 card_width_this = card_width_2; 681 } 682 var scroll_left_position = jQuery(this).scrollLeft(); 683 var scroll_to = scroll_left_position / (card_width_this + card_margin); 684 ele.find(".navicat-v18-highlights-card-scrollable.selected .navicat-v18-highlights-card-item").each(function() { 685 var ele_2 = jQuery(this); 686 var id = parseInt(ele_2.index()); 687 if(id - scroll_to > 0.6) { 688 ele_2.removeClass("active"); 689 } else if (id - scroll_to < -0.5) { 690 ele_2.removeClass("active"); 691 } else { 692 ele_2.addClass("active"); 693 } 694 }); 695 if(scroll_left_position % (card_width_this + card_margin) == 0) { 696 scroll_to = scroll_left_position / (card_width_this + card_margin) + 1; 697 } 698 ele.find(".navicat-v18-highlights-card-scrollable.selected").attr("current", Math.ceil(scroll_to)); 699 ele.find(".navicat-v18-highlights-card-scrollable.selected .navicat-v18-highlights-card-item").removeClass("selected"); 700 ele.find(".navicat-v18-highlights-card-scrollable.selected .navicat-v18-highlights-card-item:nth-child(" + Math.ceil(scroll_to) + ")").addClass("selected"); 701 }); 702 703 function scrollableLayoutUpdate() { 704 jQuery(".navicat-v18-highlights-card-scrollable").each(function() { 705 var ele = jQuery(this); 706 if(ele.hasClass("selected")) { 707 var card_width_this = card_width; 708 if(ele.parent().parent().attr("id") == "navicat-v18-highlights-section-query-editing") { 709 card_width_this = card_width_2; 710 } 711 var container_margin = (window_width - container_width) / 2; 712 713 var child = ele.children().length; 714 ele.css("padding", "0px"); 715 ele.width(child * card_width_this + (child - 1) * card_margin + container_margin * 2); 716 ele.parent().width(window_width); 717 ele.parent().css("left", -container_margin); 718 ele.css("padding", "0px " + container_margin + "px"); 719 } 720 }); 721 } 722 723 jQuery(window).resize(function() { 724 window_width = window.innerWidth; 725 container_width = jQuery(".container.navicat-v18-highlights").width(); 726 scrollableLayoutUpdate(); 727 }); 728} 729 730function navicatDataModelerV5HighlightScript() { 731 var window_width = window.innerWidth; 732 var container_width = jQuery(".container.navicat-v18-highlights").width(); 733 734 setTimeout(() => { 735 jQuery(".navicat-v18-highlights-header").addClass("loaded"); 736 }, 200); 737 738 calLayout(); 739 740 jQuery(window).resize(function() { 741 window_width = window.innerWidth; 742 container_width = jQuery(".container.navicat-v18-highlights").width(); 743 calLayout(); 744 }); 745 746 function calLayout() { 747 var container_margin = (window_width - container_width) / 2; 748 jQuery("#navicat-v18-highlights-section-naming-standards-glossary, #navicat-v18-highlights-section-import-sql-to-model, #navicat-v18-highlights-section-parameters, #navicat-v18-highlights-section-auto-refresh").width(window_width).css("left", -container_margin); 749 } 750 751} 752 753function productFeatureScript() { 754 var window_width = window.innerWidth; 755 var html_height = jQuery("html").height(); 756 var mobile_menu_height = 0;
757 calProductInfoBackgroundPosition(); 758 jQuery(".product-feature-mobile-menu-title").html(jQuery(".info-content-menu-title").html()); 759 jQuery('.info-content-menu .info-content-menu-item').each(function() { 760 jQuery(".product-feature-mobile-menu-items").append(jQuery(this).parent().prop("outerHTML")); 761 mobile_menu_height = mobile_menu_height + 40; 762 }); 763 jQuery(".product-feature-mobile-menu-items").height(mobile_menu_height); 764 765 jQuery(".product-feature-mobile-menu-header").click(function() { 766 jQuery(".product-feature-mobile-menu").toggleClass("open"); 767 }); 768 769 jQuery(".info-content-platform-item").click(function() { 770 var ele = jQuery(this); 771 var original_platform = jQuery(".info-content-platform-item.selected").attr("platform"); 772 var new_platform = ele.attr("platform"); 773 jQuery('.product-feature-section img').each(function() { 774 jQuery(this).attr("src", jQuery(this).attr("src").replace(original_platform, new_platform)); 775 }); 776 jQuery('.product-feature-section .fancybox').each(function() { 777 jQuery(this).attr("href", jQuery(this).attr("href").replace(original_platform, new_platform)); 778 }); 779 ele.siblings().removeClass("selected"); 780 ele.addClass("selected"); 781 window.location.hash = ele.attr("platform"); 782 setCookie("platform", ele.attr("platform"), 90); 783 }); 784 785 jQuery(".info-content-platform-item[OS='" + selectPlatformTab() + "']").click(); 786 787 jQuery(".info-content-left-fix").append(jQuery(".info-content-left-
787original").html()); 788 jQuery(".info-content-left-fix").width(jQuery(".info-content-left-original").width()); 789 790 jQuery(window).on("load", function() { 791 html_height = jQuery("html").height(); 792 }); 793 794 jQuery(window).on('scroll', function() { 795 html_height = jQuery("html").height(); 796 var scroll_position = jQuery(this).scrollTop(); 797 var bottom_position = html_height - jQuery(".modules-sitemap").height() - jQuery(".modules-footer").height() - jQuery(".info-content-left-fix .info-content-menu").height() - 130; 798 if(bottom_position - scroll_position < 0 && scroll_position > 70) { 799 jQuery(".info-content-left-fix").removeClass("show-fix"); 800 jQuery(".info-content-left-original .info-content-menu").show(); 801 jQuery(".product-feature-container .info-content-left").addClass("bottom-show"); 802 } else if(scroll_position > 70) { 803 jQuery(".info-content-left-fix").addClass("show-fix"); 804 jQuery(".info-content-left-original .info-content-menu").hide(); 805 jQuery(".product-feature-container .info-content-left").removeClass("bottom-show"); 806 } else { 807 jQuery(".info-content-left-fix").removeClass("show-fix");
808 jQuery(".info-content-left-original .info-content-menu").show(); 809 jQuery(".product-feature-container .info-content-left").removeClass("bottom-show"); 810 } 811 }); 812 813 jQuery(window).resize(function () { 814 html_height = jQuery("html").height(); 815 calProductInfoBackgroundPosition(); 816 jQuery(".info-content-left-fix").width(jQuery(".info-content-left-original").width()); 817 }); 818 819 //screenshot 820 $(".fancybox").fancybox({openEffect : 'none', closeEffect : 'none' }); 821 822 jQuery(document).ready(function () { 823 jQuery(".product-feature-section-column").each(function() { 824 if(jQuery(this).siblings().height() == 0) { 825 if(jQuery(this).height() != 0) { 826 let title = ""; 827 let desc = ""; 828 if(jQuery(this).find(".info-content-details-title")[0]) { 829 title = jQuery(this).find(".info-content-details-title")[0].outerHTML; 830 } 831 if(jQuery(this).find(".info-content-details-desc")[0]) { 832 desc = jQuery(this).find(".info-content-details-desc")[0].outerHTML; 833 } 834 jQuery(this).append("<div class='info-content-details'>" + title + desc + "</div>"); 835 jQuery(this).addClass("single-column"); 836 } 837 } 838 }); 839 }); 840} 841 842function calProductInfoBackgroundPosition() { 843 window_width = window.innerWidth 844 jQuery(".info-content-background").width(window.innerWidth).offset({left: 0}); 845} 846 847function productInfoDataModelerScript() {
848 jQuery(".modeler-v5-item").click(function() { 849 jQuery(".modeler-v5-item").removeClass("selected"); 850 jQuery(this).addClass("selected"); 851 }); 852 853 jQuery(".modeler-v5-card-selector-item").click(function() { 854 var ele = jQuery(this); 855 var card_name = ele.attr("card"); 856 ele.siblings().removeClass("selected"); 857 ele.addClass("selected"); 858 859 jQuery(".modeler-v5-card-selector-section .modeler-v5-card").removeClass("selected"); 860 jQuery(".modeler-v5-card-selector-section .modeler-v5-card[card='" + card_name + "']").addClass("selected"); 861 }); 862 863 jQuery(".product-info-switcher").click(function() { 864 var ele = jQuery(this); 865 var platform = ele.attr("platform"); 866 var platform_from = jQuery(".product-info-switcher.selected").attr("platform"); 867 ele.siblings().removeClass("selected"); 868 ele.addClass("selected"); 869 jQuery(".modeler-v5-images img").each(function () { 870 jQuery(this).attr("src", jQuery(this).attr("src").replace(platform_from, platform)); 871 }); 872 }); 873} 874 875function productInfoBIScript() { 876 jQuery(".charts-creator-v17-product-info-tab").click(function () { 877 let index = jQuery(this).attr("index"); 878 changeBITab(index); 879 if (jQuery(this).parent().parent().hasClass("charts-creator-v17-product-info-tab-sticky")) { 880 jQuery("html, body").scrollTop(jQuery(".charts-creator-v17-product-info-tab-container[real='y']").offset().top); 881 } 882 }); 883 884 jQuery(".charts-creator-v17-product-info-tab-arrow:last-child").click(function () { 885 let index = jQuery(".charts-creator-v17-product-info-tab.selected").attr("index"); 886 if (index < 4) { 887 index++; 888 changeBITab(index); 889 } 890 }); 891 892 jQuery(".charts-creator-v17-product-info-tab-arrow:first-child").click(function () { 893 let index = jQuery(".charts-creator-v17-product-info-tab.selected").attr("index"); 894 if (index > 1) { 895 index--; 896 changeBITab(index); 897 } 898 }); 899 900 jQuery("#charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-custom-field-title").click(function () { 901 let index = jQuery(this).attr("index"); 902 jQuery("#charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-custom-field-title, #charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-custom-field-image .screenshot-container, #charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-custom-field-image p").removeClass("selected"); 903 jQuery(this).addClass("selected"); 904 jQuery("#charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-custom-field-image .screenshot-container[index=" + index + "], #charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-custom-field-image p[index=" + index + "]").addClass("selected"); 905 }); 906 907 jQuery("#charts-creator-v17-product-info-chart-types .charts-creator-v17-product-info-chart-types-title").click(function () { 908 let index = jQuery(this).attr("index"); 909 jQuery("#charts-creator-v17-product-info-chart-types .charts-creator-v17-product-info-chart-types-title, #charts-creator-v17-product-info-chart-types .charts-creator-v17-product-info-chart-types-image img").removeClass("selected"); 910 jQuery(this).addClass("selected"); 911 jQuery("#charts-creator-v17-product-info-chart-types .charts-creator-v17-product-info-chart-types-image img[index=" + index + "]").addClass("selected"); 912 }); 913 914 function changeBITab(index) { 915 jQuery(".charts-creator-v17-product-info-tab, .charts-creator-v17-product-info-tab-content").removeClass("selected mobile-show"); 916 jQuery(".charts-creator-v17-product-info-tab[index=" + index + "]").addClass("selected"); 917 jQuery(".charts-creator-v17-product-info-tab-content[index=" + index + "]").addClass("selected"); 918 if (jQuery(".charts-creator-v17-product-info-tab:not(.charts-creator-v17-product-info-tab~.charts-creator-v17-product-info-tab)").hasClass("selected")) { 919 for (let i = 1; i <= 3; i++) { 920 jQuery(".charts-creator-v17-product-info-tab[index=" + i + "]").addClass("mobile-show"); 921 } 922 } else { 923 for (let i = 2; i <= 4; i++) { 924 jQuery(".charts-creator-v17-product-info-tab[index=" + i + "]").addClass("mobile-show"); 925 } 926 } 927 jQuery(".charts-creator-v17-product-info-tab-arrow:first-child, .charts-creator-v17-product-info-tab-arrow:last-child").removeClass("hide"); 928 if (parseInt(index) === 1) { 929 jQuery(".charts-creator-v17-product-info-tab-arrow:first-child").addClass("hide"); 930 } else if (parseInt(index) === 4) { 931 jQuery(".charts-creator-v17-product-info-tab-arrow:last-child").addClass("hide"); 932 } 933 } 934 935 var window_width = window.innerWidth; 936 customFieldMargin(window_width); 937 jQuery(window).resize(function () { 938 window_width = window.innerWidth; 939 customFieldMargin(window_width); 940 }); 941 function customFieldMargin(window_width) { 942 if (window_width >= 992) { 943 let height = jQuery("#charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-card-column:first-child").height(); 944 jQuery("#charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-card-column:last-child").height(height); 945 } else { 946 jQuery("#charts-creator-v17-product-info-custom-field .charts-creator-v17-product-info-card-column:last-child").height("auto"); 947 } 948 } 949 950 jQuery(document).on("scroll", function () { 951 let scroll = jQuery(document).scrollTop(); 952 if (jQuery(".charts-creator-v17-product-info-tab-container[real='y']").length != 0) { 953 let position = jQuery(".charts-creator-v17-product-info-tab-container[real='y']").offset().top; 954 if (scroll >= position - jQuery(".sub-navigation-bar").height() - 10) { 955 jQuery(".charts-creator-v17-product-info-tab-sticky").addClass("show"); 956 } else { 957 jQuery(".charts-creator-v17-product-info-tab-sticky").removeClass("show"); 958 } 959 } 960 }); 961} 962 963function productInfoBI2Script() { 964 var window_width = window.innerWidth; 965 var container_width = jQuery(".container.navicat-v18-highlights").width(); 966
967 jQuery(".bi-v17-product-info-item").click(function () { 968 let element = jQuery(this); 969 calSectionContainerScrollLeft(element) 970 }); 971 972 jQuery(".bi-v17-product-info-card").click(function () { 973 let card = jQuery(this).attr("card") 974 if (card === undefined) { 975 card = jQuery(this).attr("card-to") 976 } 977 jQuery(".bi-v17-product-info-item[card='" + card + "']").click(); 978 }); 979 980 jQuery(".bi-v17-product-info-card-expand-arrow").click(function () { 981 let element = jQuery(this); 982 let element_card = element.parent().parent(); 983 let card = element_card.attr("card"); 984 let element_row_item = element_card.parent().prev().find(".bi-v17-product-info-item[card='" + card + "']"); 985 element_card.siblings().removeClass("selected"); 986 element_card.addClass("selected"); 987 element_row_item.siblings().removeClass("selected"); 988 element_row_item.addClass("selected"); 989 }); 990 991 jQuery(".bi-v17-product-info-card-container").width(jQuery("body").width() - 1) 992 let left_space = (jQuery("body").outerWidth(true) - jQuery(".container").width()) / 2; 993 jQuery(".bi-v17-product-info-card-container").css("left", -left_space); 994 jQuery(".bi-v17-product-info-item.selected").click(); 995 jQuery(".bi-v17-product-info-item-row-scroll").width(window_width - 70); 996 997 jQuery(".arrow-previous").click(function () { 998 if((jQuery(".bi-v17-product-info-item-row-scroll").scrollLeft() - window_width / 4) <= 0) { 999 jQuery(".arrow-previous.arrow-grey").show(); 1000 jQuery(".arrow-previous.arrow-blue").hide(); 1001 } else { 1002 jQuery(".arrow-previous.arrow-grey").hide(); 1003 jQuery(".arrow-previous.arrow-blue").show(); 1004 } 1005 if((jQuery(".bi-v17-product-info-item-row-scroll").scrollLeft() - window_width / 4) >= (jQuery(".bi-v17-product-info-item-row").width())) { 1006 jQuery(".arrow-next.arrow-grey").show(); 1007 jQuery(".arrow-next.arrow-blue").hide(); 1008 } else { 1009 jQuery(".arrow-next.arrow-grey").hide(); 1010 jQuery(".arrow-next.arrow-blue").show(); 1011 } 1012 jQuery(".bi-v17-product-info-item-row-scroll").animate({ 1013 scrollLeft: jQuery(".bi-v17-product-info-item-row-scroll").scrollLeft() - window_width / 4 1014 }, 300); 1015 }); 1016 1017 jQuery(".arrow-next").click(function () { 1018 if((jQuery(".bi-v17-product-info-item-row-scroll").scrollLeft() + window_width / 4) <= 0) { 1019 jQuery(".arrow-previous.arrow-grey").show(); 1020 jQuery(".arrow-previous.arrow-blue").hide(); 1021 } else { 1022 jQuery(".arrow-previous.arrow-grey").hide(); 1023 jQuery(".arrow-previous.arrow-blue").show(); 1024 } 1025 if((jQuery(".bi-v17-product-info-item-row-scroll").scrollLeft() + window_width / 4) >= (jQuery(".bi-v17-product-info-item-row").width())) { 1026 jQuery(".arrow-next.arrow-grey").show(); 1027 jQuery(".arrow-next.arrow-blue").hide(); 1028 } else { 1029 jQuery(".arrow-next.arrow-grey").hide(); 1030 jQuery(".arrow-next.arrow-blue").show(); 1031 } 1032 jQuery(".bi-v17-product-info-item-row-scroll").animate({ 1033 scrollLeft: jQuery(".bi-v17-product-info-item-row-scroll").scrollLeft() + window_width / 4 1034 }, 300); 1035 }); 1036 1037 jQuery(window).resize(function () { 1038 window_width = window.innerWidth; 1039 container_width = jQuery(".container.navicat-v18-highlights").width(); 1040 1041 jQuery(".bi-v17-product-info-section").each(function () { 1042 let element = jQuery(this).find(".bi-v17-product-info-item.selected"); 1043 if (element.length != 0) 1044 calSectionContainerScrollLeft(element) 1045 }); 1046 jQuery(".bi-v17-product-info-card").each(function () { 1047 jQuery(this).outerHeight(jQuery(this).parent().height()); 1048 }); 1049 jQuery(".bi-v17-product-info-card-container").width(jQuery("body").width() - 1) 1050 left_space = (jQuery("body").outerWidth(true) - jQuery(".container").width()) / 2; 1051 jQuery(".bi-v17-product-info-card-container").css("left", -left_space); 1052 jQuery(".bi-v17-product-info-item.selected").click(); 1053 jQuery(".bi-v17-product-info-item-row-scroll").width(window_width - 70); 1054 }); 1055 1056 function calSectionContainerScrollLeft(element) { 1057 let window_width = window.innerWidth; 1058 let element_card_container = element.parent().parent().next(); 1059 if(element.hasClass("bi-v17-product-info-item-scroll") ){ 1060 element_card_container = element.parent().parent().parent().next(); 1061 } 1062 if (window_width < 767) { 1063 element_card_container.scrollLeft(0); 1064 } else { 1065 let card = element.attr("card"); 1066 let element_card = element_card_container.find(".bi-v17-product-info-card[card='" + card + "']") 1067 element.siblings().removeClass("selected"); 1068 element.addClass("selected"); 1069 element_card.siblings().removeClass("selected"); 1070 element_card.addClass("selected"); 1071 element_card_container.scrollLeft(element_card_container.scrollLeft() + element_card.position().left - left_space); 1072 } 1073 } 1074 1075 jQuery(".bi-v17-product-info-card-content-switcher-title div").click(function () { 1076 let title = jQuery(this); 1077 let content = jQuery(this).parent().parent().find(".bi-v17-product-info-card-content-switcher-content[content='" + title.attr("content") + "']"); 1078 title.siblings().removeClass("selected"); 1079 title.addClass("selected"); 1080 content.siblings().removeClass("selected"); 1081 content.addClass("selected"); 1082 }); 1083 1084 jQuery(window).on('load', function () { 1085 jQuery(".bi-v17-product-info-card").each(function () { 1086 jQuery(this).outerHeight(jQuery(this).parent().height()); 1087 }); 1088 }) 1089} 1090 1091function productInfoOnPremScript() { 1092 var position = []; 1093 var window_width = window.innerWidth; 1094 var window_height = window.innerHeight; 1095 var start = jQuery(".parallax-scrolling-fix-img").offset().top - window.innerHeight; 1096 var end = jQuery(".parallax-scrolling-fix-img").offset().top - window.innerHeight / 2; 1097 1098 getPosition(); 1099 calImagePosition(); 1100
1101 jQuery(".plan-v17-tab").click(function () { 1102 this_id = jQuery(this).attr("id"); 1103 jQuery(".plan-v17-tab").removeClass("selected"); 1104 jQuery(this).addClass("selected"); 1105 jQuery(".info-content").hide(); 1106 jQuery(".info-content." + this_id).show(); 1107 }); 1108 1109 jQuery(window).resize(function () { 1110 window_width = window.innerWidth; 1111 window_height = window.innerHeight; 1112 start = jQuery(".parallax-scrolling-fix-img").offset().top - window.innerHeight; 1113 end = jQuery(".parallax-scrolling-fix-img").offset().top - window.innerHeight / 2; 1114 getPosition(); 1115 calImagePosition(); 1116 }); 1117 1118 jQuery(document).on("scroll", function () { 1119 calImagePosition(); 1120 }); 1121 1122 function getPosition() { 1123 position = []; 1124 jQuery(".parallax-scrolling-moving-img").each(function () { 1125 let target_x; 1126 let target_y; 1127 let x; 1128 let y; 1129 jQuery("#" + this.id).removeAttr('style'); 1130 if (window_width < 1400) { 1131 if (window_width < 1199) { 1132 if (window_width < 991) { 1133 target_x = jQuery("#" + this.id).attr("target-x-720"); 1134 target_y = jQuery("#" + this.id).attr("target-y-720"); 1135 } else { 1136 target_x = jQuery("#" + this.id).attr("target-x-940"); 1137 target_y = jQuery("#" + this.id).attr("target-y-940"); 1138 } 1139 } else { 1140 target_x = jQuery("#" + this.id).attr("target-x-1140"); 1141 target_y = jQuery("#" + this.id).attr("target-y-1140"); 1142 } 1143 } else { 1144 target_x = jQuery("#" + this.id).attr("target-x"); 1145 target_y = jQuery("#" + this.id).attr("target-y"); 1146 } 1147 x = jQuery("#" + this.id).position().left; 1148 y = jQuery("#" + this.id).position().top; 1149 position.push({ "id": this.id, "target_x": target_x, "target_y": target_y, "x": x, "y": y }); 1150 }); 1151 } 1152 1153 function calImagePosition() { 1154 let scroll = jQuery(document).scrollTop(); 1155 if (scroll >= end) { 1156 position.forEach(function (arrayItem) { 1157 jQuery("#" + arrayItem.id).css({ "top": arrayItem.target_y + "px", "left": arrayItem.target_x + "px" }); 1158 }); 1159 } else { 1160 if (scroll <= start) { 1161 position.forEach(function (arrayItem) { 1162 jQuery("#" + arrayItem.id).removeAttr("style"); 1163 }); 1164 } else { 1165 position.forEach(function (arrayItem) { 1166 jQuery("#" + arrayItem.id).css("left", arrayItem.x + (arrayItem.target_x - arrayItem.x) / (end - start) * (scroll - start)); 1167 jQuery("#" + arrayItem.id).css("top", arrayItem.y - (arrayItem.y - arrayItem.target_y) / (end - start) * (scroll - start)); 1168 }); 1169 } 1170 } 1171 if (scroll >= (jQuery(".parallax-scrolling-mobile").offset().top - window.innerHeight * 0.8)) { 1172 jQuery(".parallax-scrolling-mobile img:last-child").addClass("show"); 1173 } 1174 else { 1175 jQuery(".parallax-scrolling-mobile img:last-child").removeClass("show"); 1176 } 1177 } 1178} 1179 1180function whatisNavicatForMongodb(a, b, lang) { 1181 var OS = location.hash.substr(1); 1182 if (OS == "") { 1183 OS = getOS(); 1184 } 1185 1186 jQuery(".product-info-switcher").removeClass("selected"); 1187 if (OS == "W") { 1188 jQuery(".product-info-switcher[os='Windows']").addClass("selected"); 1189 jQuery(".product-info-features-content.Windows").show(); 1190 } else if (OS == "M") { 1191 jQuery(".product-info-switcher[os='Mac']").addClass("selected"); 1192 jQuery(".product-info-features-content.Mac").show(); 1193 } else { 1194 jQuery(".product-info-switcher[os='Windows']").addClass("selected"); 1195 jQuery(".product-info-features-content.Windows").show(); 1196 } 1197 1198 //product-info 1199 jQuery(".product-info .product-info-switcher").click(function () { 1200 var ele = jQuery(this); 1201 ele.siblings().removeClass("selected"); 1202 ele.addClass("selected"); 1203 jQuery(".product-info .product-info-features-content").hide(); 1204 jQuery(".product-info .product-info-features-content." + ele.attr("os")).show(); 1205 }); 1206 1207 //object-design 1208 jQuery(".object-design .product-info-switcher").click(function () { 1209 var ele = jQuery(this); 1210 var os = ele.attr("os"); 1211 var ver = ""; 1212 var name = ""; 1213 ele.siblings().removeClass("selected"); 1214 ele.addClass("selected"); 1215 1216 jQuery(".object-design-options span").each(function () { 1217 if (jQuery(this).hasClass("selected")) { 1218 ver = jQuery(this).attr("id"); 1219 name = jQuery(this).attr("name"); 1220 } 1221 }) 1222 if (ver === "pipeline") { 1223 jQuery(".object-design .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Aggregation_Pipeline" + lang + ".png"); 1224 jQuery(".object-design .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Aggregation_Pipeline" + lang + ".png"); 1225 } else if (ver === "GridFS") { 1226 jQuery(".object-design .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_GridFS" + lang + ".png"); 1227 jQuery(".object-design .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_GridFS" + lang + ".png"); 1228 } else if (ver === "MapReduce") { 1229 jQuery(".object-design .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Map_Reduce" + lang + ".png"); 1230 jQuery(".object-design .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Map_Reduce" + lang + ".png"); 1231 } else if (name !== "") { 1232 jQuery(".object-design .fancybox").attr("href", "/images/" + name + os + ver + lang + ".png"); 1233 jQuery(".object-design .screenshot").attr("src", "/images/" + name + os + ver + lang + ".png"); 1234 } else { 1235 jQuery(".object-design .fancybox").attr("href", "/images/06.07_Navicat_for_MongoDB_02_" + ver + "_" + os + lang + ".png"); 1236 jQuery(".object-design .screenshot").attr("src", "/images/06.07_Navicat_for_MongoDB_02_" + ver + "_" + os + lang + ".png"); 1237 } 1238 }); 1239 1240 1241 jQuery(".object-design-options span").click(function () { 1242 var ele = jQuery(this); 1243 var ver = ele.attr("id"); 1244 var name = ele.attr("name"); 1245 var os = ""; 1246 ele.siblings().removeClass("selected"); 1247 ele.addClass("selected"); 1248 1249 jQuery(".object-design .product-info-switcher").each(function () { 1250 if (jQuery(this).hasClass("selected")) { 1251 os = jQuery(this).attr("os"); 1252 } 1253 }) 1254 if (ver === "pipeline") { 1255 jQuery(".object-design .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Aggregation_Pipeline" + lang + ".png"); 1256 jQuery(".object-design .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Aggregation_Pipeline" + lang + ".png"); 1257 } else if (ver === "GridFS") { 1258 jQuery(".object-design .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_GridFS" + lang + ".png"); 1259 jQuery(".object-design .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_GridFS" + lang + ".png"); 1260 } else if (ver === "MapReduce") { 1261 jQuery(".object-design .fancybox").attr("href", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Map_Reduce" + lang + ".png"); 1262 jQuery(".object-design .screenshot").attr("src", "/images/product_screenshot/Screenshot_Navicat_17_MongoDB_" + os + "_Map_Reduce" + lang + ".png"); 1263 } else if (name !== "") { 1264 jQuery(".object-design .fancybox").attr("href", "/images/" + name + os + ver + lang + ".png"); 1265 jQuery(".object-design .screenshot").attr("src", "/images/" + name + os + ver + lang + ".png"); 1266 } else { 1267 jQuery(".object-design .fancybox").attr("href", "/images/06.07_Navicat_for_MongoDB_02_" + ver + "_" + os + lang + ".png"); 1268 jQuery(".object-design .screenshot").attr("src", "/images/06.07_Navicat_for_MongoDB_02_" + ver + "_" + os + lang + ".png"); 1269 } 1270 }); 1271 1272 //Data 1273 jQuery(".data .product-info-switcher").click(function () { 1274 var ele = jQuery(this); 1275 var os = ele.attr("os"); 1276 var ver = ""; 1277 var name = ""; 1278 ele.siblings().removeClass("selected"); 1279 ele.addClass("selected"); 1280 1281 jQuery(".data-options span").each(function () { 1282 if (jQuery(this).hasClass("selected")) { 1283 ver = jQuery(this).attr("id"); 1284 name = jQuery(this).attr("name"); 1285 } 1286 }) 1287 if (name !== "") { 1288 jQuery(".data .fancybox").attr("href", "/images/" + name + os + ver + lang + ".png"); 1289 jQuery(".data .screenshot").attr("src", "/images/" + name + os + ver + lang + ".png"); 1290 } else if (lang == "" || lang == "_CHT" || lang == "_ES" || lang == "_FR" || lang == "_DE" || lang == "_KR" || lang == "_PL" || lang == "_RU") { 1291 jQuery(".data .fancybox").attr("href", "/images/Screenshot_Navicat_16_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1292 jQuery(".data .screenshot").attr("src", "/images/Screenshot_Navicat_16_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1293 } else { 1294 jQuery(".data .fancybox").attr("href", "/images/06.07_Navicat_for_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1295 jQuery(".data .screenshot").attr("src", "/images/06.07_Navicat_for_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1296 } 1297 }); 1298 1299 jQuery(".data-options span").click(function () { 1300 var ele = jQuery(this); 1301 var ver = ele.attr("id"); 1302 var name = ele.attr("name"); 1303 var os = ""; 1304 ele.siblings().removeClass("selected"); 1305 ele.addClass("selected"); 1306 1307 jQuery(".data .product-info-switcher").each(function () { 1308 if (jQuery(this).hasClass("selected")) { 1309 os = jQuery(this).attr("os"); 1310 } 1311 }) 1312 if (name !== "") { 1313 jQuery(".data .fancybox").attr("href", "/images/" + name + os + ver + lang + ".png"); 1314 jQuery(".data .screenshot").attr("src", "/images/" + name + os + ver + lang + ".png"); 1315 } else if (lang == "" || lang == "_CHT" || lang == "_ES" || lang == "_FR" || lang == "_DE" || lang == "_KR" || lang == "_PL" || lang == "_RU") { 1316 jQuery(".data .fancybox").attr("href", "/images/Screenshot_Navicat_16_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1317 jQuery(".data .screenshot").attr("src", "/images/Screenshot_Navicat_16_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1318 } else { 1319 jQuery(".data .fancybox").attr("href", "/images/06.07_Navicat_for_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1320 jQuery(".data .screenshot").attr("src", "/images/06.07_Navicat_for_MongoDB_03_Data_" + ver + "_" + os + lang + ".png"); 1321 } 1322 }); 1323 1324 jQuery(".modeling-icon-container").mouseover(function () { 1325 var ele = jQuery(this); 1326 var tool = jQuery(this).attr("tool"); 1327 var img = ""; 1328 ele.siblings().removeClass("selected"); 1329 ele.addClass("selected"); 1330 switch (tool) { 1331 case "Codecompletion": 1332 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.Codecompletion); 1333 break; 1334 case "QueryBuilder": 1335 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.QueryBuilder); 1336 break; 1337 case "Snippet": 1338 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.Snippet); 1339 break; 1340 case "DataSync": 1341 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.DataSync); 1342 break; 1343 case "DataTransfer": 1344 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.DataTransfer); 1345 break; 1346 case "ImportExport": 1347 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.ImportExport); 1348 break; 1349 case "Automation": 1350 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.Automation); 1351 break; 1352 case "BI": 1353 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.BI); 1354 break; 1355 case "Model": 1356 jQuery(".nav-for-mongodb-section.productivity .desc").html(a.Model); 1357 break; 1358 } 1359 }); 1360 1361 jQuery(".modeling-tools-row-mobile .options span").mouseover(function () { 1362 var ele = jQuery(this); 1363 var tool = jQuery(this).attr("id"); 1364 ele.siblings().removeClass("selected"); 1365 ele.addClass("selected"); 1366 switch (tool) { 1367 case "Codecompletion": 1368 jQuery(".modeling-tools-row-mobile .desc").html(a.Codecompletion); 1369 jQuery(".modeling-tools-row-mobile .title").html(b.Codecompletion); 1370 img = "Product_Info_Feature_CodeCompletion.svg"; 1371 break; 1372 case "QueryBuilder": 1373 jQuery(".modeling-tools-row-mobile .desc").html(a.QueryBuilder); 1374 jQuery(".modeling-tools-row-mobile .title").html(b.QueryBuilder); 1375 img = "Product_Info_Feature_QueryBuilder.svg"; 1376 break; 1377 case "Snippet": 1378 jQuery(".modeling-tools-row-mobile .desc").html(a.Snippet); 1379 jQuery(".modeling-tools-row-mobile .title").html(b.Snippet); 1380 img = "Product_Info_Feature_Snippet.svg"; 1381 break; 1382 case "DataSync": 1383 jQuery(".modeling-tools-row-mobile .desc").html(a.DataSync); 1384 jQuery(".modeling-tools-row-mobile .title").html(b.DataSync); 1385 img = "Product_Info_Feature_DataSync.svg"; 1386 break; 1387 case "DataTransfer": 1388 jQuery(".modeling-tools-row-mobile .desc").html(a.DataTransfer); 1389 jQuery(".modeling-tools-row-mobile .title").html(b.DataTransfer); 1390 img = "Product_Info_Feature_DataTransfer.svg"; 1391 break; 1392 case "ImportExport": 1393 jQuery(".modeling-tools-row-mobile .desc").html(a.ImportExport); 1394 jQuery(".modeling-tools-row-mobile .title").html(b.ImportExport); 1395 img = "Product_Info_Feature_ImportExport.svg"; 1396 break; 1397 case "Automation": 1398 jQuery(".modeling-tools-row-mobile .desc").html(a.Automation); 1399 jQuery(".modeling-tools-row-mobile .title").html(b.Automation); 1400 img = "Product_Info_Feature_Automation.svg"; 1401 break; 1402 case "BI": 1403 jQuery(".modeling-tools-row-mobile .desc").html(a.BI); 1404 jQuery(".modeling-tools-row-mobile .title").html(b.BI); 1405 img = "Product_Info_Feature_Charts.svg"; 1406 break; 1407 case "Model": 1408 jQuery(".modeling-tools-row-mobile .desc").html(a.Model); 1409 jQuery(".modeling-tools-row-mobile .title").html(b.Model); 1410 img = "Product_Info_Feature_Model.svg"; 1411 break; 1412 } 1413 jQuery(".modeling-tools-row-mobile .image>img").attr("src", "/images/" + img); 1414 }); 1415 1416 jQuery(".ndm-screenshot-selector > div:not(.clear)").click(function () { 1417 var ele = jQuery(this); 1418 ele.siblings().removeClass("selected"); 1419 ele.addClass("selected"); 1420 var flag = ele.attr("flag"); 1421 jQuery(".hidden-content[flag='" + flag + "']").siblings().hide(); 1422 jQuery(".hidden-content[flag='" + flag + "']").show(); 1423 }); 1424 1425 jQuery(".modeling-icon-container-arrow-next").click(function () { 1426 let index = jQuery(".modeling-icon-container.counter").attr("index"); 1427 if (index < 5) { 1428 index++; 1429 } 1430 hideModelingIcon(index); 1431 }); 1432 jQuery(".modeling-icon-container-arrow-back").click(function () { 1433 let index = jQuery(".modeling-icon-container.counter").attr("index"); 1434 if (index > 1) { 1435 index--; 1436 } 1437 hideModelingIcon(index); 1438 }); 1439
1440 if (jQuery(".modeling-icon-container").hasClass("modeling-icon-container-arrow-back")) { 1441 hideModelingIcon(1); 1442 } 1443 1444 function hideModelingIcon(index) { 1445 jQuery(".modeling-icon-container-arrow-back").css("opacity", 1); 1446 jQuery(".modeling-icon-container-arrow-next").css("opacity", 1); 1447 let show = [1, 2, 3, 4, 5]; 1448 switch (parseInt(index)) { 1449 case 1: 1450 show = [1, 2, 3, 4, 5]; 1451 jQuery(".modeling-icon-container-arrow-back").css("opacity", 0.5); 1452 break; 1453 case 2: 1454 show = [2, 3, 4, 5, 6]; 1455 break; 1456 case 3: 1457 show = [3, 4, 5, 6, 7]; 1458 break; 1459 case 4: 1460 show = [4, 5, 6, 7, 8]; 1461 break; 1462 default: 1463 show = [5, 6, 7, 8, 9]; 1464 jQuery(".modeling-icon-container-arrow-next").css("opacity", 0.5); 1465 break; 1466 } 1467 jQuery(".modeling-icon-container").removeClass("counter"); 1468 jQuery(".modeling-icon-container[index='" + index + "']").addClass("counter"); 1469 jQuery(".modeling-icon-container:not(.modeling-icon-container-arrow)").hide(); 1470 for (let i = 1; i <= 9; i++) { 1471 for (let j = 0; j < show.length; j++) { 1472 if (i == show[j]) { 1473 jQuery(".modeling-icon-container[index='" + i + "']").show(); 1474 } 1475 1476 } 1477 } 1478 } 1479} 1480 1481function whatisNavicatDataModelerScript() { 1482 var OS = location.hash.substr(1); 1483 if (OS == "") { 1484 OS = getOS(); 1485 } 1486 1487 jQuery(".product-info-switcher").removeClass("selected"); 1488 if (OS == "W") { 1489 jQuery(".product-info-switcher[os='windows']").addClass("selected"); 1490 jQuery(".product-info-features-content.windows").show(); 1491 } else if (OS == "M") { 1492 jQuery(".product-info-switcher[os='mac']").addClass("selected"); 1493 jQuery(".product-info-features-content.mac").show(); 1494 } else { 1495 jQuery(".product-info-switcher[os='windows']").addClass("selected"); 1496 jQuery(".product-info-features-content.windows").show(); 1497 } 1498 1499 jQuery(".product-info-switcher").click(function () { 1500 var ele = jQuery(this); 1501 ele.siblings().removeClass("selected"); 1502 ele.addClass("selected"); 1503 jQuery(".product-info-features-content").hide(); 1504 jQuery(".product-info-features-content." + ele.attr("os")).show(); 1505 }); 1506 1507 jQuery(".ndm-screenshot-selector:not(.ndm-screenshot-selector-2) > div:not(.clear)").click(function () { 1508 var ele = jQuery(this); 1509 ele.siblings().removeClass("selected"); 1510 ele.addClass("selected"); 1511 var flag = ele.attr("flag"); 1512 jQuery(".hidden-content[flag='" + flag + "']").siblings().hide(); 1513 jQuery(".hidden-content[flag='" + flag + "']").show(); 1514 }); 1515 1516 jQuery(".ndm-screenshot-selector-2 > div:not(.clear)").click(function () { 1517 var ele = jQuery(this); 1518 ele.siblings().removeClass("selected"); 1519 ele.addClass("selected"); 1520 var flag = ele.attr("flag"); 1521 jQuery(".hidden-content-2[flag='" + flag + "']").siblings().css({ "z-index": "-99", "opacity": "0" }); 1522 jQuery(".hidden-content-2[flag='" + flag + "']").css({ "z-index": "99", "opacity": "1" }); 1523 }); 1524} 1525 1526function whatsNewScript() { 1527 var OS = location.hash.substr(1); 1528 if (OS == "") { 1529 OS = getOS(); 1530 } 1531 1532 jQuery(".whats-new-15-screenshot-selector > div:not(.clear)").click(function () { 1533 var ele = jQuery(this); 1534 ele.siblings().removeClass("selected"); 1535 ele.addClass("selected"); 1536 var flag = ele.attr("flag"); 1537 jQuery(".hidden-content-2[flag='" + flag + "']").siblings().css({ "z-index": "-99", "opacity": "0" }); 1538 jQuery(".hidden-content-2[flag='" + flag + "']").css({ "z-index": "99", "opacity": "1" }); 1539 }); 1540 1541 jQuery(".whats-new-15-screenshot-selector-2 > div:not(.clear)").click(function () { 1542 var ele = jQuery(this); 1543 ele.siblings().removeClass("selected"); 1544 ele.addClass("selected"); 1545 var flag = ele.attr("flag"); 1546 jQuery(".hidden-content[flag='" + flag + "']").siblings().hide(); 1547 jQuery(".hidden-content[flag='" + flag + "']").show(); 1548 }); 1549 1550 jQuery(".advanced-chart-selector").mouseover(function () { 1551 var ele = jQuery(this); 1552 ele.siblings().removeClass("selected"); 1553 ele.addClass("selected"); 1554 var flag = ele.attr("flag"); 1555 jQuery(".advanced-chart-screenshot[flag='" + flag + "']").siblings().hide(); 1556 jQuery(".advanced-chart-screenshot[flag='" + flag + "']").show(); 1557 }); 1558 1559 jQuery(".item-control").click(function () { 1560 var ele = jQuery(this); 1561 ele.siblings().removeClass("selected"); 1562 ele.addClass("selected"); 1563 }); 1564 1565 if (OS == "L") { 1566 jQuery(".whats-new-15-screenshot-selector > div[os='linux']").click(); 1567 jQuery(".whats-new-15-screenshot-selector > div[os='linux&win']").click(); 1568 } else if (OS == "M") { 1569 jQuery(".whats-new-15-screenshot-selector > div[os='mac']").click(); 1570 } else { 1571 jQuery(".whats-new-15-screenshot-selector > div[os='win']").click(); 1572 jQuery(".whats-new-15-screenshot-selector > div[os='linux&win']").click(); 1573 } 1574} 1575 1576function navicatv17HighlightScript() { 1577 jQuery(".navicat-v17-highlights-design-diagram-title span").click(function () { 1578 var index = jQuery(this).attr("index"); 1579 jQuery(".navicat-v17-highlights-design-diagram-title span, .navicat-v17-highlights-design-diagram p, .navicat-v17-highlights-design-diagram img").removeClass("selected"); 1580 jQuery(".navicat-v17-highlights-design-diagram-title span[index='" + index + "'], .navicat-v17-highlights-design-diagram p[index='" + index + "'], .navicat-v17-highlights-design-diagram img[index='" + index + "']").addClass("selected"); 1581 }); 1582 jQuery(".navicat-v17-highlights-mobile-view-img").each(function () { 1583 jQuery(this).attr("src", jQuery(this).parent().find(".navicat-v17-highlights-desktop-view-img img").attr("src")) 1584 }); 1585 if (window.innerWidth > 991) { 1586 jQuery(".navicat-v17-highlights-section").each(function () { 1587 if (jQuery(this).find("> .navicat-v17-highlights-two-column").length !== 0) { 1588 var card_height = 0; 1589 var tmp_height = 0; 1590 var title_height = 0; 1591 var tmp_title_height = 0; 1592 jQuery(this).find("> .navicat-v17-highlights-two-column").each(function () { 1593 tmp_height = 0; 1594 tmp_title_height = 0; 1595 jQuery(this).find(".navicat-v17-highlights-card").each(function () { 1596 jQuery(this).children().each(function () { 1597 tmp_height = tmp_height + jQuery(this).outerHeight(); 1598 });
1599 }); 1600 card_height = Math.max(card_height, tmp_height) 1601 card_height = card_height 1602 tmp_title_height = jQuery(this).find("h1").outerHeight(); 1603 title_height = Math.max(title_height, tmp_title_height) 1604 }); 1605 jQuery(this).find("> .navicat-v17-highlights-two-column").each(function () { 1606 jQuery(this).find(".navicat-v17-highlights-card").css("height", card_height) 1607 jQuery(this).find("h1").css("height", title_height) 1608 }); 1609 } 1610 }); 1611 } else { 1612 jQuery(".navicat-v17-highlights-card").each(function () { 1613 jQuery(this).css("height", "auto") 1614 }) 1615 jQuery(".navicat-v17-highlights-section h1").each(function () { 1616 jQuery(this).css("height", "auto") 1617 }) 1618 } 1619 1620 imagesFadeInControl("navicat-v17-highlights-all-new-modeler", 0, 0); 1621 imagesFadeInControl("navicat-v17-highlights-data-dictionary", 0, 0); 1622 jQuery(document).scroll(function () { 1623 var scroll = jQuery(this).scrollTop(); 1624 imagesFadeInControl("navicat-v17-highlights-all-new-modeler", scroll, 0); 1625 imagesFadeInControl("navicat-v17-highlights-data-dictionary", scroll, 0); 1626 }); 1627 1628} 1629 1630function navicatCollaborationScript() { 1631 1632 function sharingSectionAnimation() { 1633 setTimeout(function () { 1634 jQuery(".sharing-query-box.derek").animate({ opacity: 1 }, 500); 1635 }, 1000); 1636 1637 setTimeout(function () { 1638 jQuery(".sharing-query-box.adam").animate({ opacity: 1 }, 500); 1639 }, 2500); 1640 1641 setTimeout(function () { 1642 if (jQuery(window).width() >= 768) 1643 jQuery(".sharing-query-box").animate({ opacity: 0 }, 200); 1644 }, 6000); 1645 } 1646 1647 function activityLogAnimation() { 1648 setTimeout(function () { 1649 jQuery(".activity-log-content-row:last-child").fadeIn(1000); 1650 }, 500); 1651 setTimeout(function () { 1652 jQuery(".activity-log-content-row:nth-child(2)").fadeIn(1000); 1653 }, 2000); 1654 setTimeout(function () { 1655 jQuery(".activity-log-content-row:first-child").fadeIn(1000); 1656 }, 3500); 1657 setTimeout(function () { 1658 jQuery(".activity-log-content-row").hide(); 1659 }, 6000); 1660 } 1661 1662 var interval = setInterval(function () { 1663 sharingSectionAnimation(); 1664 activityLogAnimation(); 1665 }, 6000); 1666 sharingSectionAnimation(); 1667 activityLogAnimation(); 1668 1669 jQuery(".collaboration-sharing-arrow").click(function () { 1670 jQuery(".collaboration-sharing-section").toggleClass("default"); 1671 jQuery(".sharing-box").toggleClass("selected"); 1672 jQuery(".collaboration-sharing-arrow").toggleClass("show"); 1673 }); 1674 1675 function memberRoles() { 1676 var i = 2; 1677 setInterval(function () { 1678 jQuery(".member-arrow").removeClass("active"); 1679 jQuery("#arrow-" + i).addClass("active"); 1680 i++; 1681 if (i > 4) { 1682 i = 1; 1683 } 1684 }, 2000); 1685 1686 jQuery(".member-icon").mouseenter(function () { 1687 var member = jQuery(this).attr("member"); 1688 jQuery(".member-description > div").removeClass("active"); 1689 jQuery(".member-description-content[member='" + member + "']").addClass("active"); 1690 }); 1691 jQuery(".member-icon").mouseleave(function () { 1692 jQuery(".member-description > div").removeClass("active"); 1693 jQuery(".member-description-default").addClass("active"); 1694 }); 1695 1696 jQuery(".member-icon-btn > span").click(function () { 1697 jQuery(this).parent().addClass("selected").siblings().removeClass("selected"); 1698 var member = jQuery(this).parent().attr("member"); 1699 jQuery(".member-icon").removeClass("mobile-active"); 1700 jQuery(".member-icon[member='" + member + "']").addClass("mobile-active"); 1701 jQuery(".member-description-content").removeClass("mobile-active"); 1702 jQuery(".member-description-content[member='" + member + "']").addClass("mobile-active"); 1703 }); 1704 } 1705 1706 memberRoles(); 1707} 1708 1709function directDownload(product, location, support, linux_dist) { 1710 jQuery(".product-banner").addClass(getProductBannerClassName(product)); 1711 jQuery(".direct-download-banner").css("background", "url('../../../images/02.Product_05_Download_DirectDownload_CollaborationBanner.png') no-repeat center top"); 1712 jQuery.ajax({ 1713 type: "POST", 1714 url: "/includes/Navicat/direct_download.php", 1715 data: { product: product, location: location, support: support, linux_dist: linux_dist }, 1716 dataType: "json", 1717 success: function (data) { 1718 var link = data.download_link; 1719 var banner_url = "../../.." + data.banner_url; 1720 window.location = link; 1721 jQuery(".installer-link").attr("href", link); 1722 //console.log(data); 1723 }, 1724 failure: function (errMsg) { 1725 //console.log("!!!!!!!!!"); 1726 } 1727 }); 1728} 1729 1730function directDownload2(product, location, support, linux_dist, version, verNum = false) { 1731 jQuery(".product-banner").addClass(getProductBannerClassName(product)); 1732 jQuery(".direct-download-banner").css("background", "url('../../../images/02.Product_05_Download_DirectDownload_CollaborationBanner.png') no-repeat center top"); 1733 jQuery.ajax({ 1734 type: "POST", 1735 url: "/includes/Navicat/direct_download" + version + ".php", 1736 data: { product: product, location: location, support: support, linux_dist: linux_dist, verNum: verNum }, 1737 dataType: "json", 1738 success: function (data) { 1739 var link = data.download_link; 1740 var banner_url = "../../.." + data.banner_url; 1741 window.location = link; 1742 jQuery(".installer-link").attr("href", link); 1743 //console.log(data); 1744 }, 1745 failure: function (errMsg) { 1746 //console.log("!!!!!!!!!"); 1747 } 1748 }); 1749} 1750 1751function getIndustry() { 1752 jQuery.ajax({ 1753 type: "POST", url: "/includes/Navicat/industry.php", 1754 dataType: 'json', 1755 data: 1756 { 1757 action: "getIndustry" 1758 } 1759 }).done(function (data) { 1760 jQuery.each(data.result, function (i, item) { 1761 var get_industry = "<option value='" + item.industry + "'>" + item.industry + "</option>"; 1762 jQuery('#industry-select').append(get_industry); 1763 }); 1764 jQuery.each(data.country, function (i, item) { 1765 var get_industry = "<option value='" + item.country + "'>" + item.country + "</option>"; 1766 jQuery('#country-select').append(get_industry); 1767 }); 1768 }); 1769} 1770 1771function featureMatrix() { 1772 jQuery(".fm-title-container .fm-btn").click(function () { 1773 var status = jQuery(this).attr("status"); 1774 if (status == "off") { 1775 jQuery(this).attr("status", "on"); 1776 jQuery(this).find("img").attr("src", "../../images/02.Product_02_hide.svg") 1777 jQuery(this).parent().parent().find(".fm-content-main-container").slideDown(); 1778 } else { 1779 jQuery(this).attr("status", "off"); 1780 jQuery(this).find("img").attr("src", "../../images/02.Product_02_expand.svg") 1781 jQuery(this).parent().parent().find(".fm-content-main-container").slideUp(); 1782 } 1783 }); 1784 var top = jQuery(".page-container .feature-matrix-table").offset().top; 1785 jQuery(document).scroll(function () { 1786 if (jQuery(this).scrollTop() > (top + 18)) { 1787 jQuery(".feature-matrix-fixed-bar").addClass("show"); 1788 } else { 1789 jQuery(".feature-matrix-fixed-bar").removeClass("show"); 1790 } 1791 }); 1792} 1793 1794function changeSurveyQuestion() { 1795 changeQuestion(jQuery("select[name=product]").val()); 1796 jQuery("select[name=product]").change(function () { 1797 changeQuestion(jQuery(this).val()); 1798 jQuery(".navicat-survey input:checked, .monitor-survey input:checked, .modeler-survey input:checked, .charts-survey input:checked").removeAttr('checked'); 1799 }); 1800 1801 function changeQuestion(product) { 1802 if (product == "Navicat Monitor") { 1803 jQuery(".navicat-survey").hide(); 1804 jQuery(".monitor-survey").show(); 1805 jQuery(".modeler-survey").hide(); 1806 jQuery(".charts-survey").hide(); 1807 jQuery(".product-name").html("Navicat Monitor"); 1808 } else if (product == "Navicat Data Modeler") { 1809 jQuery(".navicat-survey").hide(); 1810 jQuery(".monitor-survey").hide(); 1811 jQuery(".modeler-survey").show(); 1812 jQuery(".charts-survey").hide(); 1813 jQuery(".product-name").html("Navicat Data Modeler"); 1814 } else if (product == "Navicat BI/Navicat BI Viewer") { 1815 jQuery(".navicat-survey").hide(); 1816 jQuery(".monitor-survey").hide(); 1817 jQuery(".modeler-survey").hide(); 1818 jQuery(".charts-survey").show(); 1819 jQuery(".product-name").html("Navicat BI/Navicat BI Viewer"); 1820 } else { 1821 jQuery(".navicat-survey").show(); 1822 jQuery(".monitor-survey").hide(); 1823 jQuery(".modeler-survey").hide(); 1824 jQuery(".charts-survey").hide(); 1825 jQuery(".product-name").html("Navicat"); 1826 } 1827 } 1828} 1829 1830function setCountDownTimer() { 1831 function getTimeRemaining() { 1832 var str = end.replace(/^(.*-[0-9][0-9])(\ )([0-9][0-9]\:.*$)/, '$1T$3'); 1833 var t = Date.parse(str + 'Z') - Date.parse(new Date()) - (3600000 * 8); 1834 var seconds = Math.floor((t / 1000) % 60); 1835 var minutes = Math.floor((t / 1000 / 60) % 60); 1836 var hours = Math.floor(t / (1000 * 60 * 60)); 1837 //var hours = Math.floor((t / (1000 * 60 * 60)) % 24); 1838 //var days = Math.floor(t / (1000 * 60 * 60 * 24)); 1839 return { 1840 'total': t, 1841 //'days': days, 1842 'hours': hours, 1843 'minutes': minutes, 1844 'seconds': seconds 1845 }; 1846 } 1847 1848 function initializeClock(id) { 1849 var clock = document.getElementById(id); 1850 //var daysSpan = clock.querySelector('.days'); 1851 var hoursSpan = clock.querySelector('.hours'); 1852 var minutesSpan = clock.querySelector('.minutes'); 1853 var secondsSpan = clock.querySelector('.seconds'); 1854 var testSpan = clock.querySelector('.test'); 1855 1856 function updateClock() { 1857 var t = getTimeRemaining(end); 1858 1859 //daysSpan.innerHTML = t.days; 1860 hoursSpan.innerHTML = ('0' + t.hours).slice(-2); 1861 minutesSpan.innerHTML = ('0' + t.minutes).slice(-2); 1862 secondsSpan.innerHTML = ('0' + t.seconds).slice(-2); 1863 1864 if (t.total <= 0) { 1865 clearInterval(timeinterval); 1866 } 1867 } 1868 1869 updateClock(); 1870 var timeinterval = setInterval(updateClock, 1000); 1871 } 1872 1873 var deadline = new Date(Date.parse(new Date()) + 15 * 24 * 60 * 60 * 1000); 1874 initializeClock('clockdiv', deadline); 1875} 1876 1877function resourcesPageControl() { 1878 showResourcesContent(); 1879 jQuery(".resources-type-tab").click(function () { 1880 jQuery(".resources-type-tab").removeClass("selected"); 1881 jQuery(this).addClass("selected"); 1882 showResourcesContent(); 1883 }); 1884 function showResourcesContent() { 1885 var show_type = jQuery(".resources-type-tab.selected").attr("t"); 1886 jQuery(".resources-content").hide(); 1887 jQuery(".resources-content." + show_type).show(); 1888 } 1889} 1890 1891function monitor2_2PageControl() { 1892 jQuery(".schedule-report-icon-container").mouseover(function () { 1893 $(this).siblings().removeClass("selected"); 1894 $(this).addClass("selected"); 1895 var id = $(this).attr("id"); 1896 $(".schedule-report-desc").removeClass("selected"); 1897 $("#" + id + "-desc").addClass("selected"); 1898 }); 1899} 1900 1901function monitor3KeyTopic() { 1902 jQuery(".monitor-3-key-topic-heading").addClass("active"); 1903 setTimeout(function () { jQuery(".monitor-3-key-topic .monitor-3-key-topic-shortcut-row").addClass("active") }, 1500); 1904 imagesFadeInControl("postgresql", 0, 0);
1905 imagesFadeInControl("custom-metrics", 0, 0); 1906 imagesFadeInControl("sql-profiler", 0, 1); 1907 imagesFadeInControl("replication", 0, 0); 1908 1909 jQuery(document).scroll(function () { 1910 var scroll = jQuery(this).scrollTop(); 1911 imagesFadeInControl("postgresql", scroll, 0); 1912 imagesFadeInControl("custom-metrics", scroll, 0); 1913 imagesFadeInControl("sql-profiler", scroll, 1); 1914 imagesFadeInControl("replication", scroll, 0); 1915 }); 1916 1917 jQuery("#long-running-queries .monitor-3-key-topic-shortcut").click(function () { 1918 var index = jQuery(this).attr("index"); 1919 jQuery(this).siblings().removeClass("selected"); 1920 jQuery(this).addClass("selected"); 1921 jQuery(".monitor-3-key-topic-screenshot[index=" + index + "]").addClass("selected"); 1922 }); 1923 1924 jQuery("#sql-profiler .monitor-3-key-topic-shortcut, #sql-profiler-hover .monitor-3-key-topic-shortcut").click(function () { 1925 var index = jQuery(this).attr("index"); 1926 jQuery(".monitor-3-key-topic-section").removeClass("selected"); 1927 jQuery(".monitor-3-key-topic-section[index=" + index + "]").addClass("selected"); 1928 var scroll = jQuery(document).scrollTop(); 1929 imagesFadeInControl("sql-profiler", scroll, 1); 1930 if (index == "y") { 1931 var top = jQuery("#sql-profiler-hover").offset().top; 1932 if (scroll > top) 1933 jQuery(document).scrollTop(top); 1934 } else { 1935 var top = jQuery("#sql-profiler").offset().top; 1936 if (scroll > top) 1937 jQuery(document).scrollTop(top); 1938 } 1939 }); 1940 1941 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-img").mouseenter(function () { 1942 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-img img:first-child").removeClass("show-img"); 1943 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-img img:nth-child(2)").addClass("show-img"); 1944 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-hint").hide(); 1945 }).mouseleave(function () { 1946 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-img img:first-child").addClass("show-img"); 1947 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-img img:nth-child(2)").removeClass("show-img"); 1948 jQuery("#sql-profiler-hover .monitor-3-key-topic-hover-hint").show(); 1949 }); 1950 1951 // function resetHeight() { 1952 // var section_1_height = jQuery("#postgresql .monitor-3-key-topic-fix-scroll-end").height(); 1953 // jQuery("#postgresql").height(section_1_height * 2 + 400 * 4); 1954 // var section_2_height = jQuery("#custom-metrics .monitor-3-key-topic-fix-scroll-end").height(); 1955 // jQuery("#custom-metrics").height(section_2_height * 2 + 400 * 2); 1956 // var section_3_height = jQuery("#sql-profiler .monitor-3-key-topic-fix-scroll-end").height(); 1957 // jQuery("#sql-profiler").height(section_3_height * 2); 1958 // var section_4_height = jQuery("#replication .monitor-3-key-topic-fix-scroll-end").height(); 1959 // jQuery("#replication").height(section_4_height * 2 - 400); 1960 // } 1961 function imagesFadeInControl(id, scroll, background) { 1962 var ele = jQuery("#" + id); 1963 var ele_scroll = ele.find(".monitor-3-key-topic-fix-scroll"); 1964 var ele_scroll_start = ele.find(".monitor-3-key-topic-fix-scroll-start"); 1965 var ele_scroll_end = ele.find(".monitor-3-key-topic-fix-scroll-end"); 1966 var section_height = ele_scroll_end.height(); 1967 var section_top = ele.offset().top; 1968 var number_of_images = ele_scroll.find(".monitor-3-key-topic-img").children().length; 1969 var ele_height = section_height * 2 + 400 * (number_of_images - 3); 1970 ele.height(ele_height); 1971 ele_scroll_end.addClass("active"); 1972 ele_scroll_start.addClass("active"); 1973 if (scroll > section_top) { 1974 if (scroll > section_top + ele_height - section_height - 40 * background) { 1975 ele_scroll_end.addClass("active"); 1976 ele_scroll.removeClass("active"); 1977 ele_scroll_start.removeClass("active"); 1978 ele_scroll.find("img").addClass("show-img"); 1979 } else { 1980 if (scroll > section_top + ele_height - section_height - 10) { 1981 ele_scroll_end.addClass("active"); 1982 } else { 1983 ele_scroll_end.removeClass("active"); 1984 } 1985 ele_scroll.addClass("active"); 1986 ele_scroll_start.removeClass("active"); 1987 1988 for (let i = 2; i <= number_of_images; i++) { 1989 if (scroll > section_top + (i - 2) * 200) { 1990 ele_scroll.find("img:nth-child(" + i + ")").addClass("show-img"); 1991 if (scroll <= section_top + (i - 1) * 200 - 100) { 1992 ele_scroll.find("img:nth-child(" + i + ")").removeClass("show-img"); 1993 } 1994 } 1995 } 1996 } 1997 } else { 1998 ele_scroll_start.addClass("active"); 1999 ele_scroll.removeClass("active"); 2000 ele_scroll_end.removeClass("active"); 2001 ele_scroll.find("img").removeClass("show-img"); 2002 } 2003 } 2004} 2005 2006function downloadPagePlatformControl(platform) { 2007 var os = getOS(); 2008 if (window.location.hash) { 2009 var hash = window.location.hash.substring(1); 2010 if (hash == "windows") 2011 os = "W"; 2012 if (hash == "macos") 2013 os = "M"; 2014 if (hash == "linux") 2015 os = "L"; 2016 } 2017 if (platform) { 2018 os = platform; 2019 } 2020 jQuery(".section-controller, .default-section:not(.download-btn-section)").hide(); 2021 jQuery(".change-download-platform").show(); 2022 if (os == "L") { 2023 jQuery(".lin").show(); 2024 jQuery(".change-download-platform[p='L']").hide(); 2025 } else if (os == "M") { 2026 jQuery(".mac").show(); 2027 jQuery(".change-download-platform[p='M']").hide(); 2028 } else { 2029 jQuery(".win").show(); 2030 jQuery(".change-download-platform[p='W']").hide(); 2031 } 2032} 2033 2034function redisKeyTopic() { 2035 jQuery(".monitor-3-key-topic-heading").addClass("active"); 2036 setTimeout(function () { jQuery(".monitor-3-key-topic .monitor-3-key-topic-shortcut-row").addClass("active") }, 1500); 2037 imagesFadeInControl("query-command", 0, 0); 2038 imagesFadeInControl("pub-sub", 0, 0); 2039 imagesFadeInControl("user-management", 0, 0);
2040 imagesFadeInControl("backup", 0, 0); 2041 2042 jQuery("#data-viewer .whats-new-15-screenshot-selector > div:not(.clear)").click(function () { 2043 var ele = jQuery(this); 2044 ele.siblings().removeClass("selected"); 2045 ele.addClass("selected"); 2046 var flag = ele.attr("flag"); 2047 var index = jQuery("#data-viewer .monitor-3-key-topic-shortcut.selected").attr("index"); 2048 jQuery("#data-viewer .monitor-3-key-topic-shortcut.selected").siblings().removeClass("selected"); 2049 jQuery("#data-viewer .monitor-3-key-topic-shortcut[index=" + index + "]").addClass("selected"); 2050 jQuery("#data-viewer .monitor-3-key-topic-screenshot[index=" + index + "-" + flag + "]").addClass("selected"); 2051 }); 2052 2053 jQuery("#data-viewer .monitor-3-key-topic-shortcut").click(function () { 2054 var index = jQuery(this).attr("index"); 2055 var ele = jQuery("#data-viewer .whats-new-15-screenshot-selector-2 .selected"); 2056 var flag = ele.attr("flag"); 2057 jQuery(this).siblings().removeClass("selected"); 2058 jQuery("#data-viewer .monitor-3-key-topic-shortcut[index=" + index + "]").addClass("selected"); 2059 jQuery("#data-viewer .monitor-3-key-topic-screenshot[index=" + index + "-" + flag + "]").addClass("selected"); 2060 }); 2061 2062 jQuery(".navicat-for-redis-key-topic-feature").mouseover(function () { 2063 var ele = jQuery(this); 2064 var flag = jQuery(this).attr("flag"); 2065 ele.siblings().removeClass("selected"); 2066 ele.addClass("selected"); 2067 jQuery(".navicat-for-redis-key-topic-feature-des p").removeClass("selected"); 2068 jQuery(".navicat-for-redis-key-topic-feature-des p[flag='" + flag + "']").addClass("selected"); 2069 jQuery("#other-features .monitor-3-key-topic-shortcut").removeClass("selected"); 2070 jQuery("#other-features .monitor-3-key-topic-shortcut[flag='" + flag + "']").addClass("selected"); 2071 jQuery("#other-features-title.mobile").html(ele.find(".navicat-for-redis-key-topic-title").html()); 2072 jQuery(".mobile .navicat-for-redis-key-topic-icon").removeClass("selected"); 2073 jQuery(".mobile .navicat-for-redis-key-topic-icon[flag='" + flag + "']").addClass("selected"); 2074 }); 2075 2076 jQuery("#other-features .monitor-3-key-topic-shortcut").click(function () { 2077 var ele = jQuery(this); 2078 var flag = jQuery(this).attr("flag"); 2079 ele.siblings().removeClass("selected"); 2080 ele.addClass("selected"); 2081 jQuery(".navicat-for-redis-key-topic-feature-des p").removeClass("selected"); 2082 jQuery(".navicat-for-redis-key-topic-feature-des p[flag='" + flag + "']").addClass("selected"); 2083 jQuery(".navicat-for-redis-key-topic-feature").removeClass("selected"); 2084 jQuery(".navicat-for-redis-key-topic-feature[flag='" + flag + "']").addClass("selected"); 2085 jQuery("#other-features-title.mobile").html(ele.html()); 2086 jQuery(".mobile .navicat-for-redis-key-topic-icon").removeClass("selected"); 2087 jQuery(".mobile .navicat-for-redis-key-topic-icon[flag='" + flag + "']").addClass("selected"); 2088 }); 2089 2090 jQuery(document).scroll(function () { 2091 var scroll = jQuery(this).scrollTop(); 2092 imagesFadeInControl("query-command", scroll, 0); 2093 imagesFadeInControl("pub-sub", scroll, 0); 2094 imagesFadeInControl("user-management", scroll, 0); 2095 imagesFadeInControl("backup", scroll, 0); 2096 }); 2097 2098 function imagesFadeInControl(id, scroll, background) { 2099 var ele = jQuery("#" + id); 2100 var ele_scroll = ele.find(".monitor-3-key-topic-fix-scroll"); 2101 var ele_scroll_start = ele.find(".monitor-3-key-topic-fix-scroll-start"); 2102 var ele_scroll_end = ele.find(".monitor-3-key-topic-fix-scroll-end"); 2103 var section_height = ele_scroll_end.height(); 2104 var section_top = ele.offset().top; 2105 var number_of_images = ele_scroll.find(".monitor-3-key-topic-img").children().length; 2106 var ele_height = section_height * 2 + 400 * (number_of_images - 3); 2107 ele.height(ele_height); 2108 ele_scroll_end.addClass("active"); 2109 ele_scroll_start.addClass("active"); 2110 if (scroll > section_top) { 2111 if (scroll > section_top + ele_height - section_height - 40 * background) { 2112 ele_scroll_end.addClass("active"); 2113 ele_scroll.removeClass("active"); 2114 ele_scroll_start.removeClass("active"); 2115 ele_scroll.find("img").addClass("show-img"); 2116 } else { 2117 if (scroll > section_top + ele_height - section_height) { 2118 ele_scroll_end.addClass("active"); 2119 } else { 2120 ele_scroll_end.removeClass("active"); 2121 } 2122 ele_scroll.addClass("active"); 2123 ele_scroll_start.removeClass("active"); 2124 2125 for (let i = 2; i <= number_of_images; i++) { 2126 if (scroll > section_top + (i - 2) * 200) { 2127 ele_scroll.find("img:nth-child(" + i + ")").addClass("show-img"); 2128 if (scroll <= section_top + (i - 1) * 200 - 100) { 2129 ele_scroll.find("img:nth-child(" + i + ")").removeClass("show-img"); 2130 } 2131 } 2132 } 2133 } 2134 } else { 2135 ele_scroll_start.addClass("active"); 2136 ele_scroll.removeClass("active"); 2137 ele_scroll_end.removeClass("active"); 2138 ele_scroll.find("img").removeClass("show-img"); 2139 } 2140 } 2141} 2142 2143function imagesFadeInControl(id, scroll, background) { 2144 var ele = jQuery("#" + id); 2145 var ele_scroll = ele.find(".monitor-3-key-topic-fix-scroll"); 2146 var ele_scroll_start = ele.find(".monitor-3-key-topic-fix-scroll-start"); 2147 var ele_scroll_end = ele.find(".monitor-3-key-topic-fix-scroll-end"); 2148 var section_height = ele_scroll_end.height(); 2149 var section_top = ele.offset().top; 2150 var number_of_images = ele_scroll.find(".monitor-3-key-topic-img").children().length; 2151 var ele_height = section_height * 2 + 400 * (number_of_images - 3); 2152 ele.css('height', ele_height); 2153 ele_scroll_end.addClass("active"); 2154 ele_scroll_start.addClass("active"); 2155 if (scroll > section_top) { 2156 if (scroll > section_top + ele_height - section_height - 40 * background) { 2157 ele_scroll_end.addClass("active"); 2158 ele_scroll.removeClass("active"); 2159 ele_scroll_start.removeClass("active"); 2160 ele_scroll.find("img").addClass("show-img"); 2161 } else { 2162 if (scroll > section_top + ele_height - section_height) { 2163 ele_scroll_end.addClass("active"); 2164 } else { 2165 ele_scroll_end.removeClass("active"); 2166 } 2167 ele_scroll.addClass("active"); 2168 ele_scroll_start.removeClass("active"); 2169 2170 for (let i = 2; i <= number_of_images; i++) { 2171 if (scroll > section_top + (i - 2) * 200) { 2172 ele_scroll.find("img:nth-child(" + i + ")").addClass("show-img"); 2173 if (scroll <= section_top + (i - 1) * 200 - 100) { 2174 ele_scroll.find("img:nth-child(" + i + ")").removeClass("show-img"); 2175 } 2176 } 2177 } 2178 } 2179 } else { 2180 ele_scroll_start.addClass("active"); 2181 ele_scroll.removeClass("active"); 2182 ele_scroll_end.removeClass("active"); 2183 ele_scroll.find("img").removeClass("show-img"); 2184 } 2185} 2186 2187function showHideVideoArrow() { 2188 jQuery(".navicat-video-arrow").each(function () { 2189 var windowWidth = jQuery(window).width(); 2190 var videoNumber = 3; 2191 if (windowWidth < 991) { 2192 videoNumber = 2; 2193 } 2194 var ele = jQuery(this); 2195 var total = parseInt(ele.attr("total")); 2196 var firstVideo = parseInt(ele.parent().attr("firstvideo")); 2197 if (firstVideo === 1 && firstVideo + videoNumber - 1 >= total) { 2198 ele.hide(); 2199 } else { 2200 ele.show(); 2201 } 2202 }); 2203} 2204 2205function videoPageArrowControl(element, action) { 2206 var windowWidth = jQuery(window).width(); 2207 var videoNumber = 3; 2208 if (windowWidth < 991) { 2209 videoNumber = 2; 2210 }
2211 var total = parseInt(jQuery(element).parent().attr("total")); 2212 var ele = jQuery(element).parent().parent(); 2213 var firstVideo = parseInt(ele.attr("firstvideo")); 2214 if (action === "next") { 2215 firstVideo = firstVideo + videoNumber; 2216 if (firstVideo > total) { 2217 firstVideo = firstVideo - videoNumber; 2218 } 2219 } else if (action === "back") { 2220 firstVideo = firstVideo - videoNumber; 2221 if (firstVideo <= 0) { 2222 firstVideo = 1; 2223 } 2224 } 2225 ele.attr("firstvideo", firstVideo); 2226 ele.find(".navicat-video-container").removeClass("navicat-video-container-show navicat-video-container-show-3"); 2227 for (let i = 0; i < 3; i++) { 2228 ele.find(".navicat-video-container.navicat-video-container-" + parseInt(firstVideo + i)).addClass("navicat-video-container-show"); 2229 if (i === 2) { 2230 ele.find(".navicat-video-container.navicat-video-container-" + parseInt(firstVideo + i)).addClass("navicat-video-container-show-3"); 2231 } 2232 } 2233 ele.find(".navicat-video-arrow-back, .navicat-video-arrow-next").removeClass("navicat-video-arrow-disable"); 2234 if (firstVideo <= 1) { 2235 ele.find(".navicat-video-arrow-back").addClass("navicat-video-arrow-disable"); 2236 } 2237 if (firstVideo + videoNumber > total) { 2238 ele.find(".navicat-video-arrow-next").addClass("navicat-video-arrow-disable"); 2239 } 2240 if (firstVideo === 1 && firstVideo + videoNumber - 1 >= total) { 2241 ele.find(".navicat-video-arrow").hide(); 2242 } else { 2243 ele.find(".navicat-video-arrow").show(); 2244 } 2245}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.