Best JavaScript code snippet using jest
find_functions.js
Source:find_functions.js
...354 scimoz.charPosAtPosition(scimoz.selectionEnd),355 mode);356 var findResult = null;357 while (1) { // while not done searching all file(s)358 findResult = _findSvc.find(url, text, pattern,359 startOffset, endOffset);360 // fix up the find result for context361 if (findResult != null) {362 findResult.start += contextOffset;363 findResult.end += contextOffset;364 }365 // if was not found then wrap (if have not already) and try again366 if (findResult == null && !_findSession.wrapped) {367 _findSession.wrapped = true;368 if (!_findSvc.options.searchBackward) {369 startOffset = 0;370 } else {371 startOffset = ko.stringutils.bytelength(text);372 }...
wedgeSidebarController.js
Source:wedgeSidebarController.js
...32 helper.removeComponent(component); 33 helper.getStoreAdmin(component,event);34 },35 getArticleListing: function(cmp,event,helper) {36 var article = cmp.find('article');37 var storeAd = cmp.find('storeAd');38 var template = cmp.find('template');39 var paymentProcesses = cmp.find('paymentProcesses');40 var category = cmp.find('category');41 var prodFeatures = cmp.find('prodFeatures');42 var product = cmp.find('product');43 var prodOpt = cmp.find('prodOpt');44 var prodReview = cmp.find('prodReview');45 var coupons = cmp.find('coupons');46 var location = cmp.find('location');47 var shipmeth = cmp.find('shipmeth');48 var tax = cmp.find('loctax');49 var orders = cmp.find('orders');50 var customer = cmp.find('customer');51 var cartWishlist = cmp.find('cartWishlist');52 var productcat = cmp.find('productcat');53 var shipTax = cmp.find('shipTax');54 55 $A.util.removeClass(article,'article');56 $A.util.addClass(article,'articleblue');57 58 $A.util.removeClass(shipTax,'shipandtaxblue');59 $A.util.addClass(shipTax,'shipandtax');60 61 $A.util.removeClass(storeAd,'storeadminBlue'); 62 $A.util.addClass(storeAd,'storeadmin');63 64 $A.util.removeClass(template,'templateblue'); 65 $A.util.addClass(template,'template');66 67 $A.util.removeClass(paymentProcesses,'paymentblue'); 68 $A.util.addClass(paymentProcesses,'payment');69 $A.util.removeClass(category,'categoryblue'); 70 $A.util.addClass(category,'category');71 72 $A.util.removeClass(productcat,'productcatalogblue');73 $A.util.addClass(productcat,'productcatalog'); 74 75 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 76 $A.util.addClass(prodFeatures,'prodfeature');77 78 $A.util.removeClass(product,'productblue'); 79 $A.util.addClass(product,'product');80 81 $A.util.removeClass(prodOpt,'prodOptionsblue'); 82 $A.util.addClass(prodOpt,'prodOptions');83 84 $A.util.removeClass(prodReview,'reviewblue'); 85 $A.util.addClass(prodReview,'review');86 87 $A.util.removeClass(coupons,'couponsblue'); 88 $A.util.addClass(coupons,'coupons');89 90 $A.util.removeClass(location,'locationblue'); 91 $A.util.addClass(location,'location');92 93 $A.util.removeClass(shipmeth,'shippingmthblue'); 94 $A.util.addClass(shipmeth,'shippingmth');95 96 $A.util.removeClass(tax,'taxblue'); 97 $A.util.addClass(tax,'tax');98 99 $A.util.removeClass(orders,'orderblue'); 100 $A.util.addClass(orders,'order');101 102 $A.util.removeClass(customer,'customerblue'); 103 $A.util.addClass(customer,'customer');104 105 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 106 $A.util.addClass(cartWishlist,'cartwishlist'); 107 var cmpBody=cmp.find("cmpBody");108 helper.removeComponent(cmp);109 $A.createComponent(110 "wk_wedge:ArticleListing",{},111 function(newcomponent){112 if (cmp.isValid()) {113 var body = cmp.get("v.body");114 body.push(newcomponent);115 cmp.set("v.body", body);116 }117 } 118 );119 },120 getTemplatesListing: function(cmp,event,helper) {121 var article = cmp.find('article');122 var storeAd = cmp.find('storeAd');123 var template = cmp.find('template');124 var paymentProcesses = cmp.find('paymentProcesses');125 var category = cmp.find('category');126 var prodFeatures = cmp.find('prodFeatures');127 var product = cmp.find('product');128 var prodOpt = cmp.find('prodOpt');129 var prodReview = cmp.find('prodReview');130 var coupons = cmp.find('coupons');131 var location = cmp.find('location');132 var shipmeth = cmp.find('shipmeth');133 var tax = cmp.find('loctax');134 var orders = cmp.find('orders');135 var customer = cmp.find('customer');136 var cartWishlist = cmp.find('cartWishlist');137 var productcat = cmp.find('productcat');138 var shipTax = cmp.find('shipTax');139 140 $A.util.removeClass(article,'articleblue');141 $A.util.addClass(article,'article');142 143 $A.util.removeClass(shipTax,'shipandtaxblue');144 $A.util.addClass(shipTax,'shipandtax');145 146 $A.util.removeClass(storeAd,'storeadminBlue'); 147 $A.util.addClass(storeAd,'storeadmin');148 149 $A.util.removeClass(template,'template');150 $A.util.addClass(template,'templateblue'); 151 152 $A.util.removeClass(paymentProcesses,'paymentblue'); 153 $A.util.addClass(paymentProcesses,'payment');154 $A.util.removeClass(category,'categoryblue'); 155 $A.util.addClass(category,'category');156 157 $A.util.removeClass(productcat,'productcatalogblue');158 $A.util.addClass(productcat,'productcatalog'); 159 160 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 161 $A.util.addClass(prodFeatures,'prodfeature');162 163 $A.util.removeClass(product,'productblue'); 164 $A.util.addClass(product,'product');165 166 $A.util.removeClass(prodOpt,'prodOptionsblue'); 167 $A.util.addClass(prodOpt,'prodOptions');168 169 $A.util.removeClass(prodReview,'reviewblue'); 170 $A.util.addClass(prodReview,'review');171 172 $A.util.removeClass(coupons,'couponsblue'); 173 $A.util.addClass(coupons,'coupons');174 175 $A.util.removeClass(location,'locationblue'); 176 $A.util.addClass(location,'location');177 178 $A.util.removeClass(shipmeth,'shippingmthblue'); 179 $A.util.addClass(shipmeth,'shippingmth');180 181 $A.util.removeClass(tax,'taxblue'); 182 $A.util.addClass(tax,'tax');183 184 $A.util.removeClass(orders,'orderblue'); 185 $A.util.addClass(orders,'order');186 187 $A.util.removeClass(customer,'customerblue'); 188 $A.util.addClass(customer,'customer');189 190 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 191 $A.util.addClass(cartWishlist,'cartwishlist');192 var cmpBody=cmp.find("cmpBody");193 helper.removeComponent(cmp);194 $A.createComponent(195 "wk_wedge:TemplateListing",{},196 function(newcomponent){197 if (cmp.isValid()) {198 var body = cmp.get("v.body");199 body.push(newcomponent);200 cmp.set("v.body", body);201 }202 } 203 );204 },205 getTemplateComponent: function(cmp,event,helper) { 206 helper.removeComponent(cmp); 207 var tempId = event.getParam("TemplateId");208 var cmpBody=cmp.find("cmpBody"); 209 $A.createComponent(210 "wk_wedge:TemplateComponent",{211 "TemplateId": tempId212 },213 function(newcomponent){214 if (cmp.isValid()) {215 var body = cmp.get("v.body");216 body.push(newcomponent);217 cmp.set("v.body", body);218 }219 } 220 );221 },222 getTemplateVariants: function(cmp,event,helper) {223 var tempId = event.getParam("tempId");224 var TemplateId = event.getParam("TemplateId");225 var comp = event.getParam("comp");226 var cmpBody=cmp.find("cmpBody"); 227 helper.removeComponent(cmp);228 $A.createComponent(229 comp,{230 "TempId": tempId,231 "TemplateId" : TemplateId232 },233 function(newcomponent){234 if (cmp.isValid()) {235 var body = cmp.get("v.body");236 body.push(newcomponent);237 cmp.set("v.body", body);238 }239 } 240 );241 },242 getImageSlider:function(cmp,event,helper){243 var tcompId = event.getParam("tcompId");244 var Id = event.getParam("Id");245 var colname = event.getParam("colname");246 var comp = event.getParam("comp");247 helper.removeComponent(cmp);248 $A.createComponent(249 comp,{250 "BannerId": Id,251 "tcompid" : tcompId,252 "colname" : colname253 },254 function(newcomponent){255 if (cmp.isValid()) {256 var body = cmp.get("v.body");257 body.push(newcomponent);258 cmp.set("v.body", body);259 }260 } 261 );262 },263 getProduct:function(cmp,event,helper){ 264 265 var ProductId = event.getParam("ProductId");266 var comp = event.getParam("comp");267 helper.removeComponent(cmp);268 $A.createComponent(269 comp,{270 "ProductId": ProductId271 },272 function(newcomponent){273 if (cmp.isValid()) {274 var body = cmp.get("v.body");275 body.push(newcomponent);276 cmp.set("v.body", body);277 }278 } 279 );280 },281 getCategory:function(cmp,event,helper){ 282 283 var CategoryId = event.getParam("ProductId");284 var comp = event.getParam("comp");285 helper.removeComponent(cmp);286 $A.createComponent(287 comp,{288 "CategoryId": CategoryId289 },290 function(newcomponent){291 if (cmp.isValid()) {292 var body = cmp.get("v.body");293 body.push(newcomponent);294 cmp.set("v.body", body);295 }296 } 297 ); 298 },299 getPaymentProcessesListing: function(cmp,event,helper) {300 var article = cmp.find('article');301 var storeAd = cmp.find('storeAd');302 var template = cmp.find('template');303 var paymentProcesses = cmp.find('paymentProcesses');304 var category = cmp.find('category');305 var prodFeatures = cmp.find('prodFeatures');306 var product = cmp.find('product');307 var prodOpt = cmp.find('prodOpt');308 var prodReview = cmp.find('prodReview');309 var coupons = cmp.find('coupons');310 var location = cmp.find('location');311 var shipmeth = cmp.find('shipmeth');312 var tax = cmp.find('loctax');313 var orders = cmp.find('orders');314 var customer = cmp.find('customer');315 var cartWishlist = cmp.find('cartWishlist');316 var productcat = cmp.find('productcat');317 var shipTax = cmp.find('shipTax');318 319 $A.util.removeClass(productcat,'productcatalogblue');320 $A.util.addClass(productcat,'productcatalog');321 322 $A.util.removeClass(shipTax,'shipandtaxblue');323 $A.util.addClass(shipTax,'shipandtax');324 325 $A.util.removeClass(article,'articleblue');326 $A.util.addClass(article,'article');327 328 $A.util.removeClass(storeAd,'storeadminBlue'); 329 $A.util.addClass(storeAd,'storeadmin');330 331 $A.util.removeClass(template,'templateblue'); 332 $A.util.addClass(template,'template'); 333 334 $A.util.removeClass(paymentProcesses,'payment');335 $A.util.addClass(paymentProcesses,'paymentblue'); 336 $A.util.removeClass(category,'categoryblue'); 337 $A.util.addClass(category,'category'); 338 339 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 340 $A.util.addClass(prodFeatures,'prodfeature');341 342 $A.util.removeClass(product,'productblue');343 $A.util.addClass(product,'product'); 344 345 $A.util.removeClass(prodOpt,'prodOptionsblue'); 346 $A.util.addClass(prodOpt,'prodOptions');347 348 $A.util.removeClass(prodReview,'reviewblue'); 349 $A.util.addClass(prodReview,'review');350 351 $A.util.removeClass(coupons,'couponsblue'); 352 $A.util.addClass(coupons,'coupons');353 354 $A.util.removeClass(location,'locationblue'); 355 $A.util.addClass(location,'location');356 357 $A.util.removeClass(shipmeth,'shippingmthblue'); 358 $A.util.addClass(shipmeth,'shippingmth');359 360 $A.util.removeClass(tax,'taxblue'); 361 $A.util.addClass(tax,'tax');362 363 $A.util.removeClass(orders,'orderblue'); 364 $A.util.addClass(orders,'order');365 366 $A.util.removeClass(customer,'customerblue'); 367 $A.util.addClass(customer,'customer');368 369 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 370 $A.util.addClass(cartWishlist,'cartwishlist');371 372 var cmpBody=cmp.find("cmpBody");373 helper.removeComponent(cmp);374 $A.createComponent(375 "wk_wedge:PaymentProcessesListing",{},376 function(newcomponent){377 if (cmp.isValid()) {378 var body = cmp.get("v.body");379 body.push(newcomponent);380 cmp.set("v.body", body);381 }382 } 383 );384 },385 getCategoryListing: function(cmp,event,helper) {386 var article = cmp.find('article');387 var storeAd = cmp.find('storeAd');388 var template = cmp.find('template');389 var paymentProcesses = cmp.find('paymentProcesses');390 var category = cmp.find('category');391 var prodFeatures = cmp.find('prodFeatures');392 var product = cmp.find('product');393 var prodOpt = cmp.find('prodOpt');394 var prodReview = cmp.find('prodReview');395 var coupons = cmp.find('coupons');396 var location = cmp.find('location');397 var shipmeth = cmp.find('shipmeth');398 var tax = cmp.find('loctax');399 var orders = cmp.find('orders');400 var customer = cmp.find('customer');401 var cartWishlist = cmp.find('cartWishlist');402 var productcat = cmp.find('productcat');403 var shipTax = cmp.find('shipTax');404 405 $A.util.removeClass(article,'articleblue');406 $A.util.addClass(article,'article');407 408 $A.util.removeClass(shipTax,'shipandtaxblue');409 $A.util.addClass(shipTax,'shipandtax');410 411 $A.util.removeClass(storeAd,'storeadminBlue'); 412 $A.util.addClass(storeAd,'storeadmin');413 414 $A.util.removeClass(template,'templateblue'); 415 $A.util.addClass(template,'template'); 416 417 $A.util.removeClass(paymentProcesses,'paymentblue'); 418 $A.util.addClass(paymentProcesses,'payment');419 $A.util.removeClass(category,'category');420 $A.util.addClass(category,'categoryblue'); 421 422 $A.util.removeClass(productcat,'productcatalog');423 $A.util.addClass(productcat,'productcatalogblue');424 425 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 426 $A.util.addClass(prodFeatures,'prodfeature');427 428 $A.util.removeClass(product,'productblue');429 $A.util.addClass(product,'product'); 430 431 $A.util.removeClass(prodOpt,'prodOptionsblue'); 432 $A.util.addClass(prodOpt,'prodOptions');433 434 $A.util.removeClass(prodReview,'reviewblue'); 435 $A.util.addClass(prodReview,'review');436 437 $A.util.removeClass(coupons,'couponsblue'); 438 $A.util.addClass(coupons,'coupons');439 440 $A.util.removeClass(location,'locationblue'); 441 $A.util.addClass(location,'location');442 443 $A.util.removeClass(shipmeth,'shippingmthblue'); 444 $A.util.addClass(shipmeth,'shippingmth');445 446 $A.util.removeClass(tax,'taxblue'); 447 $A.util.addClass(tax,'tax');448 449 $A.util.removeClass(orders,'orderblue'); 450 $A.util.addClass(orders,'order');451 452 $A.util.removeClass(customer,'customerblue'); 453 $A.util.addClass(customer,'customer');454 455 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 456 $A.util.addClass(cartWishlist,'cartwishlist');457 var cmpBody=cmp.find("cmpBody");458 helper.removeComponent(cmp);459 $A.createComponent(460 "wk_wedge:CategoryListing",{},461 function(newcomponent){462 if (cmp.isValid()) {463 var body = cmp.get("v.body");464 body.push(newcomponent);465 cmp.set("v.body", body);466 }467 } 468 );469 },470 getProductFeatureListing: function(cmp,event,helper) {471 var article = cmp.find('article');472 var storeAd = cmp.find('storeAd');473 var template = cmp.find('template');474 var paymentProcesses = cmp.find('paymentProcesses');475 var category = cmp.find('category');476 var prodFeatures = cmp.find('prodFeatures');477 var product = cmp.find('product');478 var prodOpt = cmp.find('prodOpt');479 var prodReview = cmp.find('prodReview');480 var coupons = cmp.find('coupons');481 var location = cmp.find('location');482 var shipmeth = cmp.find('shipmeth');483 var tax = cmp.find('loctax');484 var orders = cmp.find('orders');485 var customer = cmp.find('customer');486 var cartWishlist = cmp.find('cartWishlist');487 var productcat = cmp.find('productcat');488 var shipTax = cmp.find('shipTax');489 490 $A.util.removeClass(article,'articleblue');491 $A.util.addClass(article,'article');492 493 $A.util.removeClass(shipTax,'shipandtaxblue');494 $A.util.addClass(shipTax,'shipandtax');495 496 $A.util.removeClass(storeAd,'storeadminBlue'); 497 $A.util.addClass(storeAd,'storeadmin');498 499 $A.util.removeClass(template,'templateblue'); 500 $A.util.addClass(template,'template'); 501 502 $A.util.removeClass(paymentProcesses,'paymentblue'); 503 $A.util.addClass(paymentProcesses,'payment');504 $A.util.removeClass(category,'categoryblue'); 505 $A.util.addClass(category,'category');506 507 $A.util.removeClass(prodFeatures,'prodfeature');508 $A.util.addClass(prodFeatures,'prodfeatureblue'); 509 510 $A.util.removeClass(product,'productblue'); 511 $A.util.addClass(product,'product');512 513 $A.util.removeClass(productcat,'productcatalog');514 $A.util.addClass(productcat,'productcatalogblue');515 516 $A.util.removeClass(prodOpt,'prodOptionsblue'); 517 $A.util.addClass(prodOpt,'prodOptions');518 519 $A.util.removeClass(prodReview,'reviewblue'); 520 $A.util.addClass(prodReview,'review');521 522 $A.util.removeClass(coupons,'couponsblue'); 523 $A.util.addClass(coupons,'coupons');524 525 $A.util.removeClass(location,'locationblue'); 526 $A.util.addClass(location,'location');527 528 $A.util.removeClass(shipmeth,'shippingmthblue'); 529 $A.util.addClass(shipmeth,'shippingmth');530 531 $A.util.removeClass(tax,'taxblue'); 532 $A.util.addClass(tax,'tax');533 534 $A.util.removeClass(orders,'orderblue'); 535 $A.util.addClass(orders,'order');536 537 $A.util.removeClass(customer,'customerblue'); 538 $A.util.addClass(customer,'customer');539 540 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 541 $A.util.addClass(cartWishlist,'cartwishlist');542 543 var cmpBody=cmp.find("cmpBody");544 helper.removeComponent(cmp);545 $A.createComponent(546 "wk_wedge:ProductFeatureListing",{},547 function(newcomponent){548 if (cmp.isValid()) {549 var body = cmp.get("v.body");550 body.push(newcomponent);551 cmp.set("v.body", body);552 }553 } 554 );555 },556 getProductListing: function(cmp,event,helper) {557 var article = cmp.find('article');558 var storeAd = cmp.find('storeAd');559 var template = cmp.find('template');560 var paymentProcesses = cmp.find('paymentProcesses');561 var category = cmp.find('category');562 var prodFeatures = cmp.find('prodFeatures');563 var product = cmp.find('product');564 var prodOpt = cmp.find('prodOpt');565 var prodReview = cmp.find('prodReview');566 var coupons = cmp.find('coupons');567 var location = cmp.find('location');568 var shipmeth = cmp.find('shipmeth');569 var tax = cmp.find('loctax');570 var orders = cmp.find('orders');571 var customer = cmp.find('customer');572 var cartWishlist = cmp.find('cartWishlist');573 var productcat = cmp.find('productcat');574 var shipTax = cmp.find('shipTax');575 576 $A.util.removeClass(article,'articleblue');577 $A.util.addClass(article,'article');578 579 $A.util.removeClass(shipTax,'shipandtaxblue');580 $A.util.addClass(shipTax,'shipandtax');581 582 $A.util.removeClass(storeAd,'storeadminBlue'); 583 $A.util.addClass(storeAd,'storeadmin');584 585 $A.util.removeClass(template,'templateblue'); 586 $A.util.addClass(template,'template'); 587 588 $A.util.removeClass(paymentProcesses,'paymentblue'); 589 $A.util.addClass(paymentProcesses,'payment');590 $A.util.removeClass(category,'categoryblue'); 591 $A.util.addClass(category,'category');592 593 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 594 $A.util.addClass(prodFeatures,'prodfeature');595 596 $A.util.removeClass(productcat,'productcatalog');597 $A.util.addClass(productcat,'productcatalogblue');598 599 $A.util.removeClass(product,'product');600 $A.util.addClass(product,'productblue'); 601 602 $A.util.removeClass(prodOpt,'prodOptionsblue'); 603 $A.util.addClass(prodOpt,'prodOptions');604 605 $A.util.removeClass(prodReview,'reviewblue'); 606 $A.util.addClass(prodReview,'review');607 608 $A.util.removeClass(coupons,'couponsblue'); 609 $A.util.addClass(coupons,'coupons');610 611 $A.util.removeClass(location,'locationblue'); 612 $A.util.addClass(location,'location');613 614 $A.util.removeClass(shipmeth,'shippingmthblue'); 615 $A.util.addClass(shipmeth,'shippingmth');616 617 $A.util.removeClass(tax,'taxblue'); 618 $A.util.addClass(tax,'tax');619 620 $A.util.removeClass(orders,'orderblue'); 621 $A.util.addClass(orders,'order');622 623 $A.util.removeClass(customer,'customerblue'); 624 $A.util.addClass(customer,'customer');625 626 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 627 $A.util.addClass(cartWishlist,'cartwishlist');628 var cmpBody=cmp.find("cmpBody");629 helper.removeComponent(cmp);630 $A.createComponent(631 "wk_wedge:ProductListing",{},632 function(newcomponent){633 if (cmp.isValid()) {634 var body = cmp.get("v.body");635 body.push(newcomponent);636 cmp.set("v.body", body);637 }638 } 639 );640 },641 getProductOptionListing: function(cmp,event,helper) {642 var article = cmp.find('article');643 var storeAd = cmp.find('storeAd');644 var template = cmp.find('template');645 var paymentProcesses = cmp.find('paymentProcesses');646 var category = cmp.find('category');647 var prodFeatures = cmp.find('prodFeatures');648 var product = cmp.find('product');649 var prodOpt = cmp.find('prodOpt');650 var prodReview = cmp.find('prodReview');651 var coupons = cmp.find('coupons');652 var location = cmp.find('location');653 var shipmeth = cmp.find('shipmeth');654 var tax = cmp.find('loctax');655 var orders = cmp.find('orders');656 var customer = cmp.find('customer');657 var cartWishlist = cmp.find('cartWishlist');658 var productcat = cmp.find('productcat');659 var shipTax = cmp.find('shipTax');660 661 $A.util.removeClass(article,'articleblue');662 $A.util.addClass(article,'article');663 664 $A.util.removeClass(shipTax,'shipandtaxblue');665 $A.util.addClass(shipTax,'shipandtax');666 667 $A.util.removeClass(storeAd,'storeadminBlue'); 668 $A.util.addClass(storeAd,'storeadmin');669 670 $A.util.removeClass(template,'templateblue'); 671 $A.util.addClass(template,'template'); 672 673 $A.util.removeClass(paymentProcesses,'paymentblue'); 674 $A.util.addClass(paymentProcesses,'payment');675 $A.util.removeClass(category,'categoryblue'); 676 $A.util.addClass(category,'category');677 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 678 $A.util.addClass(prodFeatures,'prodfeature'); 679 680 $A.util.removeClass(product,'productblue'); 681 $A.util.addClass(product,'product'); 682 683 $A.util.removeClass(productcat,'productcatalog');684 $A.util.addClass(productcat,'productcatalogblue');685 686 $A.util.removeClass(prodOpt,'prodOptions');687 $A.util.addClass(prodOpt,'prodOptionsblue'); 688 689 $A.util.removeClass(prodReview,'reviewblue'); 690 $A.util.addClass(prodReview,'review');691 692 $A.util.removeClass(coupons,'couponsblue'); 693 $A.util.addClass(coupons,'coupons');694 695 $A.util.removeClass(location,'locationblue'); 696 $A.util.addClass(location,'location');697 698 $A.util.removeClass(shipmeth,'shippingmthblue'); 699 $A.util.addClass(shipmeth,'shippingmth');700 701 $A.util.removeClass(tax,'taxblue'); 702 $A.util.addClass(tax,'tax');703 704 $A.util.removeClass(orders,'orderblue'); 705 $A.util.addClass(orders,'order');706 707 $A.util.removeClass(customer,'customerblue'); 708 $A.util.addClass(customer,'customer');709 710 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 711 $A.util.addClass(cartWishlist,'cartwishlist');712 713 var cmpBody=cmp.find("cmpBody");714 helper.removeComponent(cmp);715 $A.createComponent(716 "wk_wedge:ProductOptionListing",{},717 function(newcomponent){718 if (cmp.isValid()) {719 var body = cmp.get("v.body");720 body.push(newcomponent);721 cmp.set("v.body", body);722 }723 } 724 );725 },726 getReviewListing: function(cmp,event,helper) {727 var article = cmp.find('article');728 var storeAd = cmp.find('storeAd');729 var template = cmp.find('template');730 var paymentProcesses = cmp.find('paymentProcesses');731 var category = cmp.find('category');732 var prodFeatures = cmp.find('prodFeatures');733 var product = cmp.find('product');734 var prodOpt = cmp.find('prodOpt');735 var prodReview = cmp.find('prodReview');736 var coupons = cmp.find('coupons');737 var location = cmp.find('location');738 var shipmeth = cmp.find('shipmeth');739 var tax = cmp.find('loctax');740 var orders = cmp.find('orders');741 var customer = cmp.find('customer');742 var cartWishlist = cmp.find('cartWishlist');743 var productcat = cmp.find('productcat');744 var shipTax = cmp.find('shipTax');745 746 $A.util.removeClass(article,'articleblue');747 $A.util.addClass(article,'article');748 749 $A.util.removeClass(shipTax,'shipandtaxblue');750 $A.util.addClass(shipTax,'shipandtax');751 752 $A.util.removeClass(storeAd,'storeadminBlue'); 753 $A.util.addClass(storeAd,'storeadmin');754 755 $A.util.removeClass(template,'templateblue'); 756 $A.util.addClass(template,'template'); 757 758 $A.util.removeClass(paymentProcesses,'paymentblue'); 759 $A.util.addClass(paymentProcesses,'payment');760 $A.util.removeClass(category,'categoryblue'); 761 $A.util.addClass(category,'category');762 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 763 $A.util.addClass(prodFeatures,'prodfeature'); 764 765 $A.util.removeClass(product,'productblue'); 766 $A.util.addClass(product,'product'); 767 768 $A.util.removeClass(prodOpt,'prodOptionsblue');769 $A.util.addClass(prodOpt,'prodOptions'); 770 771 $A.util.removeClass(prodReview,'review');772 $A.util.addClass(prodReview,'reviewblue');773 774 $A.util.removeClass(productcat,'productcatalog');775 $A.util.addClass(productcat,'productcatalogblue');776 777 $A.util.removeClass(coupons,'couponsblue'); 778 $A.util.addClass(coupons,'coupons');779 780 $A.util.removeClass(location,'locationblue'); 781 $A.util.addClass(location,'location');782 783 $A.util.removeClass(shipmeth,'shippingmthblue'); 784 $A.util.addClass(shipmeth,'shippingmth');785 786 $A.util.removeClass(tax,'taxblue'); 787 $A.util.addClass(tax,'tax');788 789 $A.util.removeClass(orders,'orderblue'); 790 $A.util.addClass(orders,'order');791 792 $A.util.removeClass(customer,'customerblue'); 793 $A.util.addClass(customer,'customer');794 795 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 796 $A.util.addClass(cartWishlist,'cartwishlist');797 798 var cmpBody=cmp.find("cmpBody");799 helper.removeComponent(cmp);800 $A.createComponent(801 "wk_wedge:ReviewListing",{},802 function(newcomponent){803 if (cmp.isValid()) {804 var body = cmp.get("v.body");805 body.push(newcomponent);806 cmp.set("v.body", body);807 }808 } 809 );810 },811 getCouponListing: function(cmp,event,helper) {812 var article = cmp.find('article');813 var storeAd = cmp.find('storeAd');814 var template = cmp.find('template');815 var paymentProcesses = cmp.find('paymentProcesses');816 var category = cmp.find('category');817 var prodFeatures = cmp.find('prodFeatures');818 var product = cmp.find('product');819 var prodOpt = cmp.find('prodOpt');820 var prodReview = cmp.find('prodReview');821 var coupons = cmp.find('coupons');822 var location = cmp.find('location');823 var shipmeth = cmp.find('shipmeth');824 var tax = cmp.find('loctax');825 var orders = cmp.find('orders');826 var customer = cmp.find('customer');827 var cartWishlist = cmp.find('cartWishlist');828 var productcat = cmp.find('productcat');829 var shipTax = cmp.find('shipTax');830 831 $A.util.removeClass(article,'articleblue');832 $A.util.addClass(article,'article');833 834 $A.util.removeClass(shipTax,'shipandtaxblue');835 $A.util.addClass(shipTax,'shipandtax');836 837 $A.util.removeClass(productcat,'productcatalogblue');838 $A.util.addClass(productcat,'productcatalog'); 839 840 $A.util.removeClass(storeAd,'storeadminBlue'); 841 $A.util.addClass(storeAd,'storeadmin');842 843 $A.util.removeClass(template,'templateblue'); 844 $A.util.addClass(template,'template'); 845 846 $A.util.removeClass(paymentProcesses,'paymentblue'); 847 $A.util.addClass(paymentProcesses,'payment');848 $A.util.removeClass(category,'categoryblue'); 849 $A.util.addClass(category,'category');850 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 851 $A.util.addClass(prodFeatures,'prodfeature'); 852 853 $A.util.removeClass(product,'productblue'); 854 $A.util.addClass(product,'product'); 855 856 $A.util.removeClass(prodOpt,'prodOptionsblue');857 $A.util.addClass(prodOpt,'prodOptions'); 858 859 $A.util.removeClass(prodReview,'reviewblue'); 860 $A.util.addClass(prodReview,'review'); 861 862 $A.util.removeClass(coupons,'coupons');863 $A.util.addClass(coupons,'couponsblue'); 864 865 $A.util.removeClass(location,'locationblue'); 866 $A.util.addClass(location,'location');867 868 $A.util.removeClass(shipmeth,'shippingmthblue'); 869 $A.util.addClass(shipmeth,'shippingmth');870 871 $A.util.removeClass(tax,'taxblue'); 872 $A.util.addClass(tax,'tax');873 874 $A.util.removeClass(orders,'orderblue'); 875 $A.util.addClass(orders,'order');876 877 $A.util.removeClass(customer,'customerblue'); 878 $A.util.addClass(customer,'customer');879 880 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 881 $A.util.addClass(cartWishlist,'cartwishlist');882 883 var cmpBody=cmp.find("cmpBody");884 helper.removeComponent(cmp);885 $A.createComponent(886 "wk_wedge:CouponListing",{},887 function(newcomponent){888 if (cmp.isValid()) {889 var body = cmp.get("v.body");890 body.push(newcomponent);891 cmp.set("v.body", body);892 }893 } 894 );895 },896 getLocationListing: function(cmp,event,helper) {897 var article = cmp.find('article');898 var storeAd = cmp.find('storeAd');899 var template = cmp.find('template');900 var paymentProcesses = cmp.find('paymentProcesses');901 var category = cmp.find('category');902 var prodFeatures = cmp.find('prodFeatures');903 var product = cmp.find('product');904 var prodOpt = cmp.find('prodOpt');905 var prodReview = cmp.find('prodReview');906 var coupons = cmp.find('coupons');907 var location = cmp.find('location');908 var shipmeth = cmp.find('shipmeth');909 var tax = cmp.find('loctax');910 var orders = cmp.find('orders');911 var customer = cmp.find('customer');912 var cartWishlist = cmp.find('cartWishlist');913 var productcat = cmp.find('productcat');914 var shipTax = cmp.find('shipTax');915 916 $A.util.removeClass(article,'articleblue');917 $A.util.addClass(article,'article');918 919 $A.util.removeClass(shipTax,'shipandtax'); 920 $A.util.addClass(shipTax,'shipandtaxblue'); 921 922 $A.util.removeClass(productcat,'productcatalogblue');923 $A.util.addClass(productcat,'productcatalog'); 924 925 $A.util.removeClass(storeAd,'storeadminBlue'); 926 $A.util.addClass(storeAd,'storeadmin');927 928 $A.util.removeClass(template,'templateblue'); 929 $A.util.addClass(template,'template'); 930 931 $A.util.removeClass(paymentProcesses,'paymentblue'); 932 $A.util.addClass(paymentProcesses,'payment');933 $A.util.removeClass(category,'categoryblue'); 934 $A.util.addClass(category,'category');935 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 936 $A.util.addClass(prodFeatures,'prodfeature'); 937 938 $A.util.removeClass(product,'productblue'); 939 $A.util.addClass(product,'product'); 940 941 $A.util.removeClass(prodOpt,'prodOptionsblue');942 $A.util.addClass(prodOpt,'prodOptions'); 943 944 $A.util.removeClass(prodReview,'reviewblue'); 945 $A.util.addClass(prodReview,'review'); 946 947 $A.util.removeClass(coupons,'couponsblue'); 948 $A.util.addClass(coupons,'coupons'); 949 950 $A.util.removeClass(location,'location');951 $A.util.addClass(location,'locationblue'); 952 953 $A.util.removeClass(shipmeth,'shippingmthblue'); 954 $A.util.addClass(shipmeth,'shippingmth');955 956 $A.util.removeClass(tax,'taxblue'); 957 $A.util.addClass(tax,'tax');958 959 $A.util.removeClass(orders,'orderblue'); 960 $A.util.addClass(orders,'order');961 962 $A.util.removeClass(customer,'customerblue'); 963 $A.util.addClass(customer,'customer');964 965 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 966 $A.util.addClass(cartWishlist,'cartwishlist');967 var cmpBody=cmp.find("cmpBody");968 helper.removeComponent(cmp);969 $A.createComponent(970 "wk_wedge:LocationListing",{},971 function(newcomponent){972 if (cmp.isValid()) {973 var body = cmp.get("v.body");974 body.push(newcomponent);975 cmp.set("v.body", body);976 }977 } 978 );979 },980 getShippingMethodListing: function(cmp,event,helper) {981 var article = cmp.find('article');982 var storeAd = cmp.find('storeAd');983 var template = cmp.find('template');984 var paymentProcesses = cmp.find('paymentProcesses');985 var category = cmp.find('category');986 var prodFeatures = cmp.find('prodFeatures');987 var product = cmp.find('product');988 var prodOpt = cmp.find('prodOpt');989 var prodReview = cmp.find('prodReview');990 var coupons = cmp.find('coupons');991 var location = cmp.find('location');992 var shipmeth = cmp.find('shipmeth');993 var tax = cmp.find('loctax');994 var orders = cmp.find('orders');995 var customer = cmp.find('customer');996 var cartWishlist = cmp.find('cartWishlist');997 var productcat = cmp.find('productcat');998 var shipTax = cmp.find('shipTax');999 1000 $A.util.removeClass(article,'articleblue');1001 $A.util.addClass(article,'article');1002 1003 $A.util.removeClass(shipTax,'shipandtax'); 1004 $A.util.addClass(shipTax,'shipandtaxblue'); 1005 1006 $A.util.removeClass(productcat,'productcatalogblue');1007 $A.util.addClass(productcat,'productcatalog'); 1008 1009 $A.util.removeClass(storeAd,'storeadminBlue'); 1010 $A.util.addClass(storeAd,'storeadmin');1011 1012 $A.util.removeClass(template,'templateblue'); 1013 $A.util.addClass(template,'template'); 1014 1015 $A.util.removeClass(paymentProcesses,'paymentblue'); 1016 $A.util.addClass(paymentProcesses,'payment');1017 $A.util.removeClass(category,'categoryblue'); 1018 $A.util.addClass(category,'category');1019 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 1020 $A.util.addClass(prodFeatures,'prodfeature'); 1021 1022 $A.util.removeClass(product,'productblue'); 1023 $A.util.addClass(product,'product'); 1024 1025 $A.util.removeClass(prodOpt,'prodOptionsblue');1026 $A.util.addClass(prodOpt,'prodOptions'); 1027 1028 $A.util.removeClass(prodReview,'reviewblue'); 1029 $A.util.addClass(prodReview,'review'); 1030 1031 $A.util.removeClass(coupons,'couponsblue'); 1032 $A.util.addClass(coupons,'coupons'); 1033 1034 $A.util.removeClass(location,'locationblue');1035 $A.util.addClass(location,'location'); 1036 1037 $A.util.removeClass(shipmeth,'shippingmth');1038 $A.util.addClass(shipmeth,'shippingmthblue'); 1039 1040 $A.util.removeClass(tax,'taxblue'); 1041 $A.util.addClass(tax,'tax');1042 1043 $A.util.removeClass(orders,'orderblue'); 1044 $A.util.addClass(orders,'order');1045 1046 $A.util.removeClass(customer,'customerblue'); 1047 $A.util.addClass(customer,'customer');1048 1049 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 1050 $A.util.addClass(cartWishlist,'cartwishlist');1051 1052 var cmpBody=cmp.find("cmpBody");1053 helper.removeComponent(cmp);1054 $A.createComponent(1055 "wk_wedge:ShippingMethodListing",{},1056 function(newcomponent){1057 if (cmp.isValid()) {1058 var body = cmp.get("v.body");1059 body.push(newcomponent);1060 cmp.set("v.body", body);1061 }1062 } 1063 );1064 },1065 getTaxListing: function(cmp,event,helper) {1066 var article = cmp.find('article');1067 var storeAd = cmp.find('storeAd');1068 var template = cmp.find('template');1069 var paymentProcesses = cmp.find('paymentProcesses');1070 var category = cmp.find('category');1071 var prodFeatures = cmp.find('prodFeatures');1072 var product = cmp.find('product');1073 var prodOpt = cmp.find('prodOpt');1074 var prodReview = cmp.find('prodReview');1075 var coupons = cmp.find('coupons');1076 var location = cmp.find('location');1077 var shipmeth = cmp.find('shipmeth');1078 var tax = cmp.find('loctax');1079 var orders = cmp.find('orders');1080 var customer = cmp.find('customer');1081 var cartWishlist = cmp.find('cartWishlist');1082 var productcat = cmp.find('productcat');1083 var shipTax = cmp.find('shipTax');1084 1085 $A.util.removeClass(article,'articleblue');1086 $A.util.addClass(article,'article');1087 1088 $A.util.removeClass(shipTax,'shipandtax'); 1089 $A.util.addClass(shipTax,'shipandtaxblue'); 1090 1091 $A.util.removeClass(productcat,'productcatalogblue');1092 $A.util.addClass(productcat,'productcatalog'); 1093 1094 $A.util.removeClass(storeAd,'storeadminBlue'); 1095 $A.util.addClass(storeAd,'storeadmin');1096 1097 $A.util.removeClass(template,'templateblue'); 1098 $A.util.addClass(template,'template'); 1099 1100 $A.util.removeClass(paymentProcesses,'paymentblue'); 1101 $A.util.addClass(paymentProcesses,'payment');1102 $A.util.removeClass(category,'categoryblue'); 1103 $A.util.addClass(category,'category');1104 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 1105 $A.util.addClass(prodFeatures,'prodfeature'); 1106 1107 $A.util.removeClass(product,'productblue'); 1108 $A.util.addClass(product,'product'); 1109 1110 $A.util.removeClass(prodOpt,'prodOptionsblue');1111 $A.util.addClass(prodOpt,'prodOptions'); 1112 1113 $A.util.removeClass(prodReview,'reviewblue'); 1114 $A.util.addClass(prodReview,'review'); 1115 1116 $A.util.removeClass(coupons,'couponsblue'); 1117 $A.util.addClass(coupons,'coupons'); 1118 1119 $A.util.removeClass(location,'locationblue');1120 $A.util.addClass(location,'location'); 1121 1122 $A.util.removeClass(shipmeth,'shippingmthblue'); 1123 $A.util.addClass(shipmeth,'shippingmth'); 1124 1125 $A.util.removeClass(tax,'tax');1126 $A.util.addClass(tax,'taxblue'); 1127 1128 $A.util.removeClass(orders,'orderblue'); 1129 $A.util.addClass(orders,'order');1130 1131 $A.util.removeClass(customer,'customerblue'); 1132 $A.util.addClass(customer,'customer');1133 1134 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 1135 $A.util.addClass(cartWishlist,'cartwishlist');1136 1137 var cmpBody=cmp.find("cmpBody");1138 helper.removeComponent(cmp);1139 $A.createComponent(1140 "wk_wedge:TaxListing",{},1141 function(newcomponent){1142 if (cmp.isValid()) {1143 var body = cmp.get("v.body");1144 body.push(newcomponent);1145 cmp.set("v.body", body);1146 }1147 } 1148 );1149 },1150 getOrderListing: function(cmp,event,helper) {1151 var article = cmp.find('article');1152 var storeAd = cmp.find('storeAd');1153 var template = cmp.find('template');1154 var paymentProcesses = cmp.find('paymentProcesses');1155 var category = cmp.find('category');1156 var prodFeatures = cmp.find('prodFeatures');1157 var product = cmp.find('product');1158 var prodOpt = cmp.find('prodOpt');1159 var prodReview = cmp.find('prodReview');1160 var coupons = cmp.find('coupons');1161 var location = cmp.find('location');1162 var shipmeth = cmp.find('shipmeth');1163 var tax = cmp.find('loctax');1164 var orders = cmp.find('orders');1165 var customer = cmp.find('customer');1166 var cartWishlist = cmp.find('cartWishlist');1167 var productcat = cmp.find('productcat');1168 var shipTax = cmp.find('shipTax');1169 1170 $A.util.removeClass(article,'articleblue');1171 $A.util.addClass(article,'article');1172 1173 $A.util.removeClass(shipTax,'shipandtaxblue');1174 $A.util.addClass(shipTax,'shipandtax'); 1175 1176 $A.util.removeClass(productcat,'productcatalogblue');1177 $A.util.addClass(productcat,'productcatalog'); 1178 1179 $A.util.removeClass(storeAd,'storeadminBlue'); 1180 $A.util.addClass(storeAd,'storeadmin');1181 1182 $A.util.removeClass(template,'templateblue'); 1183 $A.util.addClass(template,'template'); 1184 1185 $A.util.removeClass(paymentProcesses,'paymentblue'); 1186 $A.util.addClass(paymentProcesses,'payment');1187 $A.util.removeClass(category,'categoryblue'); 1188 $A.util.addClass(category,'category');1189 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 1190 $A.util.addClass(prodFeatures,'prodfeature'); 1191 1192 $A.util.removeClass(product,'productblue'); 1193 $A.util.addClass(product,'product'); 1194 1195 $A.util.removeClass(prodOpt,'prodOptionsblue');1196 $A.util.addClass(prodOpt,'prodOptions'); 1197 1198 $A.util.removeClass(prodReview,'reviewblue'); 1199 $A.util.addClass(prodReview,'review'); 1200 1201 $A.util.removeClass(coupons,'couponsblue'); 1202 $A.util.addClass(coupons,'coupons'); 1203 1204 $A.util.removeClass(location,'locationblue');1205 $A.util.addClass(location,'location'); 1206 1207 $A.util.removeClass(shipmeth,'shippingmthblue'); 1208 $A.util.addClass(shipmeth,'shippingmth'); 1209 1210 $A.util.removeClass(tax,'taxblue');1211 $A.util.addClass(tax,'tax'); 1212 1213 $A.util.removeClass(orders,'order');1214 $A.util.addClass(orders,'orderblue'); 1215 1216 $A.util.removeClass(customer,'customerblue'); 1217 $A.util.addClass(customer,'customer');1218 1219 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 1220 $A.util.addClass(cartWishlist,'cartwishlist');1221 1222 var cmpBody=cmp.find("cmpBody");1223 helper.removeComponent(cmp);1224 $A.createComponent(1225 "wk_wedge:OrderListing",{},1226 function(newcomponent){1227 if (cmp.isValid()) {1228 var body = cmp.get("v.body");1229 body.push(newcomponent);1230 cmp.set("v.body", body);1231 }1232 } 1233 );1234 },1235 getCustomerListing: function(cmp,event,helper) { 1236 var article = cmp.find('article');1237 var storeAd = cmp.find('storeAd');1238 var template = cmp.find('template');1239 var paymentProcesses = cmp.find('paymentProcesses');1240 var category = cmp.find('category');1241 var prodFeatures = cmp.find('prodFeatures');1242 var product = cmp.find('product');1243 var prodOpt = cmp.find('prodOpt');1244 var prodReview = cmp.find('prodReview');1245 var coupons = cmp.find('coupons');1246 var location = cmp.find('location');1247 var shipmeth = cmp.find('shipmeth');1248 var tax = cmp.find('loctax');1249 var orders = cmp.find('orders');1250 var customer = cmp.find('customer');1251 var cartWishlist = cmp.find('cartWishlist');1252 var productcat = cmp.find('productcat');1253 var shipTax = cmp.find('shipTax');1254 1255 $A.util.removeClass(article,'articleblue');1256 $A.util.addClass(article,'article');1257 1258 $A.util.removeClass(shipTax,'shipandtaxblue');1259 $A.util.addClass(shipTax,'shipandtax'); 1260 1261 $A.util.removeClass(productcat,'productcatalogblue');1262 $A.util.addClass(productcat,'productcatalog'); 1263 1264 $A.util.removeClass(storeAd,'storeadminBlue'); 1265 $A.util.addClass(storeAd,'storeadmin');1266 1267 $A.util.removeClass(template,'templateblue'); 1268 $A.util.addClass(template,'template'); 1269 1270 $A.util.removeClass(paymentProcesses,'paymentblue'); 1271 $A.util.addClass(paymentProcesses,'payment');1272 $A.util.removeClass(category,'categoryblue'); 1273 $A.util.addClass(category,'category');1274 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 1275 $A.util.addClass(prodFeatures,'prodfeature'); 1276 1277 $A.util.removeClass(product,'productblue'); 1278 $A.util.addClass(product,'product'); 1279 1280 $A.util.removeClass(prodOpt,'prodOptionsblue');1281 $A.util.addClass(prodOpt,'prodOptions'); 1282 1283 $A.util.removeClass(prodReview,'reviewblue'); 1284 $A.util.addClass(prodReview,'review'); 1285 1286 $A.util.removeClass(coupons,'couponsblue'); 1287 $A.util.addClass(coupons,'coupons'); 1288 1289 $A.util.removeClass(location,'locationblue');1290 $A.util.addClass(location,'location'); 1291 1292 $A.util.removeClass(shipmeth,'shippingmthblue'); 1293 $A.util.addClass(shipmeth,'shippingmth'); 1294 1295 $A.util.removeClass(tax,'taxblue');1296 $A.util.addClass(tax,'tax'); 1297 1298 $A.util.removeClass(orders,'orderblue'); 1299 $A.util.addClass(orders,'order'); 1300 1301 $A.util.removeClass(customer,'customer');1302 $A.util.addClass(customer,'customerblue'); 1303 1304 $A.util.removeClass(cartWishlist,'cartwishlistblue'); 1305 $A.util.addClass(cartWishlist,'cartwishlist');1306 1307 var cmpBody=cmp.find("cmpBody");1308 helper.removeComponent(cmp);1309 $A.createComponent(1310 "wk_wedge:CustomerListing",{},1311 function(newcomponent){1312 if (cmp.isValid()) {1313 var body = cmp.get("v.body");1314 body.push(newcomponent);1315 cmp.set("v.body", body);1316 }1317 } 1318 );1319 },1320 getCartListing: function(cmp,event,helper) {1321 var article = cmp.find('article');1322 var storeAd = cmp.find('storeAd');1323 var template = cmp.find('template');1324 var paymentProcesses = cmp.find('paymentProcesses');1325 var category = cmp.find('category');1326 var prodFeatures = cmp.find('prodFeatures');1327 var product = cmp.find('product');1328 var prodOpt = cmp.find('prodOpt');1329 var prodReview = cmp.find('prodReview');1330 var coupons = cmp.find('coupons');1331 var location = cmp.find('location');1332 var shipmeth = cmp.find('shipmeth');1333 var tax = cmp.find('loctax');1334 var orders = cmp.find('orders');1335 var customer = cmp.find('customer');1336 var cartWishlist = cmp.find('cartWishlist');1337 var productcat = cmp.find('productcat');1338 var shipTax = cmp.find('shipTax');1339 1340 $A.util.removeClass(article,'articleblue');1341 $A.util.addClass(article,'article');1342 1343 $A.util.removeClass(shipTax,'shipandtaxblue');1344 $A.util.addClass(shipTax,'shipandtax'); 1345 1346 $A.util.removeClass(productcat,'productcatalogblue');1347 $A.util.addClass(productcat,'productcatalog'); 1348 1349 $A.util.removeClass(storeAd,'storeadminBlue'); 1350 $A.util.addClass(storeAd,'storeadmin');1351 1352 $A.util.removeClass(template,'templateblue'); 1353 $A.util.addClass(template,'template'); 1354 1355 $A.util.removeClass(paymentProcesses,'paymentblue'); 1356 $A.util.addClass(paymentProcesses,'payment');1357 $A.util.removeClass(category,'categoryblue'); 1358 $A.util.addClass(category,'category');1359 $A.util.removeClass(prodFeatures,'prodfeatureblue'); 1360 $A.util.addClass(prodFeatures,'prodfeature'); 1361 1362 $A.util.removeClass(product,'productblue'); 1363 $A.util.addClass(product,'product'); 1364 1365 $A.util.removeClass(prodOpt,'prodOptionsblue');1366 $A.util.addClass(prodOpt,'prodOptions'); 1367 1368 $A.util.removeClass(prodReview,'reviewblue'); 1369 $A.util.addClass(prodReview,'review'); 1370 1371 $A.util.removeClass(coupons,'couponsblue'); 1372 $A.util.addClass(coupons,'coupons'); 1373 1374 $A.util.removeClass(location,'locationblue');1375 $A.util.addClass(location,'location'); 1376 1377 $A.util.removeClass(shipmeth,'shippingmthblue'); 1378 $A.util.addClass(shipmeth,'shippingmth'); 1379 1380 $A.util.removeClass(tax,'taxblue');1381 $A.util.addClass(tax,'tax'); 1382 1383 $A.util.removeClass(orders,'orderblue'); 1384 $A.util.addClass(orders,'order'); 1385 1386 $A.util.removeClass(customer,'customerblue'); 1387 $A.util.addClass(customer,'customer'); 1388 1389 $A.util.removeClass(cartWishlist,'cartwishlist');1390 $A.util.addClass(cartWishlist,'cartwishlistblue'); 1391 1392 var cmpBody=cmp.find("cmpBody");1393 helper.removeComponent(cmp);1394 $A.createComponent(1395 "wk_wedge:CartListing",{},1396 function(newcomponent){1397 if (cmp.isValid()) {1398 var body = cmp.get("v.body");1399 body.push(newcomponent);1400 cmp.set("v.body", body);1401 }1402 } 1403 );1404 },...
findController.js
Source:findController.js
...117 return currView &&118 currView == ko.views.manager.currentView &&119 currView.getAttribute("type") == "editor";120}121FindController.prototype.do_cmd_find = function() ko.launch.find();122// cmd_replace123FindController.prototype.is_cmd_replace_enabled = function() {124 return ko.views.manager.getAllViews().length != 0;125}126FindController.prototype.do_cmd_replace = function() ko.launch.replace();127FindController.prototype._cmd_findNextPrev = function(searchBackward) {128 if (this._currentView.findbar && this._currentView.findbar.controller === this) {129 // Special case for the incremental search - the find bar is active,130 // just do a searchAgain instead of trying to find the MRU. See131 // bug 94120.132 this.searchAgain(searchBackward);133 return;134 }135 var pattern = ko.mru.get("find-patternMru");136 if (pattern) {137 var context = Cc["@activestate.com/koFindContext;1"]138 .createInstance(Ci.koIFindContext);139 var findSvc = Cc["@activestate.com/koFindService;1"]140 .getService(Ci.koIFindService);141 context.type = findSvc.options.preferredContextType;142 findSvc.options.searchBackward = searchBackward;143 ko.find.findNext(window, context, pattern);144 } else {145 ko.launch.find();146 }147};148// cmd_findNext149FindController.prototype.is_cmd_findNext_enabled = viewIsCurrentView;150FindController.prototype.do_cmd_findNext = function() {151 if (!viewIsCurrentView.call(this)) return;152 this._cmd_findNextPrev(false);153}154// cmd_findPrevious155FindController.prototype.is_cmd_findPrevious_enabled = viewIsCurrentView;156FindController.prototype.do_cmd_findPrevious = function() {157 if (!viewIsCurrentView.call(this)) return;158 this._cmd_findNextPrev(true);159}160// cmd_findNextResult161FindController.prototype.is_cmd_findNextResult_enabled = viewIsCurrentView;162FindController.prototype.do_cmd_findNextResult = function() ko.findresults.nextResult();163// cmd_findNextFunction, cmd_findPreviousFunction, cmd_findAllFunctions164// Auxiliary function used by the find*Function(s) methods.165//166// "searchType" is one of "next", "previous" or "all"167//168FindController.prototype._findFunction = function(searchType) {169 try {170 var language = this._currentView.koDoc.languageObj;171 var re = language.namedBlockRE;172 var namedBlockDescription = language.namedBlockDescription;173 if (re == null || re == '')174 return;175 // save some find options176 var patternType, caseSensitivity, searchBackward, matchWord;177 patternType = this._findSvc.options.patternType;178 caseSensitivity = this._findSvc.options.caseSensitivity;179 searchBackward = this._findSvc.options.searchBackward;180 matchWord = this._findSvc.options.matchWord;181 this._findSvc.options.patternType = Ci.koIFindOptions.FOT_REGEX_PYTHON;182 this._findSvc.options.caseSensitivity = Ci.koIFindOptions.FOT_SENSITIVE;183 this._findSvc.options.searchBackward = (searchType == "previous");184 this._findSvc.options.matchWord = false;185 var context = Cc["@activestate.com/koFindContext;1"]186 .createInstance(Ci.koIFindContext);187 context.type = Ci.koIFindContext.FCT_CURRENT_DOC;188 if (searchType == "all") {189 ko.find.findAll(window, context, re, namedBlockDescription);190 } else {191 ko.find.findNext(window, context, re);192 }193 // restore saved find options194 this._findSvc.options.patternType = patternType;195 this._findSvc.options.caseSensitivity = caseSensitivity;196 this._findSvc.options.searchBackward = searchBackward;197 this._findSvc.options.matchWord = matchWord;198 } catch (e) {199 this.log.error(e);200 }201}202FindController.prototype.is_cmd_findNextFunction_enabled = function() {203 var view = this._currentView;204 return view && view.koDoc && view.koDoc.languageObj.namedBlockRE != '';205}206FindController.prototype.do_cmd_findNextFunction = function() {207 this._findFunction("next");208}209FindController.prototype.is_cmd_findPreviousFunction_enabled = function() {210 var view = this._currentView;211 return view && view.koDoc && view.koDoc.languageObj.namedBlockRE != '';212}213FindController.prototype.do_cmd_findPreviousFunction = function() {214 this._findFunction("previous");215}216FindController.prototype.is_cmd_findAllFunctions_enabled = function() {217 var view = this._currentView;218 return view && view.koDoc && view.koDoc.languageObj.namedBlockRE != '';219}220FindController.prototype.do_cmd_findAllFunctions = function() {221 this._findFunction("all");222}223/**224 * Check if incremental search is enabled225 * @see nsIController::isCommandEnabled226 */227FindController.prototype.is_cmd_startIncrementalSearch_enabled = function() {228 return this._currentView != null;229}230/**231 * Find the next incremental search result232 * @see nsIController::doCommand233 */234FindController.prototype.do_cmd_startIncrementalSearch = function() {235 this._startIncrementalSearch(false);236}237/**238 * Check if incremental search (backwards) is enabled239 * @see nsIController::isCommandEnabled240 */241FindController.prototype.is_cmd_startIncrementalSearchBackwards_enabled = function() {242 return this._currentView != null;243}244/**245 * Find the previous incremental search result246 * @see nsIController::doCommand247 */248FindController.prototype.do_cmd_startIncrementalSearchBackwards = function() {249 this._startIncrementalSearch(true);250}251/**252 * Set the search pattern type253 */254Object.defineProperty(FindController.prototype, "patternType", {255 get: function FindController_get_patternType() {256 return this._findSvc.options.patternType;257 },258 set: function FindController_set_patternType(val) {259 _log.debug("setting patternType to " + val +260 "(was " + this._findSvc.options.patternType + ")");261 if (this._findSvc.options.patternType == val) {262 return;263 }264 this._findSvc.options.patternType = val;265 if (this._view) {266 // in incremental search267 this._view.findbar.patternType = val;268 }269 },270 enumerable : true,271 configurable : true272});273/**274 * mouse event handler for incremental search275 */276FindController.prototype._mouseHandlerBase = function (e) {277 var relatedTarget = null;278 if (e && e.type && e.type == "mousedown") {279 var isFindbar =280 (e.originalTarget == this._view.findbar) ||281 (e.originalTarget.compareDocumentPosition(this._view.findbar) & Node.DOCUMENT_POSITION_CONTAINS);282 if (isFindbar) {283 // The user clicked on the find bar or something in it; we don't284 // want to do anything here285 event.stopPropagation();286 return;287 }288 }289 this._stopIncrementalSearch("Clicked away", false);290};291/**292 * Focus event handler for incremental search293 * @note this should be bound to a FindController instance294 * @param event The focus event295 */296FindController.prototype._focusHandlerBase = function(e) {297 // look at the focused element, instead of what the event says, because we298 // shouldn't hide the find bar if the window itself gets focus without299 // changing the focused element300 var elem = document.commandDispatcher.focusedElement;301 if ((!this._view) ||302 (!elem) ||303 (elem == this._view.findbar) ||304 (elem.compareDocumentPosition(this._view.findbar) & Node.DOCUMENT_POSITION_CONTAINS))305 {306 // The user clicked on the find bar or something in it; we don't307 // want to do anything here308 return;309 }310 this._stopIncrementalSearch("Focus changed", false);311};312FindController.prototype._startIncrementalSearch = function(backwards) {313 if (!this._currentView) {314 _log.error("Couldn't start incremental search with no focused scintilla");315 return;316 }317 _log.debug("Starting incremental search " + (backwards ? "backwards" : "forwards"));318 this._view = this._currentView;319 var scintilla = this._currentView.scintilla;320 var scimoz = scintilla.scimoz;321 this._view.findbar.controller = this;322 this._view.findbar.notFound = false;323 this._view.findbar.collapsed = false;324 this._view.findbar.setStatus(null);325 // canOpenDialog must be set after collapsed=false in order for the XBL326 // binding to apply early enough.327 this._view.findbar.canOpenDialog = (this._viewManager == ko.views.manager);328 this._mouseHandler = this._mouseHandlerBase.bind(this);329 scintilla.mouse_handler = this._mouseHandler;330 this._focusHandler = this._focusHandlerBase.bind(this);331 document.addEventListener("focus", this._focusHandler, true);332 this._incrementalSearchStartPos = Math.min(scimoz.currentPos, scimoz.anchor);333 var pattern = scimoz.selText;334 if (/\n/.test(pattern)) pattern = ""; // ignore multi-line selections335 this._incrementalSearchContext = Cc["@activestate.com/koFindContext;1"]336 .createInstance(Ci.koIFindContext);337 // bug 93040: If the pattern is empty, use the last search text338 pattern = pattern || this._lastIncrementalSearchText;339 // Save original find settings340 this._origFindOptions = {341 "searchBackward": this._findSvc.options.searchBackward,342 "matchWord": this._findSvc.options.matchWord,343 "patternType": this._findSvc.options.patternType,344 "caseSensitivity": this._findSvc.options.caseSensitivity345 };346 // Clear the highlight now because we're starting a new search347 ko.find.highlightClearAll(this._view.scimoz);348 ko.statusBar.AddMessage(null, "isearch");349 // Apply new find settings350 this._findSvc.options.searchBackward = backwards;351 this._findSvc.options.matchWord = false;352 this.patternType = Number(ko.prefs.getStringPref('isearchType'));353 this.highlightTimeout = Number(ko.prefs.getLongPref('isearchHighlightTimeout')) || undefined;354 // manually force the findbar pattern type to match reality355 this._view.findbar.patternType = this.patternType;356 this._findSvc.options.caseSensitivity = Number(ko.prefs.getStringPref('isearchCaseSensitivity'));357 this._view.findbar.caseSensitivity = this._findSvc.options.caseSensitivity;358 this._incrementalSearchContext.type = this._findSvc.options.FCT_CURRENT_DOC;359 this._incrementalSearchPattern = pattern;360 this._lastIncrementalSearchText = pattern;361 this._view.findbar.text = pattern;362 // Set focus after setting the textbox value, otherwise the history popup363 // can get confused with the old values. See bug 93105.364 this._view.findbar.focus();365 if (pattern) {366 this._view.findbar.selectText();367 // we have something selected; highlight the other occurrences without368 // moving the cursor, please369 this._lastResult =370 ko.find.highlightAllMatches(scimoz,371 this._incrementalSearchContext,372 pattern,373 this.highlightTimeout);374 } else {375 this._lastResult = false;376 }377 _log.debug("_startIncrementalSearch: pattern=" +378 JSON.stringify(pattern) + ", lastResult=" + this._lastResult);379}380FindController.prototype._stopIncrementalSearch = function(why, highlight) {381 _log.debug("stopping incremental search (" + why + ")");382 if (why !== null) {383 ko.statusBar.AddMessage(_bundle.formatStringFromName("incrementalSearchStopped",384 [why], 1),385 "isearch", 3000, highlight, true);386 }387 if (this._incrementalSearchPattern && this._lastResult) {388 // Found something; force add to the MRU.389 ko.mru.add("find-patternMru", this._incrementalSearchPattern, true)390 }391 _log.debug("lastResult: " + this._lastResult + " pattern: " +392 JSON.stringify(this._incrementalSearchPattern));393 if (this._origFindOptions) {394 // Save the incremental search settings395 ko.prefs.setStringPref('isearchType', this.patternType);396 ko.prefs.setStringPref('isearchCaseSensitivity', this.caseSensitivity);397 // Restore original find settings398 for each (let key in Object.keys(this._origFindOptions)) {399 _log.debug("restoring " + key + " to " + this._origFindOptions[key]);400 this._findSvc.options[key] = this._origFindOptions[key];401 }402 this._origFindOptions = null;403 }404 // Don't automatically add things to the MRU; we do that in searchAgain if405 // needed, or just above if we found something last time.406 this._incrementalSearchPattern = '';407 var view = this._view;408 if (!view) return;409 // clean up event handlers410 if (view.scintilla.mouse_handler == this._mouseHandler) {411 view.scintilla.mouse_handler = null;412 }413 document.removeEventListener("focus", this._focusHandler, true);414 this._focusHandler = null;415 var elem = document.commandDispatcher.focusedElement;416 if ((!elem) ||417 (elem == view.findbar) ||418 (elem.compareDocumentPosition(this._view.findbar) & Node.DOCUMENT_POSITION_CONTAINS))419 {420 // the focus is in the find bar; it gets confused if we send more key421 // events its way, so move the focus to its scintilla instead.422 view.scintilla.focus();423 }424 // clean up the find bar425 view.findbar.controller = null;426 view.findbar.collapsed = true;427 this._view = null;428};429/**430 * Convert this incremental search to a Find dialog431 */432FindController.prototype.convertToDialog = function() {433 // throw away the original find options, it's all going into the dialog434 this._origFindOptions = null;435 // save the pattern436 var pattern = this._incrementalSearchPattern;437 // abort the incremental search438 this._stopIncrementalSearch(null, false);439 // Open the find dialog440 ko.launch.find(pattern);441};442/**443 * Start an incremental search (or update the current one with more text)444 * @param pattern The pattern to search for445 */446FindController.prototype.search = function(pattern, highlight) {447 var scimoz = this._view.scintilla.scimoz;448 this._lastIncrementalSearchText = pattern;449 this._incrementalSearchPattern = pattern;450 var oldStart = scimoz.selectionStart;451 var oldEnd = scimoz.selectionEnd;452 this._view.findbar.notFound = false;453 this._view.findbar.text = this._incrementalSearchPattern;454 scimoz.gotoPos(this._incrementalSearchStartPos-1);...
tabs.js
Source:tabs.js
1jQuery(document).ready(function(a) {2 a(".ult_tabs").each(function() {3 function m() {4 clearTimeout(l), k++, k > j - 1 && (k = 0), l = setTimeout(function() {5 c.find("ul.ult_tabmenu li.ult_tab_li").each(function(b) {6 k == b && a(this).find("a.ult_a").trigger("click")7 })8 }, 1e3 * i)9 }10 var c = a(this),11 d = a(this).data("tabsstyle"),12 e = a(this).data("titlecolor"),13 f = a(this).data("titlebg"),14 g = a(this).data("titlehovercolor"),15 h = a(this).data("titlehoverbg"),16 i = parseInt(a(this).data("rotatetabs")),17 j = a(this).find("ul.ult_tabmenu li.ult_tab_li").length,18 act_title = a(this).data("activetitle"),19 act_icon = a(this).data("activeicon"),20 act_bg = a(this).data("activebg"),21 ht_width=parseInt(a(this).find(".ult_tabcontent").outerWidth()),22 k = 0;23 var lastid=[];24 lastid.push(0);25 a(this).find("ul.ult_tabmenu").addClass("active").find("> li.ult_tab_li:eq(0)").addClass("current"), a(this).find("ul.ult_tabmenu li.ult_tab_li").each(function(b) {26 var iconh = a(this).data("iconhover"),27 iconc = a(this).data("iconcolor");28 if(act_icon==''){29 act_icon=iconh;30 }31 0 == b && ("style2" == d || "style1" == d ? (a(this).find("a.ult_a").css({32 background: act_bg,33 color: act_title34 }),a(this).find(".ult_tab_icon").css({35 color:act_icon36 })) : (a(this).find("a.ult_a").css({37 color: act_title,38 }), a(this).css({39 background: act_bg,40 color: act_title41 }),a(this).find(".ult_tab_icon").css({42 color:act_title43 })44 )),45 a(this).on("mouseover", function() {46 if(a(this).hasClass("current"))47 {48 }49 else{50 a(this).hasClass("current") || "style2" == d || "style1" == d ? (a(this).find("a.ult_a").css({51 background: h,52 color: g53 }) ,a(this).find(".ult_tab_icon").css({54 color:iconh55 })): (a(this).find("a.ult_a").css({56 color: g57 }), a(this).css({58 background: h,59 color: g60 }) , a(this).find("a.ult_a").find(".ult_tab_icon").css({61 color: iconh})62 )}63 }).on("mouseleave", function() {64 a(this).hasClass("current") || ("style2" == d || "style1" == d ? (a(this).find("a.ult_a").css({65 background: f,66 color: e67 }),a(this).find(".ult_tab_icon").css({68 color:iconc69 }) ): (a(this).find("a.ult_a").css({70 color: e71 }), a(this).css({72 background: f,73 color: e74 }), a(this).find("a.ult_a").find(".ult_tab_icon").css({75 color: iconc})76 ))77 })78 }), a(this).find("ul.ult_tabmenu li a.ult_a").click(function(b) {79 var c = a(this).closest(".ult_tabs"),80 j = a(this).closest("li.ult_tab_li").index();81 var p=a(this).parent().data("iconcolor");82 var icn=a(this).parent().data("iconhover");83 lastid.push(j);84 var current=lastid[lastid.length-1];85 var last=lastid[lastid.length-2];86 //console.log("current-"+j);87 //console.log("last-"+last);88 var anm=a(this).closest('.ult_tabs').data("animation");89 c.find("ul.ult_tabmenu > li.ult_tab_li").removeClass("current"), "style2" == d || "style1" == d ?( c.find("ul.ult_tabmenu > li.ult_tab_li").find("a").css({90 background: f,91 color: e92 }),93 c.find("ul.ult_tabmenu > li.ult_tab_li").find(".ult_tab_icon").css({94 color: p95 })) : (c.find("ul.ult_tabmenu > li.ult_tab_li").find("a.ult_a").css({96 color: e97 }), c.find("ul.ult_tabmenu > li.ult_tab_li").css({98 background: f,99 color: e100 })101 );102 var l = a(this).closest("li.ult_tab_li").addClass("current");103 if(anm =='Slide'){104 "style2" == d || "style1" == d ? (l.find("a.ult_a").css({105 background: act_bg,106 color: act_title107 }),l.find(".ult_tab_icon").css({108 color: act_icon109 }) ): (l.find("a.ult_a").css({110 color: act_title111 }), l.css({112 background: act_bg,113 color: act_title114 }))115 ,116 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").stop().slideUp(500, function() {117 i > 0 && m();118 //console.log("prajakta");119 // var cnht=c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").outerHeight();120 //c.find(".ult_tabcontent").clearQueue().finish();121 //c.find(".ult_tabcontent").animate({height: cnht},300);122 }), c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").stop().slideDown(500, function(){123 }), k = j, b.preventDefault();124 }125 else if(anm =='Fade'){126 "style2" == d || "style1" == d ? (l.find("a.ult_a").css({127 background: act_bg,128 color: act_title129 }),l.find(".ult_tab_icon").css({130 color: act_icon131 }) ): (l.find("a.ult_a").css({132 color: act_title133 }), l.css({134 background: act_bg,135 color: act_title136 }))137 ,138 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").fadeOut(100, function() {139 i > 0 && m();140 }), c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").fadeIn(1200), k = j, b.preventDefault();141 }142 else if(anm =='Scale'){143 //alert("hi");144 "style2" == d || "style1" == d ? (l.find("a.ult_a").css({145 background: act_bg,146 color: act_title147 }),l.find(".ult_tab_icon").css({148 color: act_icon149 }) ): (l.find("a.ult_a").css({150 color: act_title151 }), l.css({152 background: act_bg,153 color: act_title154 }))155 ,156 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").fadeOut(100, function() {157 i > 0 && m();158 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").addClass("scaleTabname");159 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").removeClass("scaleTabname2");160 }), c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").fadeIn(300,function(){161 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").removeClass("scaleTabname");162 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").addClass("scaleTabname2");163 }), k = j, b.preventDefault();164 }165 else if(anm =='Slide-Zoom'){166 "style2" == d || "style1" == d ? (l.find("a.ult_a").css({167 background: act_bg,168 color: act_title169 }),l.find(".ult_tab_icon").css({170 color: act_icon171 }) ): (l.find("a.ult_a").css({172 color: act_title173 }), l.css({174 background: act_bg,175 color: act_title176 }))177 ,178 c.find(".ult_tabcontent").find("div.ult_tabitemname").removeClass("ult_owl-backSlide-in");179 c.find(".ult_tabcontent").find("div.ult_tabitemname").removeClass("ult_owl-backSlide-out");180 c.find(".ult_tabcontent").find("div.ult_tabitemname").removeClass("ult_owl-backSlideright-in");181 c.find(".ult_tabcontent").find("div.ult_tabitemname").removeClass("ult_owl-backSlideright-out");182 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").fadeOut(200, function() {183 c.find(".ult_tabcontent").find("div.ult_tab_min_contain").addClass("ult_owl-origin");184 if(j<last){185 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").addClass("ult_owl-backSlide-in");186 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").removeClass(" ult_owl-backSlide-out");187 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + last + ")").addClass("ult_owl-backSlide-out");188 }189 else{190 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").addClass("ult_owl-backSlideright-in");191 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").removeClass(" ult_owl-backSlideright-out");192 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + last + ")").addClass("ult_owl-backSlideright-out");193 }194 i > 0 && m();195 }),196 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").fadeIn(1500,function(){197 c.find(".ult_tabcontent").find("div.ult_tab_min_contain").removeClass("ult_owl-origin");198 if(j<last){199 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + last + ")").removeClass(" ult_owl-backSlide-in");200 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").removeClass(" ult_owl-backSlide-out");201 }202 else{203 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + last + ")").removeClass(" ult_owl-backSlideright-in");204 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").removeClass(" ult_owl-backSlideright-out");205 }206 }), k = j, b.preventDefault();207 }208 else if(anm =='Slide-Horizontal'){209 "style2" == d || "style1" == d ? (l.find("a.ult_a").css({210 background: act_bg,211 color: act_title212 }),l.find(".ult_tab_icon").css({213 color: act_icon214 }) ): (l.find("a.ult_a").css({215 color: act_title216 }), l.css({217 background: act_bg,218 color: act_title219 }))220 ,221 p=c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").hasClass("ult_active_tabnme");222 if(p==false){223 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").hide(10, function() {224 jQuery(this).addClass("ult_active_tabnme");225 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").removeClass("ult_active_tabnme");226 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").hide(10);227 if(j>last){228 jQuery(this).animate({left:"-"+ht_width+"px"},10);229 //c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + last + ")").animate({left:"-"+ht_width+"px"},10);230 }else{231 jQuery(this).animate({left:""+ht_width+"px"},10);232 //c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + last + ")").animate({left:""+ht_width+"px"},10);233 }234 i > 0 && m()235 }), c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").show(100,function(){236 jQuery(this).animate({left:"0px"},800)237 }), k = j,b.preventDefault();238 }else{239 c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").animate({opacity: 1}, 1, function() {240 i > 0 && m()241 }), c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").animate({opacity: 1}, 1,function(){242 }), k = j,b.preventDefault();243 }244 }245 else {246 "style2" == d || "style1" == d ? (l.find("a.ult_a").css({247 background: act_bg,248 color: act_title249 }),l.find(".ult_tab_icon").css({250 color: act_icon251 }) ): (l.find("a.ult_a").css({252 color: act_title253 }), l.css({254 background: act_bg,255 color: act_title256 }))257 ,258 c.find(".ult_tabcontent").find("div.ult_tabitemname").not("div.ult_tabitemname:eq(" + j + ")").hide(1, function() {259 i > 0 && m()260 }), c.find(".ult_tabcontent").find("div.ult_tabitemname:eq(" + j + ")").show(10), k = j, b.preventDefault();261 }262 });263 var l = 0;264 i > 0 && m()265 })266});267/*--- for height matching ----*/268jQuery(document).ready(function(a) {269 //for icon color changes on click event270 a(this).find("ul.ult_tabmenu li a.ult_a").click(function(b) {271 a(document).trigger('ultAdvancedTabClicked', a(this));272 jQuery("html,body").stop();273 a(this).closest("li.ult_tab_li").siblings().each(function(index,value){274 var iconcolor=a(this).data('iconcolor');275 a(this).find(".ult_tab_icon").css({color: iconcolor});276 });277 });278 a(document).on('ultAdvancedTabClicked', function(event, ele){279 if (typeof wpb_prepare_tab_content == 'function') {280 wpb_prepare_tab_content( event, { newPanel: jQuery('.ult_tabcontent') } );281 }282 });283 });284function setmytime( string ,float_val ){285 286 var arr=[];287 var newarr=[];288 var flag=true;289 var styleflag=true;290 //for link and to tab291 var type = escape( window.location.hash.substr(1) );292 if(string!='' && typeof string!='undefined'){293 type = string ;294 }295 if(type!='')296 {297 var maintab=jQuery("a.ult_a[href$='"+type+"']"); 298 if(maintab.parents(".ult_tabs").length > 0)299 { 300 var bgcontain= maintab.parents(".ult_tabs");301 var actbgcolor=bgcontain.data('activebg');302 var normbgcolor=bgcontain.data('titlebg');303 var titlecolor=bgcontain.data('titlecolor');304 var activetitle=bgcontain.data('activetitle');305 var tabsstyle=bgcontain.data('tabsstyle');306 var aciveicon=bgcontain.data('activeicon');307 var iconcolor=bgcontain.find("li.ult_tab_li").data('iconcolor');308 if(aciveicon==''){309 var aciveicon=bgcontain.find("li.ult_tab_li").data('iconhover');310 }311 bgcontain.find("li.ult_tab_li").removeClass("current");312 if(maintab.hasClass('ult_a')){313 maintab.parent().addClass("current");314 }315 316 if(tabsstyle=='style1'||tabsstyle=='style2'){317 bgcontain.find("a.ult_a").css({'background-color':normbgcolor});318 maintab.css({'background-color':actbgcolor});319 }else{320 bgcontain.find("li.ult_tab_li").css({'background-color':normbgcolor});321 maintab.parent().css({'background-color':actbgcolor});322 //maintab.css({'background-color':normbgcolor});323 }324 bgcontain.find("a.ult_a").css({'color':titlecolor});325 maintab.css({'color':activetitle});326 bgcontain.find(".ult_tab_icon").css({'color':iconcolor});327 maintab.find(".ult_tab_icon").css({'color':aciveicon});328 329 var index=maintab.parent().index()+1;330 bgcontain.find(".ult_tabitemname" ).css({'display':'none'});331 bgcontain.find(".ult_tabitemname:nth-child("+index+")" ).css({'display':'block'});332 var off = bgcontain.offset().top;333 var left = bgcontain.offset().left;334 335 if(!bgcontain.hasClass('ult_aniamte') && float_val!==true){336 jQuery('html, body').animate({337 scrollTop: bgcontain.offset().top-100338 }, 1000);339 }340 bgcontain.addClass('ult_aniamte');341 bgcontain.find("ul.ult_tabmenu li a.ult_a").click(function(b) {342 b.preventDefault();343 jQuery("html,body").clearQueue();344 jQuery("html,body").stop();345 });346 } 347 }348jQuery(".ult_tabs").each(function() {349 //for fullheight350 var fullheight=jQuery(this).data('fullheight');351 var mheight=0;352 if(fullheight=='on'){353 jQuery(this).find('.ult_tabitemname').each(function(){354 if (mheight < jQuery(this).outerHeight()) {355 mheight = jQuery(this).outerHeight();356 jQuery(this).parents(".ult_tabcontent").css({"min-height":mheight+"px"});357 }358 });359 }360 var style=jQuery(this).data('tabsstyle');361 var width=jQuery( window ).width();362 var responsemode=jQuery(this).data('respmode');363 var respwidth=jQuery(this).data('respwidth');364 var showboth=jQuery(this).data('responsivemode');365 var animt=jQuery(this).closest('.ult_tabs').data("animation");366 if(animt=='Fade'|| animt =='Scale' || animt=='Slide-Zoom'){367 var cnwidth=jQuery(this).find("div.ult_tabcontent").outerHeight();368 jQuery(this).find('.ult_tabcontent').css({'height':cnwidth});369 }370 if(animt=='Slide-Horizontal'){371 var width=jQuery(this).find('div.ult_tabcontent').outerWidth();372 //jQuery(this).find('.ult_tabitemname').not("div.ult_tabitemname:eq(0)").css({left:"-"+width+"px"});373 jQuery(this).find(".ult_tabcontent").find("div.ult_tabitemname:eq(0)").addClass("ult_active_tabnme");374 }375 if(animt=='Scale'){376 jQuery(this).find('.ult_tabitemname').not("div.ult_tabitemname:eq(0)").addClass("scaleTabname");377 jQuery(this).find(".ult_tabcontent").find("div.ult_tabitemname:eq(0)").addClass("scaleTabname2");378 }379 if(animt=='Slide-Zoom'){380 jQuery(this).closest(".ult_tabs").find("div.ult_tabitemname").removeClass("owl-backSlide-in");381 jQuery(this).closest(".ult_tabs").find("div.ult_tabitemname").removeClass("owl-backSlide-in");382 }383 var id = jQuery(this).attr('id');384 if(width>=respwidth){ 385 /*jQuery(this).parent().find(".ult_acord").css({display:"none"});386 jQuery(this).parent().find(".ult_tabs").css({display:"block"});*/387 // here - .id => accordian and #id =>Tab388 jQuery(this).parent().find("."+id).css({display:"none"});389 jQuery(this).parent().find("#"+id).css({display:"block"});390 }391 else{392 if(responsemode=='Accordion'){393 jQuery(this).parent().find("."+id).css({display:"block"});394 jQuery(this).parent().find("#"+id).css({display:"none"});395 }396 }397 var maxheight = 0;398 flag='false';399 jQuery(this).find('.ult_tab_li').each(function(){400 if (maxheight < jQuery(this).outerHeight()) {401 maxheight = jQuery(this).outerHeight();402 }403 });404 jQuery(this).find('.ult_a').addClass(flag);405 ht1=parseInt(maxheight);406 407 if(style=='style2'){408 ht1=parseInt(ht1/2);409 if(width>300 && width <660)410 {411 ht1=maxheight/2;412 } 413 }414 415 if(width>300 && width <660)416 {417 jQuery(this).find('.ult_a ').removeClass("false");418 newarr.push(ht1);419 if(showboth!='Both'){420 if(jQuery(this).find('.aio-icon').hasClass('icon-top')){421 jQuery(this).find('.aio-icon').removeClass('icon-top').addClass('ult_tab_resp_icon');422 }423 if(jQuery(this).find('.ult_tab_main').hasClass('ult_top')){424 jQuery(this).find('.ult_tab_main').removeClass('ult_top').addClass('ult_tab_resp_ult_top');425 }426 }427 }428 if(jQuery(this).find('.ult_a ').hasClass("false")){429 arr.push(ht1);430 }431});432function setht(){433 var width=jQuery( window ).width();434 jQuery(".ult_tabs").each(function() {435 var style=jQuery(this).data('tabsstyle');436 var responsemode=jQuery(this).data('respmode');437 var respwidth=jQuery(this).data('respwidth');438 var showboth=jQuery(this).data('responsivemode');439 var id = jQuery(this).attr('id');440 if(width>=respwidth){ 441 /*jQuery(this).parent().find(".ult_acord").css({display:"none"});442 jQuery(this).parent().find(".ult_tabs").css({display:"block"});*/443 jQuery(this).parent().find("."+id).css({display:"none"});444 jQuery(this).parent().find("#"+id).css({display:"block"});445 if(showboth!='Both'){446 if(jQuery(this).find('.aio-icon').hasClass('ult_tab_resp_icon')){447 jQuery(this).find('.aio-icon').removeClass('ult_tab_resp_icon').addClass('icon-top');448 }449 if(jQuery(this).find('.ult_tab_main').hasClass('ult_tab_resp_ult_top')){450 jQuery(this).find('.ult_tab_main').removeClass('ult_tab_resp_ult_top').addClass('ult_top');451 }452 }453 }454 else{455 if(responsemode=='Accordion'){456 jQuery(this).parent().find("."+id).css({display:"block"});457 jQuery(this).parent().find("#"+id).css({display:"none"});458 }459 if(showboth!='Both'){460 if(jQuery(this).find('.aio-icon').hasClass('icon-top')){461 jQuery(this).find('.aio-icon').removeClass('icon-top').addClass('ult_tab_resp_icon');462 }463 if(jQuery(this).find('.ult_tab_main').hasClass('ult_top')){464 jQuery(this).find('.ult_tab_main').removeClass('ult_top').addClass('ult_tab_resp_ult_top');465 }466 }467 }468 if(width>300 && width <660)469 {470 jQuery(this).find('.ult_a ').removeClass("false");471 newarr.push(ht1);472 if(showboth!='Both'){473 if(jQuery(this).find('.aio-icon').hasClass('icon-top')){474 jQuery(this).find('.aio-icon').removeClass('icon-top').addClass('ult_tab_resp_icon');475 }476 if(jQuery(this).find('.ult_tab_main').hasClass('ult_top')){477 jQuery(this).find('.ult_tab_main').removeClass('ult_top').addClass('ult_tab_resp_ult_top');478 }479 }480 }481 });482 }483 jQuery(window).resize(function(e){484 setht();// call setmytime function to active any link on click of a tag or menu485 });486}487jQuery(document).ready(function(){488 setmytime();// call setmytime function to active any link from other pages click of a tag or menu489 // call setmytime function to active any tab on click of menu490 jQuery(this).find("a").click(function(b) {491 var href= jQuery(this).attr("href");492 if( typeof href !== 'undefined' && href.length > 0 ){493 var type = escape(href.substring(href.indexOf('#')+1));494 var maintab=jQuery("a.ult_a[href$='"+type+"']"); 495 var tabid = maintab.attr('href');496 if( typeof tabid!='undefined' && tabid !== '' ){ 497 tabid = tabid.replace("#", ""); 498 }499 if(maintab.parents(".ult_tabs").length > 0 && type == tabid )500 { 501 setmytime(tabid);502 }503 }504 });505 //set tab active initially506 jQuery(".ult_tabs").each(function() {507 //for fullheight508 var indexOf=jQuery(this).data('activeindex'); 509 var p = jQuery(this).find("ul.ult_tabmenu li.ult_tab_li:nth-child("+indexOf+")" ).find(".ult_a").attr("id");510 if(p.length >= 1 && indexOf > 1){511 setmytime(p ,true);512 }513 });514 /*--- for smooth fadein effect ------*/515 jQuery(this).find("ul.ult_tabmenu li a.ult_a").click(function(b) {516 var animt=jQuery(this).closest('.ult_tabs').data("animation");517 j = jQuery(this).closest("li.ult_tab_li").index();518 519 if(animt =='Fade' ){520 var cwidth=jQuery(this).closest(".ult_tabs").find("div.ult_tabitemname:eq(" + j + ")").outerHeight();521 jQuery(this).closest(".ult_tabs").find(".ult_tabitemname").css({'position':"absolute","left":"0","right":"0"});522 // jQuery(this).closest(".ult_tabs").find('.ult_tabcontent').css({'height':cwidth});523 jQuery(this).closest(".ult_tabs").find('.ult_tabcontent').animate({'height':cwidth},"slow");524 }525 526 if(animt =='Slide-Horizontal' ){527 var cwidth=jQuery(this).closest(".ult_tabs").find("div.ult_tabitemname:eq(" + j + ")").outerHeight();528 jQuery(this).closest(".ult_tabs").find(".ult_tabcontent").css({"overflow":"hidden"});529 jQuery(this).closest(".ult_tabs").find('.ult_tabcontent').animate({'height':cwidth},"slow");530 }531 532 });533});534jQuery(document).ready(function(){535 /*--- for advancedcarousal ------*/536jQuery(this).find("ul.ult_tabmenu li a.ult_a").click(function(b) {537 if(jQuery(".slick-slider").parents('.ult_tabitemname').length){538 setTimeout(function(){ 539 jQuery('.slick-slider').slick('setPosition');540 jQuery(window).trigger('resize');541 },200);542 }543});544//for toggle545if(jQuery(".vc_toggle").parents('.ult_tabs')){546 547 jQuery( ".vc_toggle" ).click(function() {548 var prev_ht= jQuery(this).parents(".ult_tabitemname").height();549 jQuery(this).find(".vc_toggle_content").toggleClass("vc_toggle_for_tab");550 if(jQuery(this).find(".vc_toggle_content").hasClass("vc_toggle_for_tab")){551 setTimeout(function(){552 var tab_ht= jQuery(".ult_tabitemname").height();553 jQuery('.ult_tabcontent').animate({'height':tab_ht},100);554 555 },100);556 }else{557 setTimeout(function(){558 var tab_ht= jQuery(".vc_toggle").parents('.ult_tabitemname').height();559 jQuery('.ult_tabcontent').animate({'height':tab_ht},100);560 },200);561 }562 });563 }564});
load_xml.js
Source:load_xml.js
...41}4243function load_system_description(xml)44{45 var physical_system_xml = $(xml).find("sml\\:PhysicalSystem").first();46 var curr_field;47 48 var keywords_xml;49 var keyword_list_xml;5051 // check if this file is for an oem description or sensor deployment52 curr_field = $(physical_system_xml).children("sml\\:typeOf");5354 // if the "type of" element is present, this is a sensor deployment55 if (curr_field.length)56 {57 $('#file_type').val('deployment');5859 // this statement will show the appropriate fields and menu tabs60 //check_file_type();6162 // don't need to use escape when just looking for attributes63 $('#type_of_title').val(fix_text(curr_field.attr("xlink:title")));64 $('#type_of_href' ).val(fix_text(curr_field.attr("xlink:href" )));65 }66 67 // otherwise, this is an oem description68 else69 {70 $('#file_type').val('oem');7172 // this statement will hide the appropriate fields and menu tabs73 //check_file_type();74 }7576 curr_field = $(physical_system_xml).children("gml\\:name");77 $('#name').val(fix_text(curr_field.text()));7879 curr_field = $(physical_system_xml).children("gml\\:identifier");80 $('#unique_id').val(fix_text(curr_field.text()));8182 curr_field = $(physical_system_xml).children("gml\\:description");83 $('#physical_system').val(fix_text(curr_field.text()));8485 keywords_xml = $(physical_system_xml).children("sml\\:keywords").first();86 keyword_list_xml = $(keywords_xml).find("sml\\:KeywordList");8788 $(keyword_list_xml).find("sml\\:keyword").each(function()89 {90 push_item_to_list("keyword", fix_text($(this).text()));91 });92 93 check_file_type();94}9596function load_system_identifiers(xml)97{98 var curr_label;99 var curr_value;100101 $(xml).find("sml\\:identifier").each(function()102 {103 curr_label = $(this).find("sml\\:label");104 curr_label = curr_label.text().trim().split(" ").join("").toLowerCase();105 106 curr_value = fix_text($(this).find("sml\\:value").text());107 108 if (curr_label == "longname")109 {110 $('#long_name').val(curr_value);111 }112 113 if (curr_label == "shortname")114 {115 $('#short_name').val(curr_value);116 }117 118 if (curr_label == "serialnumber")119 {120 $('#serial_number').val(curr_value);121 }122 123 if (curr_label == "deployingagency")124 {125 $('#deploying_agency').val(curr_value);126 }127128 if (curr_label == "manufacturer")129 {130 $('#sys_id_manufacturer').val(curr_value);131 }132 133 if (curr_label == "modelnumber")134 {135 $('#sys_id_model_number').val(curr_value);136 }137138 });139 140 if ($('#type_of_href').val() != "" && $('#sys_id_manufacturer').val() == "")141 {142 get_field_from_typeof('manufacturer', 'sys_id_manufacturer');143 }144145 if ($('#type_of_href').val() != "" && $('#sys_id_model_number').val() == "")146 {147 get_field_from_typeof('modelnumber', 'sys_id_model_number');148 }149}150151function get_field_from_typeof(doc_label, form_field)152{153 $.get("resources/php/get_xml_file.php", 154 {155 filename: $('#type_of_href').val(),156 location: "external"157 },158 function(response)159 {160 var data = response;161162 if (data.length)163 {164 var xml = $.parseXML(data);165 var curr_label;166 var curr_value;167 168 // parse the doc, find the field169 $(xml).find("sml\\:identifier").each(function()170 {171 curr_label = $(this).find("sml\\:label");172 curr_label = curr_label.text().trim().split(" ").join("").toLowerCase();173 174 curr_value = fix_text($(this).find("sml\\:value").text());175 176 if (curr_label == doc_label)177 {178 $('#' + form_field).val(curr_value);179 }180 });181 }182 }); 183}184185function load_system_classifiers(xml)186{187 var curr_label;188 var curr_value;189190 $(xml).find("sml\\:classifier").each(function()191 {192 curr_label = $(this).find("sml\\:label");193 curr_label = curr_label.text().trim().split(" ").join("").toLowerCase();194 195 curr_value = fix_text($(this).find("sml\\:value").text());196197 if (curr_label == "intendedapplication")198 {199 push_item_to_list("intended_application", curr_value);200 }201 202 if (curr_label == "sensortype")203 {204 push_item_to_list("sensor_type", curr_value);205 }206 });207}208209function load_valid_time(xml)210{211 var valid_time_doc;212 var time_instant_doc;213 var valid_time_local_id;214215 var time_pos;216 var input_state_val;217 218 valid_time_doc = $(xml).find("sml\\:validTime");219 time_instant_doc = $(valid_time_doc).find("gml\\:TimeInstant");220221 // don't need to use escape when just looking for attributes222 valid_time_local_id = time_instant_doc.attr("gml:id");223224 time_pos = $(time_instant_doc).find("gml\\:timePosition");225 input_state_val = time_pos.attr("indeterminatePosition")226 227 $('#valid_time_local_id').val(fix_text(valid_time_local_id));228 $('#input_state').val(input_state_val);229 $('#valid_time_date').val(time_pos.text());230}231232function load_contacts(xml)233{234 var section;235 var outer;236 var inner;237238 $(xml).find("sml\\:contact").each(function()239 {240 section = add_section("contact", "load");241 242 outer = $(this).attr("xlink:arcrole");243 if (outer)244 {245 $(section).find('#contact_role').val(fix_text(outer));246 }247248 outer = $(this).find("gmd\\:individualName");249 inner = $(outer).find("gco\\:CharacterString");250 $(section).find('#individual_name').val(fix_text(inner.text()));251252 outer = $(this).find("gmd\\:organisationName");253 inner = $(outer).find("gco\\:CharacterString");254 $(section).find('#organization_name').val(fix_text(inner.text()));255256 outer = $(this).find("gmd\\:voice");257 inner = $(outer).find("gco\\:CharacterString");258 $(section).find('#phone_number').val(fix_text(inner.text()));259260 outer = $(this).find("gmd\\:facsimile");261 inner = $(outer).find("gco\\:CharacterString");262 $(section).find('#fax_number').val(fix_text(inner.text()));263264 outer = $(this).find("gmd\\:deliveryPoint");265 inner = $(outer).find("gco\\:CharacterString");266 $(section).find('#delivery_point').val(fix_text(inner.text()));267268 outer = $(this).find("gmd\\:city");269 inner = $(outer).find("gco\\:CharacterString");270 $(section).find('#city').val(fix_text(inner.text()));271272 outer = $(this).find("gmd\\:administrativeArea");273 inner = $(outer).find("gco\\:CharacterString");274 $(section).find('#administrative_area').val(fix_text(inner.text()));275276 outer = $(this).find("gmd\\:postalCode");277 inner = $(outer).find("gco\\:CharacterString");278 $(section).find('#postal_code').val(fix_text(inner.text()));279280 outer = $(this).find("gmd\\:country");281 inner = $(outer).find("gco\\:CharacterString");282 $(section).find('#country').val(fix_text(inner.text()));283284 outer = $(this).find("gmd\\:electronicMailAddress");285 inner = $(outer).find("gco\\:CharacterString");286 $(section).find('#email_address').val(fix_text(inner.text()));287 });288}289290function load_history(xml)291{292 var section;293 294 var history_xml = $(xml).find("sml\\:history");295 var event_list_xml = $(history_xml).find("sml\\:EventList");296 var little_event_xml = $(event_list_xml).find("sml\\:event")297298 var little_time_xml;299 var time_instant_xml;300 301 var history_label;302 var history_description;303 var history_time_id;304 var history_time_value;305 306 var property_xml;307 var data_record_xml;308 309 var data_record_label;310 311 var field_value;312 var field_href;313 314 $(little_event_xml).find("sml\\:Event").each(function()315 {316 section = add_section("history", "load");317 318 // label and description should be children of "sml:Event"319 history_label = $(this).children("swe\\:label").first().text();320 history_description = $(this).children("swe\\:description").first().text();321 322 little_time_xml = $(this).find("sml\\:time");323 time_instant_xml = $(little_time_xml).find("gml\\:TimeInstant");324 history_time_id = $(time_instant_xml).attr("gml:id");325 history_time_value = $(time_instant_xml).find("gml\\:timePosition").text().trim();326 327 $(section).find('#heading_button').text(fix_text(history_label) + " (" + fix_text(history_time_value) + ")");328 $(section).find('#history_label').val(fix_text(history_label));329 $(section).find('#history_description').val(fix_text(history_description));330 $(section).find('#history_local_id').val(fix_text(history_time_id));331 $(section).find('#history_time').val(fix_text(history_time_value));332 333 property_xml = $(this).find("sml\\:property");334 data_record_xml = $(property_xml).find("swe\\:DataRecord");335336 // the data record label should be a child of DataRecord337 data_record_label = $(data_record_xml).children("swe\\:label").first().text();338 $(section).find('#history_data_record_label').val(fix_text(data_record_label));339 340 // find all the fields for this event341 $(this).find("swe\\:field").each(function()342 {343 field_value = fix_text($(this).find("swe\\:value").text());344 345 if ($(this).attr("name") == "EventType") 346 $(section).find('#history_event_type').val(field_value);347348 if ($(this).attr("name") == "SerialNumber") 349 $(section).find('#history_serial_number').val(field_value);350351 if ($(this).attr("name") == "manufacturerDate" || $(this).attr("name") == "ManufactureDate")352 $(section).find('#history_manufacture_date').val(field_value);353 354 if ($(this).attr("name") == "deployedPeriod" || $(this).attr("name") == "DeploymentTimeRange")355 $(section).find('#history_deployed_period').val(field_value);356357 if ($(this).attr("name") == "FirmwareVersion")358 $(section).find('#history_firmware_version').val(field_value);359360 if ($(this).attr("name") == "CalibrationDate")361 $(section).find('#history_calibration_date').val(field_value);362363 if ($(this).attr("name") == "CalibrationLocation")364 $(section).find('#history_calibration_location').val(field_value);365 366 field_href = fix_text($(this).attr("xlink:href"));367 368 if ($(this).attr("name") == "ComponentID")369 $(section).find('#history_component_id').val(field_href);370371 if ($(this).attr("name") == "AdditionalDocumentation")372 $(section).find('#history_additional_documentation').val(field_href);373 });374 });375}376377function load_configuration(xml)378{379 var config_xml = $(xml).find("sml\\:configuration");380 var config_settings_xml = $(config_xml).find("sml\\:Settings");381 var mode_setting = $(config_settings_xml).find("sml\\:setMode");382 var section;383384 // don't need to use escape when just looking for attributes385 $('#configuration_mode_reference').val(fix_text(mode_setting.attr("ref")));386 $('#configuration_mode_value').val(fix_text(mode_setting.text()));387388 $(config_settings_xml).find("sml\\:setValue").each(function()389 {390 section = add_section("configuration", "load");391 $(section).find('#configuration_reference').val(fix_text($(this).attr("ref")));392 $(section).find('#configuration_value').val(fix_text($(this).text()));393 });394}395396function load_position(xml)397{398 var position_xml = $(xml).find("sml\\:position");399 var data_record_xml = $(position_xml).find("swe\\:DataRecord");400 var vector_xml;401 var coord_name;402 var quantity_xml;403 var position_definition;404 var uom_xml;405 var uom_code;406 var position_value;407 408 $(data_record_xml).find("swe\\:field").each(function()409 {410 vector_xml = $(this).find("swe\\:Vector");411412 $(vector_xml).find("swe\\:coordinate").each(function()413 {414 coord_name = $(this).attr("name");415 quantity_xml = $(this).find("swe\\:Quantity");416 position_definition = fix_text($(quantity_xml).attr("definition"));417 uom_xml = $(quantity_xml).find("swe\\:uom");418 uom_code = fix_text($(uom_xml).attr("code"));419 position_value = fix_text($(quantity_xml).find("swe\\:value").text());420421 if (coord_name == "Lat" || coord_name == "Latitude")422 {423 $('#latitude_definition').val(position_definition);424 $('#latitude_value').val(position_value);425 $('#latitude_uom').val(uom_code);426 }427428 if (coord_name == "Lon" || coord_name == "Longitude")429 {430 $('#longitude_definition').val(position_definition);431 $('#longitude_value').val(position_value);432 $('#longitude_uom').val(uom_code);433 }434435 if (coord_name == "Alt" || coord_name == "Altitude")436 {437 $('#vertical_datum_definition').val(position_definition);438 $('#vertical_datum_value').val(position_value);439 $('#vertical_datum_uom').val(uom_code);440 }441442 if (coord_name == "trueHeading")443 {444 $('#orientation_definition').val(position_definition);445 $('#orientation_value').val(position_value);446 $('#orientation_uom').val(uom_code);447 }448 });449 });450}451452function load_input(xml)453{454 var inputs_xml = $(xml).find("sml\\:inputs");455 var input_list_xml = $(inputs_xml).find("sml\\:InputList");456 457 var section;458 var observable_property_xml;459460 $(input_list_xml).find("sml\\:input").each(function()461 {462 section = add_section("input", "load");463 464 $(section).find('#input_name').val(fix_text($(this).attr("name")));465 466 observable_property_xml = $(this).find("sml\\:ObservableProperty");467 468 $(section).find('#input_definition' ).val(fix_text($(observable_property_xml).attr("definition")));469 $(section).find('#input_label' ).val(fix_text($(observable_property_xml).find("swe\\:label" ).text()));470 $(section).find('#input_description').val(fix_text($(observable_property_xml).find("swe\\:description").text()));471 });472}473474function load_output(xml)475{476 var outputs_xml = $(xml).find("sml\\:outputs");477 var output_list_xml = $(outputs_xml).find("sml\\:OutputList");478 var output_xml = $(output_list_xml).find("sml\\:output");479 480 $('#output_name').val(fix_text($(output_xml).attr("name")));481 482 var data_record_xml = $(output_xml).find("swe\\:DataRecord");483 484 var section;485 var quantity_xml;486 var uom_xml;487488 $(data_record_xml).find("swe\\:field").each(function()489 {490 section = add_section("output", "load");491 492 $(section).find('#output_field_name').val(fix_text($(this).attr("name")));493 494 quantity_xml = $(this).find("swe\\:Quantity");495 496 $(section).find('#output_definition').val(fix_text($(quantity_xml).attr("definition")));497 498 uom_xml = $(quantity_xml).find("swe\\:uom");499 500 $(section).find('#output_uom').val(fix_text($(uom_xml).attr("code")));501 });502}503504function load_parameters(xml)505{506 var physical_system_xml = $(xml).find("sml\\:PhysicalSystem");507 var parameters_xml = $(physical_system_xml).children("sml\\:parameters");508 var parameter_list_xml = $(parameters_xml).find("sml\\:ParameterList");509 var data_record_xml;510511 var parameter_group_name;512 var parameter_field_name;513514 var section;515 var sub_section;516 517 var child_xml;518 var field_xml;519 520 var constraint_xml;521 var allowed_values_xml;522 var interval_xml;523 var allowed_list_xml;524525 $(parameter_list_xml).find("sml\\:parameter").each(function()526 {527 section = add_section("parameter", "load");528529 parameter_group_name = fix_text($(this).attr("name"));530 $(section).find('#parameter_group_name').val(parameter_group_name);531 $(section).find('#heading_button').text(parameter_group_name);532 533 data_record_xml = $(this).find("swe\\:DataRecord");534 $(data_record_xml).find("swe\\:field").each(function()535 {536 sub_section = add_sub_section("#parameter_sub_sections_" + (parameter_group_section_counter));537 538 parameter_field_name = fix_text($(this).attr("name"));539 $(sub_section).find('#parameter_field_name').val(parameter_field_name);540 $(sub_section).find('#sub_heading_button').text(parameter_field_name);541 542 child_xml = $(this).find(":first-child");543 if (child_xml.is("swe\\:Quantity"))544 {545 $(sub_section).find('#parameter_field_type').val("quantity");546 field_xml = $(this).find("swe\\:Quantity");547 }548549 if (child_xml.is("swe\\:Count"))550 {551 $(sub_section).find('#parameter_field_type').val("count");552 field_xml = $(this).find("swe\\:Count");553 }554555 if (child_xml.is("swe\\:QuantityRange"))556 {557 $(sub_section).find('#parameter_field_type').val("quantity_range");558 field_xml = $(this).find("swe\\:QuantityRange");559 }560561 if (child_xml.is("swe\\:Category"))562 {563 $(sub_section).find('#parameter_field_type').val("category");564 field_xml = $(this).find("swe\\:Category");565 }566567 $(sub_section).find('#parameter_definition' ).val(fix_text($(field_xml).attr ("definition" )));568 $(sub_section).find('#parameter_label' ).val(fix_text($(field_xml).find ("swe\\:label" ).text()));569 $(sub_section).find('#parameter_description').val(fix_text($(field_xml).find ("swe\\:description").text()));570 $(sub_section).find('#parameter_uom' ).val(fix_text($(field_xml).find ("swe\\:uom" ).attr("code")));571 $(sub_section).find('#parameter_value' ).val(fix_text($(field_xml).children("swe\\:value" ).text()));572573 constraint_xml = $(field_xml).find("swe\\:constraint");574575 if (constraint_xml.length)576 {577 allowed_values_xml = $(constraint_xml).find("swe\\:AllowedTokens");578 if (!allowed_values_xml.length) allowed_values_xml = $(constraint_xml).find("swe\\:AllowedValues");579 580 interval_xml = $(allowed_values_xml).find("swe\\:interval");581 if (interval_xml.length)582 {583 $(sub_section).find('#parameter_interval' ).val(fix_text($(interval_xml).text()));584 $(sub_section).find('#parameter_constraint_type' ).val("interval");585 $(sub_section).find('#parameter_sub_interval_div').show();586 }587588 allowed_list_xml = $(allowed_values_xml).find("swe\\:value");589 if (allowed_list_xml.length)590 {591 $(allowed_list_xml).each(function()592 {593 sub_push_item_to_list(parameter_sub_section_counter, fix_text($(this).text()));594 });595 596 $(sub_section).find('#parameter_constraint_type').val("allowed_values");597 $(sub_section).find('#parameter_sub_allowed_values_div').show();598 }599 }600 601 else602 {603 $(sub_section).find('#parameter_constraint_type').val("none");604 }605 });606 });607}608609function load_xml_doc(xml)610{611 clear_repeats();612613 load_system_description(xml);614 load_system_identifiers(xml);615 load_system_classifiers(xml);616 load_valid_time(xml);617 load_contacts(xml);
...
domclock.js
Source:domclock.js
...36 var digit = '<div class="clock-digit"></div>';37 for (var i = 0; i < 6; i++) {38 container.append(digit);39 }40 var digits = container.find('> .clock-digit');41 digits.each(function (i, v) {42 for (var i = 0; i < 7; i++) {43 $(v).append('<div class="clock-digit-element"></div>');44 }45 });46 self.append(container);47 break;48 }49 }50 options.setDigitalValue = function (digit, value) {51 switch (value) {52 case 0:53 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');54 digit.find('.clock-digit-element:nth-child(2)').css('display', 'block');55 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');56 digit.find('.clock-digit-element:nth-child(4)').css('display', 'none');57 digit.find('.clock-digit-element:nth-child(5)').css('display', 'block');58 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');59 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');60 break;61 case 1:62 digit.find('.clock-digit-element:nth-child(1)').css('display', 'none');63 digit.find('.clock-digit-element:nth-child(2)').css('display', 'none');64 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');65 digit.find('.clock-digit-element:nth-child(4)').css('display', 'none');66 digit.find('.clock-digit-element:nth-child(5)').css('display', 'none');67 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');68 digit.find('.clock-digit-element:nth-child(7)').css('display', 'none');69 break;70 case 2:71 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');72 digit.find('.clock-digit-element:nth-child(2)').css('display', 'none');73 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');74 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');75 digit.find('.clock-digit-element:nth-child(5)').css('display', 'block');76 digit.find('.clock-digit-element:nth-child(6)').css('display', 'none');77 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');78 break;79 case 3:80 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');81 digit.find('.clock-digit-element:nth-child(2)').css('display', 'none');82 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');83 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');84 digit.find('.clock-digit-element:nth-child(5)').css('display', 'none');85 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');86 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');87 break;88 case 4:89 digit.find('.clock-digit-element:nth-child(1)').css('display', 'none');90 digit.find('.clock-digit-element:nth-child(2)').css('display', 'block');91 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');92 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');93 digit.find('.clock-digit-element:nth-child(5)').css('display', 'none');94 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');95 digit.find('.clock-digit-element:nth-child(7)').css('display', 'none');96 break;97 case 5:98 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');99 digit.find('.clock-digit-element:nth-child(2)').css('display', 'block');100 digit.find('.clock-digit-element:nth-child(3)').css('display', 'none');101 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');102 digit.find('.clock-digit-element:nth-child(5)').css('display', 'none');103 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');104 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');105 break;106 case 6:107 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');108 digit.find('.clock-digit-element:nth-child(2)').css('display', 'block');109 digit.find('.clock-digit-element:nth-child(3)').css('display', 'none');110 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');111 digit.find('.clock-digit-element:nth-child(5)').css('display', 'block');112 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');113 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');114 break;115 case 7:116 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');117 digit.find('.clock-digit-element:nth-child(2)').css('display', 'none');118 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');119 digit.find('.clock-digit-element:nth-child(4)').css('display', 'none');120 digit.find('.clock-digit-element:nth-child(5)').css('display', 'none');121 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');122 digit.find('.clock-digit-element:nth-child(7)').css('display', 'none');123 break;124 case 8:125 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');126 digit.find('.clock-digit-element:nth-child(2)').css('display', 'block');127 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');128 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');129 digit.find('.clock-digit-element:nth-child(5)').css('display', 'block');130 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');131 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');132 break;133 case 9:134 digit.find('.clock-digit-element:nth-child(1)').css('display', 'block');135 digit.find('.clock-digit-element:nth-child(2)').css('display', 'block');136 digit.find('.clock-digit-element:nth-child(3)').css('display', 'block');137 digit.find('.clock-digit-element:nth-child(4)').css('display', 'block');138 digit.find('.clock-digit-element:nth-child(5)').css('display', 'none');139 digit.find('.clock-digit-element:nth-child(6)').css('display', 'block');140 digit.find('.clock-digit-element:nth-child(7)').css('display', 'block');141 break;142 default:143 break;144 }145 };146 function init(options) {147 preload(options);148 setInterval(function () {149 var now = new Date();150 var hours = now.getHours();151 var minutes = now.getMinutes();152 var seconds = now.getSeconds();153 switch (options.type) {154 case 'standard':155 hours = (hours >= 12) ? hours - 12 : hours;156 $('.clock-big-arrow').css('transform', 'rotate(' + (-180 + 30 * hours) + 'deg)');157 $('.clock-small-arrow').css('transform', 'rotate(' + (-180 + 6 * minutes) + 'deg)');158 $('.clock-seconds-arrow').css('transform', 'rotate(' + (-180 + 6 * seconds) + 'deg)');159 break;160 case 'digit':161 var a = [];162 var hoursString = hours.toString();163 if (hoursString.length == 1) {164 hoursString = '0' + hoursString;165 }166 var minutesString = minutes.toString();167 if (minutesString.length == 1) {168 minutesString = '0' + minutesString;169 }170 var secondsString = seconds.toString();171 if (secondsString.length == 1) {172 secondsString = '0' + secondsString;173 }174 a = [hoursString[0], hoursString[1], minutesString[0], minutesString[1], secondsString[0], secondsString[1]];175 var b = self.find('.clock-digit');176 for (var i = 0; i < b.length; i++) {177 options.setDigitalValue($(b[i]), parseInt(a[i]));178 }179 }180 }, 1000);181 }182 init(options);183 };...
pdf_find_bar.js
Source:pdf_find_bar.js
1/* Copyright 2017 Mozilla Foundation2 *3 * Licensed under the Apache License, Version 2.0 (the "License");4 * you may not use this file except in compliance with the License.5 * You may obtain a copy of the License at6 *7 * http://www.apache.org/licenses/LICENSE-2.08 *9 * Unless required by applicable law or agreed to in writing, software10 * distributed under the License is distributed on an "AS IS" BASIS,11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12 * See the License for the specific language governing permissions and13 * limitations under the License.14 */15'use strict';16var uiUtils = require('./ui_utils.js');17var pdfFindController = require('./pdf_find_controller.js');18var mozL10n = uiUtils.mozL10n;19var FindStates = pdfFindController.FindStates;20var PDFFindBar = function PDFFindBarClosure() {21 function PDFFindBar(options) {22 this.opened = false;23 this.bar = options.bar || null;24 this.toggleButton = options.toggleButton || null;25 this.findField = options.findField || null;26 this.highlightAll = options.highlightAllCheckbox || null;27 this.caseSensitive = options.caseSensitiveCheckbox || null;28 this.findMsg = options.findMsg || null;29 this.findResultsCount = options.findResultsCount || null;30 this.findStatusIcon = options.findStatusIcon || null;31 this.findPreviousButton = options.findPreviousButton || null;32 this.findNextButton = options.findNextButton || null;33 this.findController = options.findController || null;34 this.eventBus = options.eventBus;35 if (this.findController === null) {36 throw new Error('PDFFindBar cannot be used without a ' + 'PDFFindController instance.');37 }38 var self = this;39 this.toggleButton.addEventListener('click', function () {40 self.toggle();41 });42 this.findField.addEventListener('input', function () {43 self.dispatchEvent('');44 });45 this.bar.addEventListener('keydown', function (evt) {46 switch (evt.keyCode) {47 case 13:48 if (evt.target === self.findField) {49 self.dispatchEvent('again', evt.shiftKey);50 }51 break;52 case 27:53 self.close();54 break;55 }56 });57 this.findPreviousButton.addEventListener('click', function () {58 self.dispatchEvent('again', true);59 });60 this.findNextButton.addEventListener('click', function () {61 self.dispatchEvent('again', false);62 });63 this.highlightAll.addEventListener('click', function () {64 self.dispatchEvent('highlightallchange');65 });66 this.caseSensitive.addEventListener('click', function () {67 self.dispatchEvent('casesensitivitychange');68 });69 this.eventBus.on('resize', this._adjustWidth.bind(this));70 }71 PDFFindBar.prototype = {72 reset: function PDFFindBar_reset() {73 this.updateUIState();74 },75 dispatchEvent: function PDFFindBar_dispatchEvent(type, findPrev) {76 this.eventBus.dispatch('find', {77 source: this,78 type: type,79 query: this.findField.value,80 caseSensitive: this.caseSensitive.checked,81 phraseSearch: true,82 highlightAll: this.highlightAll.checked,83 findPrevious: findPrev84 });85 },86 updateUIState: function PDFFindBar_updateUIState(state, previous, matchCount) {87 var notFound = false;88 var findMsg = '';89 var status = '';90 switch (state) {91 case FindStates.FIND_FOUND:92 break;93 case FindStates.FIND_PENDING:94 status = 'pending';95 break;96 case FindStates.FIND_NOTFOUND:97 findMsg = mozL10n.get('find_not_found', null, 'Phrase not found');98 notFound = true;99 break;100 case FindStates.FIND_WRAPPED:101 if (previous) {102 findMsg = mozL10n.get('find_reached_top', null, 'Reached top of document, continued from bottom');103 } else {104 findMsg = mozL10n.get('find_reached_bottom', null, 'Reached end of document, continued from top');105 }106 break;107 }108 if (notFound) {109 this.findField.classList.add('notFound');110 } else {111 this.findField.classList.remove('notFound');112 }113 this.findField.setAttribute('data-status', status);114 this.findMsg.textContent = findMsg;115 this.updateResultsCount(matchCount);116 this._adjustWidth();117 },118 updateResultsCount: function (matchCount) {119 if (!this.findResultsCount) {120 return;121 }122 if (!matchCount) {123 this.findResultsCount.classList.add('hidden');124 return;125 }126 this.findResultsCount.textContent = matchCount.toLocaleString();127 this.findResultsCount.classList.remove('hidden');128 },129 open: function PDFFindBar_open() {130 if (!this.opened) {131 this.opened = true;132 this.toggleButton.classList.add('toggled');133 this.bar.classList.remove('hidden');134 }135 this.findField.select();136 this.findField.focus();137 this._adjustWidth();138 },139 close: function PDFFindBar_close() {140 if (!this.opened) {141 return;142 }143 this.opened = false;144 this.toggleButton.classList.remove('toggled');145 this.bar.classList.add('hidden');146 this.findController.active = false;147 },148 toggle: function PDFFindBar_toggle() {149 if (this.opened) {150 this.close();151 } else {152 this.open();153 }154 },155 _adjustWidth: function PDFFindBar_adjustWidth() {156 if (!this.opened) {157 return;158 }159 this.bar.classList.remove('wrapContainers');160 var findbarHeight = this.bar.clientHeight;161 var inputContainerHeight = this.bar.firstElementChild.clientHeight;162 if (findbarHeight > inputContainerHeight) {163 this.bar.classList.add('wrapContainers');164 }165 }166 };167 return PDFFindBar;168}();...
media.js
Source:media.js
...78 });79 });80 // Enable whole row to be clicked81 $( '.find-box-inside' ).on( 'click', 'tr', function() {82 $( this ).find( '.found-radio input' ).prop( 'checked', true );83 });84 });...
LambdaTest’s Jest Testing Tutorial covers step-by-step guides around Jest with code examples to help you be proficient with the Jest framework. The Jest tutorial has chapters to help you learn right from the basics of Jest framework to code-based tutorials around testing react apps with Jest, perform snapshot testing, import ES modules and more.
|<p>it('check_object_of_Car', () => {</p><p>
expect(newCar()).toBeInstanceOf(Car);</p><p>
});</p>|
| :- |
Get 100 minutes of automation test minutes FREE!!