pstuteville-scrubyt 0.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +355 -0
- data/COPYING +340 -0
- data/README.rdoc +121 -0
- data/Rakefile +120 -0
- data/VERSION +1 -0
- data/examples/README.txt +1 -0
- data/examples/events/delta/input.html +682 -0
- data/examples/events/delta/test.rb +16 -0
- data/examples/misc/auto_regex/input.html +22 -0
- data/examples/misc/auto_regex/test.rb +14 -0
- data/examples/misc/compound_example/advanced/test.rb +11 -0
- data/examples/misc/compound_example/advanced/tricky_compound.html +9 -0
- data/examples/misc/compound_example/regexp/regexp_compound.html +17 -0
- data/examples/misc/compound_example/regexp/test.rb +11 -0
- data/examples/misc/compound_example/simple/compound.html +5 -0
- data/examples/misc/compound_example/simple/test.rb +11 -0
- data/examples/misc/detail_page/detailpage.html +6 -0
- data/examples/misc/detail_page/index.html +9 -0
- data/examples/misc/detail_page/test.rb +17 -0
- data/examples/misc/google/test.rb +39 -0
- data/examples/misc/identical_examples/data_extractor_export.rb +12 -0
- data/examples/misc/identical_examples/input.html +16 -0
- data/examples/misc/identical_examples/test.rb +15 -0
- data/examples/misc/immediate_attribute_extraction/data_extractor_export.rb +10 -0
- data/examples/misc/immediate_attribute_extraction/input.html +16 -0
- data/examples/misc/immediate_attribute_extraction/test.rb +14 -0
- data/examples/misc/multiple_examples/input.html +7 -0
- data/examples/misc/multiple_examples/test.rb +22 -0
- data/examples/misc/on_click_next/next_page_link.rb +42 -0
- data/examples/misc/on_click_next/page_1.html +10 -0
- data/examples/misc/on_click_next/page_2.html +10 -0
- data/examples/misc/on_click_next/page_3.html +7 -0
- data/examples/misc/rubycorner/test.rb +29 -0
- data/examples/misc/rubyforge_login/test.rb +30 -0
- data/examples/misc/tables/ambigous_records/input.html +17 -0
- data/examples/misc/tables/ambigous_records/test.rb +37 -0
- data/examples/misc/tables/another_plain_table/input.html +15 -0
- data/examples/misc/tables/another_plain_table/test.rb +25 -0
- data/examples/misc/tables/complex_table/input.html +45 -0
- data/examples/misc/tables/complex_table/test.rb +30 -0
- data/examples/misc/tables/grab_rows/input.html +20 -0
- data/examples/misc/tables/grab_rows/test.rb +30 -0
- data/examples/misc/tables/plain_table/input.html +39 -0
- data/examples/misc/tables/plain_table/test.rb +35 -0
- data/examples/misc/tables/plain_table_morepages/2.html +38 -0
- data/examples/misc/tables/plain_table_morepages/3.html +33 -0
- data/examples/misc/tables/plain_table_morepages/input.html +40 -0
- data/examples/misc/tables/plain_table_morepages/test.rb +32 -0
- data/examples/misc/tables/plain_table_morepages_with_image/2.html +40 -0
- data/examples/misc/tables/plain_table_morepages_with_image/3.html +33 -0
- data/examples/misc/tables/plain_table_morepages_with_image/images/right_arrow.png +0 -0
- data/examples/misc/tables/plain_table_morepages_with_image/input.html +42 -0
- data/examples/misc/tables/plain_table_morepages_with_image/test.rb +32 -0
- data/examples/misc/tables/test_select_indices/input.html +46 -0
- data/examples/misc/tables/test_select_indices/test.rb +55 -0
- data/examples/misc/xpath_example_type/input.html +15 -0
- data/examples/misc/xpath_example_type/test.rb +18 -0
- data/examples/misc/yahoo_finance/test.rb +26 -0
- data/examples/social/blog_comment/test.rb +27 -0
- data/examples/social/del.icio.us/test.rb +22 -0
- data/examples/social/digg/test.rb +37 -0
- data/examples/social/dzone/test.rb +28 -0
- data/examples/social/linkedin/linkedin.rb +23 -0
- data/examples/social/reddit/test.rb +23 -0
- data/examples/tones_extractor_export.rb +23 -0
- data/examples/webshops/amazon/002-8212888-3924065.html +5311 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0130796034.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/020161622X.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0321223675.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0465067107.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0470069155.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0470081201.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0596005253.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0596101325.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0596523696.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0672328844.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0764596861.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0974514055.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0976694069.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0977616606.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0977616614.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/0977616630.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/1590597362.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/1594480060.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/1932394699.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/2841772101.jpg +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/amzn-logo-118w.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/askville-adwidget-bullet.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/askville-logo-sm-adwidget-white-bg.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/book_display_on_website-icon.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-no-ns.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-no.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-yes-ns.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/btn-inactive-yes.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/btn-no-tiny.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/btn-yes-tiny.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/buybox-button-find-gifts-a.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/c7y_badge_rn_1.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/cap-a9-3.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/drop-down-icon-small-arrow.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/endcap-a9-go-2.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/gb-open-new.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/gc-logo-popover-a.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/gift-cert-roto-pop-a.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/go-button-books.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/go-button.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/go-orange-trans.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/go_button_photo.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/logo-off.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-events-18134.js +1407 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-n2v1-57871.css +364 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-simplePopover-41153.js +749 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/n2CoreLibs-utilities-25439.js +1608 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/orange-arrow.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/orange-arrow_002.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/popover-blurb.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/powered-by-a9.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/stars-3-5.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/stars-4-0.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/stars-4-5.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/stars-5-0.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/tagline-adwidget.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/topnav-cart.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/transparent-pixel.gif +0 -0
- data/examples/webshops/amazon/002-8212888-3924065_files/transparent-pixel_002.gif +0 -0
- data/examples/webshops/amazon/test.rb +27 -0
- data/examples/webshops/amazon-online/test.rb +34 -0
- data/examples/webshops/barnes_and_noble/test.rb +32 -0
- data/examples/webshops/barnes_offline/barnes_and_noble.html +115 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/10964080.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/10999676.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/11018492.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/11656534.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/11985045.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/12052378.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/12138286.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/12533212.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/12533268.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/9583392.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/SearchProduct.css +626 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin3_gtpointup.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_aboutshipping.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_account.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_colon.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_giftreminder.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_help.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_orderstatus.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/admin_wishlist.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/bg.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/btnGoGrn.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/cleardot.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/cleardot_002.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/dot4.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/dotGold20.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/hdCantFind.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/hdSearchResults.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/hgg_tab_home_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/hgg_tab_toy_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/iframeKMP.js +172 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2.html +25 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/070226_mc_lnav_search.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/XmlUtil.js +199 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/XslStyleSheet.js +1 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/kmp_gen.css +81 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/product-preview-core.js +337 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/product-preview.css +36 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/kmp_iframe_cds2_data/productpreview.js +11 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/linePagination.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/logo_bn05.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/navbar.js +34 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/navbar_06.css +136 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/popup_open.js +116 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/qsearch3_vline_dots.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/qsearch4_search.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/qsearch_AdvSearch.jpg +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/subnav_colon.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_Bookclubs_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_bnjr_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_books_hot.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_dvd_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_giftcards_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_home_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_member_cc_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_music_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_pipe.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_textbooksonly_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_usedoop_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/tab_videogames_cold.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/toppromo3_rule.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/toppromo_fastfree05.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/vcart_btn_checkout.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/vcart_icon_cart.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/vcart_topbot_rule.gif +0 -0
- data/examples/webshops/barnes_offline/barnes_and_noble_files/visualcart_prodid.js +401 -0
- data/examples/webshops/barnes_offline/test.rb +30 -0
- data/examples/webshops/buydig/2_files/03AA1BB9089A4A6A92CF23F280D664EB.jpg +0 -0
- data/examples/webshops/buydig/2_files/1008.gif +0 -0
- data/examples/webshops/buydig/2_files/1013.gif +0 -0
- data/examples/webshops/buydig/2_files/1020.gif +0 -0
- data/examples/webshops/buydig/2_files/106CF2FB84B446518397517C3E6D5AD8.jpg +0 -0
- data/examples/webshops/buydig/2_files/13-www.gif +0 -0
- data/examples/webshops/buydig/2_files/1E9BB2E56AB145FC9D6EF952703AF476.jpg +0 -0
- data/examples/webshops/buydig/2_files/1FCDFBE85CDB4D429EC2C8CB24D20457.jpg +0 -0
- data/examples/webshops/buydig/2_files/1pix.gif +0 -0
- data/examples/webshops/buydig/2_files/2014.gif +0 -0
- data/examples/webshops/buydig/2_files/2089.gif +0 -0
- data/examples/webshops/buydig/2_files/24992_medal.gif +0 -0
- data/examples/webshops/buydig/2_files/24BBCBA1397F4DDCBBBBE8456D6D6E5B.jpg +0 -0
- data/examples/webshops/buydig/2_files/281F8A6019B140F38DFD45EB7B69B0FB.jpg +0 -0
- data/examples/webshops/buydig/2_files/2975F866CB2149F7ACBC559C8E24E304.jpg +0 -0
- data/examples/webshops/buydig/2_files/316FC9256DC9460ABC3C5ECAF6C60286.jpg +0 -0
- data/examples/webshops/buydig/2_files/50569327D8B94252B95E449AE470E505.jpg +0 -0
- data/examples/webshops/buydig/2_files/519CDAB404FA4543B76B5F281468ACBF.jpg +0 -0
- data/examples/webshops/buydig/2_files/57D6146419A647BA89C96AF0B5CAB03C.jpg +0 -0
- data/examples/webshops/buydig/2_files/58E3F988E184448B8C0A59874AE123A8.jpg +0 -0
- data/examples/webshops/buydig/2_files/5E5B10197A4E4C9B9ECCD6309DBE4C54.jpg +0 -0
- data/examples/webshops/buydig/2_files/609A249177D04065B37B9161CB0BC92D.jpg +0 -0
- data/examples/webshops/buydig/2_files/676CEE8E53C2445982E991871B4DF613.jpg +0 -0
- data/examples/webshops/buydig/2_files/712BA08FAB524A31A76ABB9E2009FF8E.jpg +0 -0
- data/examples/webshops/buydig/2_files/734BD08D7A5049339393166491D09D21.jpg +0 -0
- data/examples/webshops/buydig/2_files/751E72B7003343248497FE6905F80787.jpg +0 -0
- data/examples/webshops/buydig/2_files/76493D4F02F14EF7B5886510604C7BB4.jpg +0 -0
- data/examples/webshops/buydig/2_files/79521E251278486DB29529C60C9D012A.jpg +0 -0
- data/examples/webshops/buydig/2_files/9C9AF82AC3B54BDC8C705278B50FDFD6.jpg +0 -0
- data/examples/webshops/buydig/2_files/BC3FD8307B9948FDB7EEF156D8629C37.jpg +0 -0
- data/examples/webshops/buydig/2_files/C0DD4574765047D1836F505E69DC8AE5.jpg +0 -0
- data/examples/webshops/buydig/2_files/C143F48515274A44B04F4B3E46306BD2.jpg +0 -0
- data/examples/webshops/buydig/2_files/C6B02E88F729464699DB275D140F4563.jpg +0 -0
- data/examples/webshops/buydig/2_files/CE334D6206DB4FA9AFDF339AEF0AF50F.jpg +0 -0
- data/examples/webshops/buydig/2_files/D66AE0DC865A4021AB300ED3A0C4CD11.jpg +0 -0
- data/examples/webshops/buydig/2_files/DEA2EC2093DC474D96B651068576DAE5.jpg +0 -0
- data/examples/webshops/buydig/2_files/F547677D83844042BF13A4BE6523BB50.jpg +0 -0
- data/examples/webshops/buydig/2_files/Rbbbonlineseal.gif +0 -0
- data/examples/webshops/buydig/2_files/TopSellers_bottom.gif +0 -0
- data/examples/webshops/buydig/2_files/TopSellers_ttl.gif +0 -0
- data/examples/webshops/buydig/2_files/addToFavorites_ttl.gif +0 -0
- data/examples/webshops/buydig/2_files/banner_CorporateSales.gif +0 -0
- data/examples/webshops/buydig/2_files/banner_Shipping.gif +0 -0
- data/examples/webshops/buydig/2_files/bizratehonoree.gif +0 -0
- data/examples/webshops/buydig/2_files/btn_submit.gif +0 -0
- data/examples/webshops/buydig/2_files/checkFlash.js +110 -0
- data/examples/webshops/buydig/2_files/checkFlash2.js +109 -0
- data/examples/webshops/buydig/2_files/cnetcertified.gif +0 -0
- data/examples/webshops/buydig/2_files/credPriceGrabber.gif +0 -0
- data/examples/webshops/buydig/2_files/credShopping.gif +0 -0
- data/examples/webshops/buydig/2_files/credential_paypal.gif +0 -0
- data/examples/webshops/buydig/2_files/credentials.gif +0 -0
- data/examples/webshops/buydig/2_files/dealtime.gif +0 -0
- data/examples/webshops/buydig/2_files/dvxstyle.css +754 -0
- data/examples/webshops/buydig/2_files/footer_021306_1_v1.gif +0 -0
- data/examples/webshops/buydig/2_files/func.js +132 -0
- data/examples/webshops/buydig/2_files/getseal +1 -0
- data/examples/webshops/buydig/2_files/help.gif +0 -0
- data/examples/webshops/buydig/2_files/home.gif +0 -0
- data/examples/webshops/buydig/2_files/java.js +155 -0
- data/examples/webshops/buydig/2_files/leftnv_help.gif +0 -0
- data/examples/webshops/buydig/2_files/logo.gif +0 -0
- data/examples/webshops/buydig/2_files/logo2.gif +0 -0
- data/examples/webshops/buydig/2_files/logo3.gif +0 -0
- data/examples/webshops/buydig/2_files/main.js +227 -0
- data/examples/webshops/buydig/2_files/mastercard_secured.gif +0 -0
- data/examples/webshops/buydig/2_files/newsBox_bkg.jpg +0 -0
- data/examples/webshops/buydig/2_files/newsBox_bottom.jpg +0 -0
- data/examples/webshops/buydig/2_files/newsBox_text.gif +0 -0
- data/examples/webshops/buydig/2_files/newsBox_ttl.jpg +0 -0
- data/examples/webshops/buydig/2_files/noimage75.gif +0 -0
- data/examples/webshops/buydig/2_files/orangeleftfrmbtm.gif +0 -0
- data/examples/webshops/buydig/2_files/pixel153.gif +0 -0
- data/examples/webshops/buydig/2_files/rightnv_bottom.gif +0 -0
- data/examples/webshops/buydig/2_files/search_btn_off.gif +0 -0
- data/examples/webshops/buydig/2_files/search_c1.gif +0 -0
- data/examples/webshops/buydig/2_files/search_c2.gif +0 -0
- data/examples/webshops/buydig/2_files/search_c3.gif +0 -0
- data/examples/webshops/buydig/2_files/search_c4.gif +0 -0
- data/examples/webshops/buydig/2_files/search_down.gif +0 -0
- data/examples/webshops/buydig/2_files/search_left.gif +0 -0
- data/examples/webshops/buydig/2_files/search_right.gif +0 -0
- data/examples/webshops/buydig/2_files/search_top.gif +0 -0
- data/examples/webshops/buydig/2_files/siteLinks_bottom.gif +0 -0
- data/examples/webshops/buydig/2_files/siteLinks_bullet.gif +0 -0
- data/examples/webshops/buydig/2_files/siteLinks_ttl.gif +0 -0
- data/examples/webshops/buydig/2_files/spacer.gif +0 -0
- data/examples/webshops/buydig/2_files/style.js +45 -0
- data/examples/webshops/buydig/2_files/styles.html +33 -0
- data/examples/webshops/buydig/2_files/track_orders.jpg +0 -0
- data/examples/webshops/buydig/2_files/urchin +534 -0
- data/examples/webshops/buydig/2_files/verified_by_visa.gif +0 -0
- data/examples/webshops/buydig/2_files/welcome.gif +0 -0
- data/examples/webshops/buydig/2_files/welcome_ttl.gif +0 -0
- data/examples/webshops/buydig/2_files/yahoologo.gif +0 -0
- data/examples/webshops/buydig/input.html +1194 -0
- data/examples/webshops/buydig/test.rb +31 -0
- data/examples/webshops/ebay/test.rb +32 -0
- data/examples/webshops/finewines_offline/_finewines.html +1739 -0
- data/examples/webshops/finewines_offline/_finewines_cut.html +371 -0
- data/examples/webshops/finewines_offline/_finewines_files/011064.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/012674.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/013268.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/013300.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/013409.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/014340.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/015073.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/015255.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/015479.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/015487.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017038.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017129.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017145.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017152.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017285.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017392.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/017400.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/019778.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/019786.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/020503.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/021253.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/021279.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/021337.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/021352.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/023002.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/023135.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/023143.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/023788.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/024166.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/024182.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/024216.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/027268.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/027516.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/027862.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/028118.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/028936.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/033894.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/033902.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/033910.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/033936.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/033944.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/033951.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/034553.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/034561.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/232439.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/237834.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/268359.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/289082.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/331603.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/369686.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/420257.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/422014.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/460410.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/480533.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/556795.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/597054.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/650606.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/652628.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/653790.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/658450.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/660027.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/660951.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/684514.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/685131.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/686865.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/699330.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/703017.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/703140.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/703850.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/717306.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/900274.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/938225.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/947440.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/951319.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/967893.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/981407.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/981613.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/982421.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/985598.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/986737.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/987503.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/992800.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/VintageslogoEN.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/blanc-up.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/btn_vintages_latest.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/cc_en.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/common.js +860 -0
- data/examples/webshops/finewines_offline/_finewines_files/drink.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/drinkhold.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/ec_en.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/ev_en.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/hold.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/index-wines-features.jpg +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/indexSTYLE.css +398 -0
- data/examples/webshops/finewines_offline/_finewines_files/keyword_search.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/mm_menu.js +1 -0
- data/examples/webshops/finewines_offline/_finewines_files/nr_en.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/ontario_en.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/popup.js +81 -0
- data/examples/webshops/finewines_offline/_finewines_files/releases_nav.js +229 -0
- data/examples/webshops/finewines_offline/_finewines_files/so_en.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/spacer.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/top.gif +0 -0
- data/examples/webshops/finewines_offline/_finewines_files/urchin.js +576 -0
- data/examples/webshops/finewines_offline/_finewines_files/wom_en.gif +0 -0
- data/examples/webshops/finewines_offline/test.rb +30 -0
- data/examples/webshops/us1camera/1_files/1pix.gif +0 -0
- data/examples/webshops/us1camera/1_files/1pix_002.gif +0 -0
- data/examples/webshops/us1camera/1_files/CnetCertified.gif +0 -0
- data/examples/webshops/us1camera/1_files/CyberSource.gif +0 -0
- data/examples/webshops/us1camera/1_files/Images50.gif +0 -0
- data/examples/webshops/us1camera/1_files/Images50_002.gif +0 -0
- data/examples/webshops/us1camera/1_files/Images50_003.gif +0 -0
- data/examples/webshops/us1camera/1_files/Images50_004.gif +0 -0
- data/examples/webshops/us1camera/1_files/Images50_005.gif +0 -0
- data/examples/webshops/us1camera/1_files/Images50_006.gif +0 -0
- data/examples/webshops/us1camera/1_files/PriceGrabber.gif +0 -0
- data/examples/webshops/us1camera/1_files/QSearch.gif +0 -0
- data/examples/webshops/us1camera/1_files/ban-m.jpg +0 -0
- data/examples/webshops/us1camera/1_files/banner1.bin +0 -0
- data/examples/webshops/us1camera/1_files/banner3.bin +0 -0
- data/examples/webshops/us1camera/1_files/block1.jpg +0 -0
- data/examples/webshops/us1camera/1_files/block2.jpg +0 -0
- data/examples/webshops/us1camera/1_files/block3.jpg +0 -0
- data/examples/webshops/us1camera/1_files/block4.jpg +0 -0
- data/examples/webshops/us1camera/1_files/block5.jpg +0 -0
- data/examples/webshops/us1camera/1_files/block6.jpg +0 -0
- data/examples/webshops/us1camera/1_files/bos.js +280 -0
- data/examples/webshops/us1camera/1_files/box1.jpg +0 -0
- data/examples/webshops/us1camera/1_files/box2.jpg +0 -0
- data/examples/webshops/us1camera/1_files/box3.jpg +0 -0
- data/examples/webshops/us1camera/1_files/box4.jpg +0 -0
- data/examples/webshops/us1camera/1_files/dot.jpg +0 -0
- data/examples/webshops/us1camera/1_files/eDevix.gif +0 -0
- data/examples/webshops/us1camera/1_files/electronics1.jpg +0 -0
- data/examples/webshops/us1camera/1_files/getseal +1 -0
- data/examples/webshops/us1camera/1_files/pride.jpg +0 -0
- data/examples/webshops/us1camera/1_files/search.jpg +0 -0
- data/examples/webshops/us1camera/1_files/sidebutton.jpg +0 -0
- data/examples/webshops/us1camera/1_files/sslroilogic.js +49 -0
- data/examples/webshops/us1camera/1_files/style.css +1 -0
- data/examples/webshops/us1camera/1_files/tl.html +2 -0
- data/examples/webshops/us1camera/input.html +548 -0
- data/examples/webshops/us1camera/test.rb +37 -0
- data/lib/scrubyt/core/navigation/agents/firewatir.rb +285 -0
- data/lib/scrubyt/core/navigation/agents/mechanize.rb +315 -0
- data/lib/scrubyt/core/navigation/fetch_action.rb +63 -0
- data/lib/scrubyt/core/navigation/navigation_actions.rb +107 -0
- data/lib/scrubyt/core/scraping/compound_example.rb +30 -0
- data/lib/scrubyt/core/scraping/constraint.rb +169 -0
- data/lib/scrubyt/core/scraping/constraint_adder.rb +49 -0
- data/lib/scrubyt/core/scraping/filters/attribute_filter.rb +14 -0
- data/lib/scrubyt/core/scraping/filters/base_filter.rb +112 -0
- data/lib/scrubyt/core/scraping/filters/constant_filter.rb +9 -0
- data/lib/scrubyt/core/scraping/filters/detail_page_filter.rb +37 -0
- data/lib/scrubyt/core/scraping/filters/download_filter.rb +64 -0
- data/lib/scrubyt/core/scraping/filters/html_subtree_filter.rb +9 -0
- data/lib/scrubyt/core/scraping/filters/regexp_filter.rb +13 -0
- data/lib/scrubyt/core/scraping/filters/script_filter.rb +11 -0
- data/lib/scrubyt/core/scraping/filters/text_filter.rb +34 -0
- data/lib/scrubyt/core/scraping/filters/tree_filter.rb +138 -0
- data/lib/scrubyt/core/scraping/pattern.rb +359 -0
- data/lib/scrubyt/core/scraping/pre_filter_document.rb +14 -0
- data/lib/scrubyt/core/scraping/result_indexer.rb +90 -0
- data/lib/scrubyt/core/shared/extractor.rb +171 -0
- data/lib/scrubyt/logging.rb +154 -0
- data/lib/scrubyt/output/post_processor.rb +139 -0
- data/lib/scrubyt/output/result.rb +44 -0
- data/lib/scrubyt/output/result_dumper.rb +154 -0
- data/lib/scrubyt/output/result_node.rb +145 -0
- data/lib/scrubyt/output/scrubyt_result.rb +42 -0
- data/lib/scrubyt/utils/compound_example_lookup.rb +50 -0
- data/lib/scrubyt/utils/ruby_extensions.rb +85 -0
- data/lib/scrubyt/utils/shared_utils.rb +58 -0
- data/lib/scrubyt/utils/simple_example_lookup.rb +40 -0
- data/lib/scrubyt/utils/xpathutils.rb +202 -0
- data/lib/scrubyt.rb +53 -0
- data/pkg/scrubyt-0.4.31.gem +0 -0
- data/resources/allison/LICENSE +184 -0
- data/resources/allison/README +37 -0
- data/resources/allison/allison.css +301 -0
- data/resources/allison/allison.gif +0 -0
- data/resources/allison/allison.js +307 -0
- data/resources/allison/allison.rb +287 -0
- data/resources/allison/cache/BODY +588 -0
- data/resources/allison/cache/CLASS_INDEX +4 -0
- data/resources/allison/cache/CLASS_PAGE +1 -0
- data/resources/allison/cache/FILE_INDEX +4 -0
- data/resources/allison/cache/FILE_PAGE +1 -0
- data/resources/allison/cache/FONTS +1 -0
- data/resources/allison/cache/FR_INDEX_BODY +1 -0
- data/resources/allison/cache/IMGPATH +1 -0
- data/resources/allison/cache/INDEX +1 -0
- data/resources/allison/cache/JAVASCRIPT +307 -0
- data/resources/allison/cache/METHOD_INDEX +4 -0
- data/resources/allison/cache/METHOD_LIST +1 -0
- data/resources/allison/cache/SRC_PAGE +1 -0
- data/resources/allison/cache/STYLE +323 -0
- data/resources/allison/cache/URL +1 -0
- data/scrubyt.gemspec +609 -0
- data/test/blackbox_test.rb +60 -0
- data/test/blackbox_tests/basic/multi_root.expected.xml +8 -0
- data/test/blackbox_tests/basic/multi_root.rb +6 -0
- data/test/blackbox_tests/basic/simple.expected.xml +5 -0
- data/test/blackbox_tests/basic/simple.rb +5 -0
- data/test/blackbox_tests/basic/three_divs.html +12 -0
- data/test/blackbox_tests/detail_page/detail_page_1.html +7 -0
- data/test/blackbox_tests/detail_page/detail_page_2.html +7 -0
- data/test/blackbox_tests/detail_page/main_page_1.html +5 -0
- data/test/blackbox_tests/detail_page/main_page_2.html +6 -0
- data/test/blackbox_tests/detail_page/one_detail_page.expected.xml +7 -0
- data/test/blackbox_tests/detail_page/one_detail_page.rb +9 -0
- data/test/blackbox_tests/detail_page/two_detail_pages.expected.xml +12 -0
- data/test/blackbox_tests/detail_page/two_detail_pages.rb +9 -0
- data/test/blackbox_tests/next_page/next_page_link.expected.xml +11 -0
- data/test/blackbox_tests/next_page/next_page_link.rb +7 -0
- data/test/blackbox_tests/next_page/page_1.html +11 -0
- data/test/blackbox_tests/next_page/page_2.html +11 -0
- data/test/blackbox_tests/next_page/page_3.html +7 -0
- data/test/blackbox_tests/next_page/page_list_links.expected.xml +11 -0
- data/test/blackbox_tests/next_page/page_list_links.rb +7 -0
- data/test/blackbox_tests/next_page/page_list_links.tofix +7 -0
- data/todo/backlog.txt +73 -0
- data/todo/scenario_ideas.txt +19 -0
- metadata +637 -0
@@ -0,0 +1,749 @@
|
|
1
|
+
//! ################################################################
|
2
|
+
//! Copyright (c) 2004 Amazon.com, Inc., and its Affiliates.
|
3
|
+
//! All rights reserved.
|
4
|
+
//! Not to be reused without permission
|
5
|
+
//! $Change: 1242889 $
|
6
|
+
//! $Revision: #12 $
|
7
|
+
//! $DateTime: 2006/12/15 13:14:10 $
|
8
|
+
//! ################################################################
|
9
|
+
function n2SimplePopoverInitLibrary() { // Begin library code wrapper. Goes all the way to the bottom of the file
|
10
|
+
if (window.goN2LibMon) { goN2LibMon.beginLoad('simplePopover', 'n2CoreLibs'); }
|
11
|
+
window.N2SimplePopover=function() {
|
12
|
+
var oCfg = goN2U.getConfigurationObject('N2SimplePopover');
|
13
|
+
this.nEdgePad = oCfg.getValue('this.nEdgePad', 6); // padding from screen edge to popup (when applicable)
|
14
|
+
this.nHotPad = oCfg.getValue('this.nHotPad', 2);
|
15
|
+
this.className = 'N2SimplePopover';
|
16
|
+
this.version = '1.0.2';
|
17
|
+
this.myMouseOverCallback=n2MouseOverFeature; // put here not in initialization
|
18
|
+
this.myMouseOutCallback=n2MouseOutFeature; // put here not in initialization
|
19
|
+
this.myOnCloseCallback=n2OverlayClosed; // put here not in initialization
|
20
|
+
this.myFeatureChangedCallback=n2OverlayChanged; // put here not in initialization
|
21
|
+
this.myCustomCallbacks = [];
|
22
|
+
this.myID=null;
|
23
|
+
this.popObj=null;
|
24
|
+
this.bIsVisible = false;
|
25
|
+
this.cursorCanLeavePopover = false;
|
26
|
+
this.staticTimer = null;
|
27
|
+
this.content = null;
|
28
|
+
this.nHAdjust=0;
|
29
|
+
this.nVAdjust=0;
|
30
|
+
this.nAnimateOpen=5;
|
31
|
+
this.nAnimateClose=4;
|
32
|
+
this.sAnimateOpenStyle = 'animatedBox';
|
33
|
+
this.sAnimateCloseStyle = 'animatedBoxHollow';
|
34
|
+
this.bLADSupported = true;
|
35
|
+
this.nLADTimeoutMs = 16000; // ms to wait
|
36
|
+
this.nLADRetryMs = 250; // ms delay between checks
|
37
|
+
this.sLADKey = null; // gaTD[key] exists
|
38
|
+
this.sLADField = null; // gaTD[<sID>].field or gaTD[key].field exists
|
39
|
+
this.sLADLoadingMessage = 'Loading...<img src="'+window.gsN2ImageHost+'nav2/images/loading-bar.gif" height="9" align="absmiddle">';
|
40
|
+
this.sLADTimeoutMessage = "Unable to obtain necessary information. Please try again later";
|
41
|
+
this.bMoveHEContent = true;
|
42
|
+
}
|
43
|
+
new N2SimplePopover();
|
44
|
+
N2SimplePopover.sClickGrabberID = 'n2SPopClickGrab'; //WARNING: events.js uses N2SimplePopover.sClickGrabberID
|
45
|
+
N2SimplePopover.prototype.initialize = function (id, objectName, dataArrayName, populateMethod,
|
46
|
+
sLocateMethodID, nHAdjust, nVAdjust) {
|
47
|
+
;
|
48
|
+
this.myID=id; // ID of HTML layer element
|
49
|
+
this.objectName=objectName; // JS Object name
|
50
|
+
if(dataArrayName) {
|
51
|
+
try {
|
52
|
+
this.aDataArray = eval(dataArrayName);
|
53
|
+
}
|
54
|
+
catch(e) {
|
55
|
+
;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
this.sDataArrayName = dataArrayName; // JS Object name
|
59
|
+
;
|
60
|
+
this.createPopHTML(id, objectName, this.content);
|
61
|
+
this._createHotspotClickGrabber();
|
62
|
+
this.popObj = goN2U.getRawObject(this.myID);
|
63
|
+
this.popObjStyle = goN2U.getObject(this.myID);
|
64
|
+
;
|
65
|
+
;
|
66
|
+
this._presetLocate(sLocateMethodID, nHAdjust, nVAdjust);
|
67
|
+
};
|
68
|
+
N2SimplePopover.prototype.destructor = function() {
|
69
|
+
this.popObj = null;
|
70
|
+
this.popObjStyle = null;
|
71
|
+
}
|
72
|
+
N2SimplePopover.prototype.getObject = function () { return this.popObj; };
|
73
|
+
N2SimplePopover.prototype.simplePopoverInitialize = N2SimplePopover.prototype.initialize;
|
74
|
+
N2SimplePopover.prototype.setMouseOverCallback = function (fn) { this.myMouseOverCallback = fn; };
|
75
|
+
N2SimplePopover.prototype.setMouseOutCallback = function (fn) { this.myMouseOutCallback = fn; };
|
76
|
+
N2SimplePopover.prototype.setPopoverChangedCallback = function (fn) { this.myFeatureChangedCallback = fn; };
|
77
|
+
N2SimplePopover.prototype.setOnCloseCallback = function (fn) { this.myOnCloseCallback = fn; };
|
78
|
+
N2SimplePopover.prototype.setCallback = function (sID, fFn) { this.myCustomCallbacks[sID] = fFn; }
|
79
|
+
N2SimplePopover.prototype.getID = function() { return this.myID; };
|
80
|
+
N2SimplePopover.prototype.getObjectName = function() { return this.objectName; };
|
81
|
+
N2SimplePopover.prototype.setPopulate = function (fn) { this.populate = fn; };
|
82
|
+
N2SimplePopover.prototype.configureAnimation = function(nOpen, nClose, sOpenStyle, sCloseStyle) {
|
83
|
+
this.nAnimateOpen=nOpen;
|
84
|
+
this.nAnimateClose=nClose;
|
85
|
+
this.sAnimateOpenStyle = sOpenStyle;
|
86
|
+
this.sAnimateCloseStyle = sCloseStyle;
|
87
|
+
};
|
88
|
+
N2SimplePopover.prototype.configureLADSupport = function(b, sKey, sField, nTimeoutMs, nRetryMs,
|
89
|
+
sLoadingMsg, sTimeoutMsg) {
|
90
|
+
this.bLADSupported = b;
|
91
|
+
if (sKey) {this.sLADKey = sKey;}
|
92
|
+
if (sField) {this.sLADField = sField;}
|
93
|
+
if (nTimeoutMs) {this.nLADTimeoutMs = nTimeoutMs;}
|
94
|
+
if (nRetryMs) {this.nLADRetryMs = nRetryMs;}
|
95
|
+
if (sLoadingMsg) {this.sLADLoadingMessage = sLoadingMsg;}
|
96
|
+
if (sTimeoutMsg) {this.sLADTimeoutMessage = sTimeoutMsg;}
|
97
|
+
};
|
98
|
+
N2SimplePopover.prototype.show = function (oHotspot) {
|
99
|
+
if (goN2U.isDefined(this.myCustomCallbacks['beforeShow'])) {
|
100
|
+
;
|
101
|
+
this.myCustomCallbacks['beforeShow'](this);
|
102
|
+
}
|
103
|
+
this._showPrepare(oHotspot);
|
104
|
+
var sLinkID = oHotspot.sLinkID;
|
105
|
+
var oLNI = new N2LinkNameInfo(sLinkID);
|
106
|
+
var sID = oLNI.getID();
|
107
|
+
var sType = oLNI.getType();
|
108
|
+
var sParams = oLNI.getParams();
|
109
|
+
var sHref = oHotspot.href;
|
110
|
+
var sLinkText = oHotspot.linkText;
|
111
|
+
var re = /([^\\])'/gi;
|
112
|
+
sLinkText=sLinkText.replace(re, "$1\\'") ;
|
113
|
+
;
|
114
|
+
;
|
115
|
+
this._hideTooltip(oHotspot.oLink);
|
116
|
+
this.setCurrentThingData (null, sID, sType, sParams, sLinkID, sHref, sLinkText);
|
117
|
+
this._showPopulate(null, sID, sType, sParams, sLinkID, sHref, sLinkText);
|
118
|
+
this._showLocate(oHotspot);
|
119
|
+
this.saveCurrentElementData();
|
120
|
+
};
|
121
|
+
N2SimplePopover.prototype._showPrepare = function (oHotspot) {
|
122
|
+
this.initialMouseOver=true;
|
123
|
+
this.initialUpdate=true;
|
124
|
+
this.cursorCanLeavePopover = (oHotspot.staticFlag & 2);
|
125
|
+
if (this.makeStatic) { this.makeStatic(oHotspot.staticFlag); }
|
126
|
+
this.nLADRetries = this.nLADTimeoutMs/this.nLADRetryMs;
|
127
|
+
this.bLADLoading = false;
|
128
|
+
this.bWasLADDelayed = false;
|
129
|
+
this._blurFormElements();
|
130
|
+
if (goN2U.bIsSafari) {
|
131
|
+
goN2U.show(this.myID);
|
132
|
+
} else {
|
133
|
+
goN2U.display(this.myID, 'inline');
|
134
|
+
}
|
135
|
+
this.bIsVisible = true;
|
136
|
+
this.hookEvents();
|
137
|
+
};
|
138
|
+
N2SimplePopover.prototype._blurFormElements = function()
|
139
|
+
{
|
140
|
+
var aForms = document.getElementsByTagName('form');
|
141
|
+
for (var i=0; i<aForms.length; i++)
|
142
|
+
{
|
143
|
+
var oForm = aForms[i];
|
144
|
+
for (var j=0; j<oForm.elements.length; j++)
|
145
|
+
{
|
146
|
+
var oElem = oForm.elements[j];
|
147
|
+
if ((oElem.id && oElem.id.substring(0,4) == '_po_' ) ||
|
148
|
+
(oElem.name && oElem.name.substring(0,4) == '_po_') )
|
149
|
+
{
|
150
|
+
continue;
|
151
|
+
}
|
152
|
+
if (oElem.blur)
|
153
|
+
{
|
154
|
+
oElem.blur();
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
N2SimplePopover.prototype._showPopulate = function (sAction, sID, sType, sParams, sLinkID, sHref, sLinkText) {
|
160
|
+
this.populate(sAction, sID, sType, sParams, sLinkID, sHref, sLinkText);
|
161
|
+
};
|
162
|
+
N2SimplePopover.prototype._showLocate = function (oHotspot) {
|
163
|
+
if (goN2U.isDefined(this.displayPopoverDiv)) {
|
164
|
+
this.displayPopoverDiv(true);
|
165
|
+
}
|
166
|
+
this.updateLocation(true);
|
167
|
+
this.locate(oHotspot);
|
168
|
+
goN2U.hide(this.myID);
|
169
|
+
var eTitlebar = goN2U.getElement(this.myID + '_titleBar', true);
|
170
|
+
if (eTitlebar) {
|
171
|
+
goN2U.hide(eTitlebar); // kludge, since we don't HAVE a titlebar yet
|
172
|
+
}
|
173
|
+
this.hotLeft = oHotspot.absleft;
|
174
|
+
this.hotTop = oHotspot.abstop;
|
175
|
+
this.hotWidth = oHotspot.width;
|
176
|
+
this.hotHeight = oHotspot.height;
|
177
|
+
if (this.nAnimateOpen) {
|
178
|
+
this._displayHotspotClickGrabber(oHotspot);
|
179
|
+
var thisForClosure = this;
|
180
|
+
fnDone = function() { thisForClosure._animateOpenDone(); }
|
181
|
+
goN2U.animateBox(oHotspot.absleft, oHotspot.abstop, oHotspot.width, oHotspot.height,
|
182
|
+
this.left, this.top, this.width, this.height,
|
183
|
+
this.nAnimateOpen,
|
184
|
+
fnDone,
|
185
|
+
this.sAnimateOpenStyle );
|
186
|
+
} else {
|
187
|
+
this._animateOpenDone();
|
188
|
+
}
|
189
|
+
};
|
190
|
+
N2SimplePopover.prototype._createHotspotClickGrabber = function() {
|
191
|
+
var eGrabber = goN2U.getElement(N2SimplePopover.sClickGrabberID, true);
|
192
|
+
if (!eGrabber) {
|
193
|
+
eGrabber = document.createElement("a");
|
194
|
+
if (eGrabber) {
|
195
|
+
eGrabber.setAttribute("id", N2SimplePopover.sClickGrabberID);
|
196
|
+
goN2U.setZIndex(eGrabber, 225); //FIXME: Hack -- animateBox style uses 220
|
197
|
+
goN2U.display(eGrabber, "none");
|
198
|
+
eGrabber.style.position = "absolute";
|
199
|
+
goN2U.setBGColor(eGrabber, "transparent");
|
200
|
+
document.body.insertBefore(eGrabber,document.body.firstChild);
|
201
|
+
}
|
202
|
+
}
|
203
|
+
};
|
204
|
+
N2SimplePopover.prototype._displayHotspotClickGrabber = function(oHotspot) {
|
205
|
+
if (oHotspot.oLink && oHotspot.oLink.href) {
|
206
|
+
var eGrabber = goN2U.getElement(N2SimplePopover.sClickGrabberID, true);
|
207
|
+
if (eGrabber) {
|
208
|
+
eGrabber.setAttribute("href", oHotspot.oLink.href);
|
209
|
+
goN2U.setWidth(eGrabber, this.hotWidth);
|
210
|
+
goN2U.setHeight(eGrabber, this.hotHeight);
|
211
|
+
goN2U.shiftTo(eGrabber, this.hotLeft, this.hotTop);
|
212
|
+
goN2U.display(eGrabber, "block");
|
213
|
+
} else {
|
214
|
+
;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
};
|
218
|
+
N2SimplePopover.prototype._animateOpenDone = function() {
|
219
|
+
goN2U.show(this.myID);
|
220
|
+
var eTitlebar = goN2U.getElement(this.myID + '_titleBar', true);
|
221
|
+
if (eTitlebar) {
|
222
|
+
goN2U.show(eTitlebar);
|
223
|
+
}
|
224
|
+
if (goN2U.isDefined(this.myCustomCallbacks['afterShow'])) {
|
225
|
+
;
|
226
|
+
this.myCustomCallbacks['afterShow'](this);
|
227
|
+
}
|
228
|
+
var eGrabber = goN2U.getElement(N2SimplePopover.sClickGrabberID, true);
|
229
|
+
if (eGrabber) {
|
230
|
+
goN2U.undisplay(eGrabber);
|
231
|
+
}
|
232
|
+
};
|
233
|
+
N2SimplePopover.prototype.hide = function () {
|
234
|
+
;
|
235
|
+
if (goN2U.isDefined(this.myCustomCallbacks['beforeHide'])) {
|
236
|
+
;
|
237
|
+
if (!this.myCustomCallbacks['beforeHide'](this)) {
|
238
|
+
;
|
239
|
+
return;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
this.cursorCanLeavePopover = false;
|
243
|
+
if (goN2U.bIsSafari) {
|
244
|
+
goN2U.hide(this.myID);
|
245
|
+
} else {
|
246
|
+
goN2U.undisplay(this.myID);
|
247
|
+
}
|
248
|
+
if (this.staticTimer) {
|
249
|
+
clearTimeout(this.staticTimer);
|
250
|
+
this.staticTimer = null;
|
251
|
+
}
|
252
|
+
this.bIsVisible = false;
|
253
|
+
if (this.currentRequest && this.oUpdateManager) {
|
254
|
+
this.oUpdateManager.cancelRequest(this.currentRequest);
|
255
|
+
}
|
256
|
+
if (this.myOnCloseCallback) {
|
257
|
+
this.myOnCloseCallback(this);
|
258
|
+
}
|
259
|
+
this.unhookEvents();
|
260
|
+
this.hideEx();
|
261
|
+
if (this.bMoveHEContent && this.sCurrentContent && this.sCurrentHeID) {
|
262
|
+
var eElem = goN2U.getRawObject(this.sCurrentHeID);
|
263
|
+
if (eElem) {
|
264
|
+
eElem.innerHTML = this.sCurrentContent;
|
265
|
+
} else {
|
266
|
+
;
|
267
|
+
}
|
268
|
+
this.sCurrentContent = '';
|
269
|
+
}
|
270
|
+
if (goN2U.isDefined(this.myCustomCallbacks['afterHide'])) {
|
271
|
+
;
|
272
|
+
this.myCustomCallbacks['afterHide'](this);
|
273
|
+
}
|
274
|
+
if (this.nAnimateClose) {
|
275
|
+
goN2U.animateBox(this.left, this.top, this.width, this.height,
|
276
|
+
this.hotLeft, this.hotTop, this.hotWidth, 1,
|
277
|
+
this.nAnimateClose,
|
278
|
+
null, this.sAnimateCloseStyle );
|
279
|
+
}
|
280
|
+
};
|
281
|
+
N2SimplePopover.prototype.hideEx = function() {};
|
282
|
+
N2SimplePopover.prototype.setCurrentThingData = function (action, id, type, params, linkID, href, linkText) {
|
283
|
+
this.action = action;
|
284
|
+
this.thingID = id;
|
285
|
+
this.thingType = type;
|
286
|
+
this.thingParams = params;
|
287
|
+
this.linkID = linkID;
|
288
|
+
this.linkHref = href;
|
289
|
+
this.linkText = linkText;
|
290
|
+
this.sReftagHead='';
|
291
|
+
this.sReftagTail='';
|
292
|
+
if (href) {
|
293
|
+
;
|
294
|
+
var re = 'ref=([^_]*_[^_]*)(_[^\/]*)?';
|
295
|
+
var aResult = href.match(re);
|
296
|
+
if (aResult) {
|
297
|
+
;
|
298
|
+
this.sReftagHead = aResult[1];
|
299
|
+
this.sReftagTail = aResult[2];
|
300
|
+
}
|
301
|
+
}
|
302
|
+
};
|
303
|
+
N2SimplePopover.prototype.getReftagHead = function() { return this.sReftagHead; };
|
304
|
+
N2SimplePopover.prototype.getReftagTail = function() { return this.sReftagTail; };
|
305
|
+
N2SimplePopover.prototype.setContent = function (sHtml) {
|
306
|
+
sHtml = this.replacePlaceholders(sHtml);
|
307
|
+
this.popObj = goN2U.getRawObject(this.myID);
|
308
|
+
if (this.popObj === null) {
|
309
|
+
this.content = sHtml;
|
310
|
+
} else {
|
311
|
+
this.popObj.innerHTML = sHtml;
|
312
|
+
this.updateLocation(true);
|
313
|
+
}
|
314
|
+
};
|
315
|
+
N2SimplePopover.prototype.getContent = function () {
|
316
|
+
var sHtml;
|
317
|
+
this.popObj = goN2U.getRawObject(this.myID);
|
318
|
+
if (this.popObj === null) {
|
319
|
+
sHtml = this.content;
|
320
|
+
} else {
|
321
|
+
sHtml = this.popObj.innerHTML;
|
322
|
+
}
|
323
|
+
return sHtml;
|
324
|
+
};
|
325
|
+
N2SimplePopover.prototype.replacePlaceholders = function (sHtml) {
|
326
|
+
;
|
327
|
+
if (goN2U.isUndefOrNull(sHtml)) {
|
328
|
+
return '';
|
329
|
+
}
|
330
|
+
if ( sHtml.indexOf('{') == -1) { return sHtml; }
|
331
|
+
sHtml = sHtml.replace(/{REFTAG_HEAD}/g, this.getReftagHead());
|
332
|
+
sHtml = sHtml.replace(/{REFTAG_TAIL}/g, this.getReftagTail());
|
333
|
+
if (this.oUpdateManager) {
|
334
|
+
sHtml = sHtml.replace(/{SESSION_ID}/g, this.oUpdateManager.sessionID ? this.oUpdateManager.sessionID : '');
|
335
|
+
}
|
336
|
+
sHtml = sHtml.replace(/{POPOVER_ID}/g, this.myID);
|
337
|
+
return sHtml.replace(/{POPOVER_OBJECT}/g, this.objectName);
|
338
|
+
};
|
339
|
+
N2SimplePopover.prototype.getDataArray = function() { return this.aDataArray; };
|
340
|
+
N2SimplePopover.prototype.getPopoverElementID = function() { return this.myID; };
|
341
|
+
N2SimplePopover.prototype.isActive = function() { return this.bIsVisible; }; // we assume for now that if its visible, it IS active.
|
342
|
+
N2SimplePopover.prototype.isVisible = function() { return this.bIsVisible; };
|
343
|
+
N2SimplePopover.prototype.isStatic = function() { return this.cursorCanLeavePopover; };
|
344
|
+
N2SimplePopover.prototype.locateAt = function (sLocateMethodID, nHAdjust, nVAdjust) {
|
345
|
+
this._presetLocate(sLocateMethodID, nHAdjust, nVAdjust);
|
346
|
+
}
|
347
|
+
N2SimplePopover.prototype._presetLocate = function (sLocateMethodID, nHAdjust, nVAdjust) {
|
348
|
+
this.nHAdjust = nHAdjust ? nHAdjust : 0;
|
349
|
+
this.nVAdjust = nVAdjust ? nVAdjust : 0;
|
350
|
+
if (goN2U.isUndefined(sLocateMethodID) || sLocateMethodID == 'auto') {
|
351
|
+
this.locate = this._locateLinkAdjacent;
|
352
|
+
} else if (sLocateMethodID == 'window_center' ) {
|
353
|
+
this.locate = this._locateWindowCenter;
|
354
|
+
} else if (sLocateMethodID == 'below_above' ) {
|
355
|
+
this.locate = this._locateLinkBelowAbove;
|
356
|
+
} else if (sLocateMethodID == 'topleft' ) {
|
357
|
+
this.locate = this._locateLinkTopLeft;
|
358
|
+
} else if (sLocateMethodID == 'left' ) {
|
359
|
+
this.locate = this._locateLinkLeft;
|
360
|
+
} else if (sLocateMethodID == 'right' ) {
|
361
|
+
this.locate = this._locateLinkRight;
|
362
|
+
} else if (sLocateMethodID == 'above' ) {
|
363
|
+
this.locate = this._locateAboveLink;
|
364
|
+
} else if (sLocateMethodID == 'below' ) {
|
365
|
+
this.locate = this._locateBelowLink;
|
366
|
+
} else {
|
367
|
+
;
|
368
|
+
this.locate = this._locateLinkAdjacent;
|
369
|
+
}
|
370
|
+
return this.locate;
|
371
|
+
};
|
372
|
+
N2SimplePopover.prototype._locateLinkAdjacent = function (oHotspot) {
|
373
|
+
var popX;
|
374
|
+
var popY;
|
375
|
+
var bOverlapsHotspot = false;
|
376
|
+
if (oHotspot.availLeft < oHotspot.availRight ) {
|
377
|
+
this.expandsH ='r';
|
378
|
+
} else {
|
379
|
+
this.expandsH ='l';
|
380
|
+
}
|
381
|
+
if (this.expandsH == 'l') {
|
382
|
+
if (this.width + this.nHotPad < oHotspot.availLeft) {
|
383
|
+
popX = oHotspot.absleft - this.width - this.nHotPad;
|
384
|
+
} else {
|
385
|
+
popX = this.nEdgePad;
|
386
|
+
}
|
387
|
+
} else {
|
388
|
+
if (oHotspot.availRight > this.width) {
|
389
|
+
popX = oHotspot.absleft + oHotspot.width + this.nHotPad;
|
390
|
+
} else {
|
391
|
+
var nWindowWidth = goN2U.getInsideWindowWidth();
|
392
|
+
var nWindowRight = goN2U.getScrollLeft() + nWindowWidth;
|
393
|
+
popX = nWindowRight - this.width - 6;
|
394
|
+
bOverlapsHotspot = true;
|
395
|
+
}
|
396
|
+
}
|
397
|
+
var totalAvailFromLinkTop = oHotspot.height + oHotspot.availUnder;
|
398
|
+
if (bOverlapsHotspot && this.height <= oHotspot.availUnder) {
|
399
|
+
popY = oHotspot.abstop + oHotspot.height + 2;
|
400
|
+
} else if (this.height <= totalAvailFromLinkTop) {
|
401
|
+
popY = oHotspot.availAbove > 0 ? oHotspot.abstop : oHotspot.abstop - oHotspot.availAbove;
|
402
|
+
} else {
|
403
|
+
popY = oHotspot.abstop - (this.height-totalAvailFromLinkTop+this.nEdgePad);
|
404
|
+
}
|
405
|
+
this._doLocate(popX, popY);
|
406
|
+
};
|
407
|
+
N2SimplePopover.prototype._doLocate = function (popX, popY) {
|
408
|
+
goN2U.shiftTo(this.myID, popX, popY);
|
409
|
+
this.updateLocation();
|
410
|
+
this.initialLeft = this.left;
|
411
|
+
this.initialTop = this.top;
|
412
|
+
;
|
413
|
+
};
|
414
|
+
N2SimplePopover.prototype._locateLinkTopLeft = function (oHotspot) {
|
415
|
+
var popX = oHotspot.absleft;
|
416
|
+
var popY = oHotspot.abstop;
|
417
|
+
var nHAdj = this.nHAdjust;
|
418
|
+
var nVAdj = this.nVAdjust;
|
419
|
+
if (nVAdj == 'c') {
|
420
|
+
nVAdj = parseInt(oHotspot.height/2);
|
421
|
+
}
|
422
|
+
if (nHAdj == 'c') {
|
423
|
+
nHAdj = parseInt(oHotspot.width/2);
|
424
|
+
}
|
425
|
+
this._doLocate (popX + nHAdj, popY + nVAdj);
|
426
|
+
};
|
427
|
+
N2SimplePopover.prototype._locateLinkRight = function (oHotspot) {
|
428
|
+
var popX = oHotspot.absleft + oHotspot.width;
|
429
|
+
var popY = oHotspot.abstop;
|
430
|
+
var nHAdj = this.nHAdjust;
|
431
|
+
var nVAdj = this.nVAdjust;
|
432
|
+
if (nVAdj == 'c') {
|
433
|
+
nVAdj = parseInt(oHotspot.height/2 - this.height/2);
|
434
|
+
} else if (nVAdj == 'b') {
|
435
|
+
nVAdj = oHotspot.height-this.height;
|
436
|
+
}
|
437
|
+
this._doLocate (popX + nHAdj, popY + nVAdj);
|
438
|
+
};
|
439
|
+
N2SimplePopover.prototype._locateLinkLeft = function (oHotspot) {
|
440
|
+
var popX = oHotspot.absleft - this.width;
|
441
|
+
var popY = oHotspot.abstop;
|
442
|
+
var nHAdj = this.nHAdjust;
|
443
|
+
var nVAdj = this.nVAdjust;
|
444
|
+
if (nVAdj == 'c') {
|
445
|
+
nVAdj = parseInt(oHotspot.height/2 - this.height/2);
|
446
|
+
} else if (nVAdj == 'b') {
|
447
|
+
nVAdj = oHotspot.height-this.height;
|
448
|
+
}
|
449
|
+
this._doLocate (popX + nHAdj, Math.max(popY + nVAdj, 4));
|
450
|
+
};
|
451
|
+
N2SimplePopover.prototype._locateBelowLink = function (oHotspot) {
|
452
|
+
var popX = oHotspot.absleft;
|
453
|
+
var popY = oHotspot.abstop + oHotspot.height;
|
454
|
+
var nHAdj = this.nHAdjust;
|
455
|
+
var nVAdj = this.nVAdjust;
|
456
|
+
if (nHAdj == 'c') {
|
457
|
+
nHAdj = parseInt(oHotspot.width/2 - this.width/2);
|
458
|
+
} else if (nHAdj == 'r') {
|
459
|
+
nHAdj = oHotspot.width-this.width;
|
460
|
+
}
|
461
|
+
this._doLocate (Math.max(popX + nHAdj, 4), popY + nVAdj);
|
462
|
+
};
|
463
|
+
N2SimplePopover.prototype._locateAboveLink = function (oHotspot) {
|
464
|
+
var popX = oHotspot.absleft;
|
465
|
+
var popY = oHotspot.abstop - this.height;
|
466
|
+
var nHAdj = this.nHAdjust;
|
467
|
+
var nVAdj = this.nVAdjust;
|
468
|
+
if (nHAdj == 'c') {
|
469
|
+
nHAdj = parseInt(oHotspot.width/2 - this.width/2);
|
470
|
+
} else if (nHAdj == 'r') {
|
471
|
+
nHAdj = oHotspot.width-this.width;
|
472
|
+
}
|
473
|
+
this._doLocate (Math.max(popX + nHAdj, 4), popY + nVAdj);
|
474
|
+
};
|
475
|
+
N2SimplePopover.prototype._locateLinkBelowAbove = function (oHotspot) {
|
476
|
+
var popX;
|
477
|
+
var popY;
|
478
|
+
var nXOffset = 100;
|
479
|
+
var nXOffsetL = 20;
|
480
|
+
var totalAvailFromLinkLeft = oHotspot.availRight + oHotspot.width;
|
481
|
+
if (this.width < (totalAvailFromLinkLeft - nXOffset) ) {
|
482
|
+
this.expandsH ='r';
|
483
|
+
} else {
|
484
|
+
this.expandsH ='l';
|
485
|
+
}
|
486
|
+
this.availDown = oHotspot.availUnder + oHotspot.height;
|
487
|
+
this.availUp = oHotspot.availAbove;
|
488
|
+
if (this.availUp < this.availDown - this.height ) {
|
489
|
+
this.expandsV = 'd';
|
490
|
+
} else {
|
491
|
+
this.expandsV = 'u';
|
492
|
+
}
|
493
|
+
if (this.expandsH == 'l') {
|
494
|
+
if (this.width + this.nHotPad < oHotspot.availLeft) {
|
495
|
+
popX = oHotspot.absleft - this.width - this.nHotPad + nXOffsetL;
|
496
|
+
} else {
|
497
|
+
popX = this.nEdgePad;
|
498
|
+
}
|
499
|
+
} else {
|
500
|
+
if (oHotspot.width >120) {
|
501
|
+
popX = oHotspot.absleft + nXOffset;
|
502
|
+
} else {
|
503
|
+
popX = oHotspot.absleft + oHotspot.width - nXOffsetL;
|
504
|
+
}
|
505
|
+
}
|
506
|
+
var totalAvailFromLinkTop = oHotspot.height + oHotspot.availUnder;
|
507
|
+
if (this.height <= oHotspot.availUnder) {
|
508
|
+
popY = oHotspot.abstop + oHotspot.height + this.nHotPad;
|
509
|
+
} else {
|
510
|
+
popY = oHotspot.abstop - (this.height-totalAvailFromLinkTop+this.nEdgePad);
|
511
|
+
if (oHotspot.width < 120) {
|
512
|
+
if (this.expandsH == 'r') {
|
513
|
+
popX = oHotspot.absleft + oHotspot.width + this.nHotPad;
|
514
|
+
} else {
|
515
|
+
popX = oHotspot.absleft - this.width - this.nHotPad;
|
516
|
+
}
|
517
|
+
}
|
518
|
+
}
|
519
|
+
this._doLocate(popX, popY);
|
520
|
+
};
|
521
|
+
N2SimplePopover.prototype._locateWindowCenter = function (oHotspot) {
|
522
|
+
var popX = Math.max(goN2U.getScrollLeft()+((goN2U.getInsideWindowWidth()-this.width)/2), this.nEdgePad);
|
523
|
+
var popY = Math.max(goN2U.getScrollTop()+((goN2U.getInsideWindowHeight()-this.height)/2), this.nEdgePad);
|
524
|
+
this._doLocate(popX, popY);
|
525
|
+
};
|
526
|
+
N2SimplePopover.prototype.createPopHTML = function (id, objectID, content) {
|
527
|
+
var gp = '';
|
528
|
+
gp+='<span id="' + id + '" class="n2Pop" style="display:inline; visibility:hidden; left:0px; top:0px;"';
|
529
|
+
gp+='onMouseOver="' + objectID + '.mouseOver();" onMouseOut="' + objectID + '.mouseOut(event);"';
|
530
|
+
gp+='onMouseMove="' + objectID + '.mouseMove(event);">';
|
531
|
+
gp+='<span class="n2">';
|
532
|
+
if (content) {
|
533
|
+
gp+=content;
|
534
|
+
} else {
|
535
|
+
gp+='-- CONTENT GOES HERE (simple)--';
|
536
|
+
}
|
537
|
+
gp+='</span>';
|
538
|
+
gp+='</span>';
|
539
|
+
var spanEl = document.createElement("span");
|
540
|
+
spanEl.innerHTML = gp;
|
541
|
+
spanEl.id = id +"_OuterX";
|
542
|
+
document.body.insertBefore(spanEl,document.body.firstChild);
|
543
|
+
};
|
544
|
+
N2SimplePopover.prototype.saveCurrentElementData = function() { };
|
545
|
+
N2SimplePopover.prototype._defaultPopulate = function(sAction, sID, sType, sParams, sLinkID, sHref, sLinkText) {
|
546
|
+
;
|
547
|
+
if (this.bLADSupported) {
|
548
|
+
if (!this.isDataAvailable(sAction, sID, sType, sParams, sLinkID, sHref, sLinkText)) {
|
549
|
+
return false;
|
550
|
+
}
|
551
|
+
}
|
552
|
+
switch (sType) {
|
553
|
+
case 'he': // id of an HTML element
|
554
|
+
this.populateUsingElementContents(sID);
|
555
|
+
break;
|
556
|
+
case 'ak': // array key
|
557
|
+
this.populateUsingArrayContents(sID);
|
558
|
+
break;
|
559
|
+
case 'a':
|
560
|
+
case 'am':
|
561
|
+
case 'n':
|
562
|
+
case 's':
|
563
|
+
case 'l':
|
564
|
+
break;
|
565
|
+
default:
|
566
|
+
;
|
567
|
+
}
|
568
|
+
if (this.bLADLoading) {
|
569
|
+
this.sizeOrPositionChanged();
|
570
|
+
}
|
571
|
+
return true;
|
572
|
+
};
|
573
|
+
N2SimplePopover.prototype.populate = N2SimplePopover.prototype._defaultPopulate;
|
574
|
+
N2SimplePopover.prototype.populateUsingElementContents = function(id, type, linkID, href, linkText) {
|
575
|
+
;
|
576
|
+
;
|
577
|
+
var eElem = goN2U.getRawObject(id);
|
578
|
+
if (eElem) {
|
579
|
+
var tempHTML = eElem.innerHTML;
|
580
|
+
if (this.bMoveHEContent) {
|
581
|
+
this.sCurrentContent = eElem.innerHTML;
|
582
|
+
this.sCurrentHeID = id;
|
583
|
+
eElem.innerHTML = '';
|
584
|
+
}
|
585
|
+
this.setContent(tempHTML);
|
586
|
+
} else {
|
587
|
+
;
|
588
|
+
}
|
589
|
+
};
|
590
|
+
N2SimplePopover.prototype.populateUsingArrayContents = function(id, type, linkID, href, linkText) {
|
591
|
+
;
|
592
|
+
;
|
593
|
+
if (goN2U.isDefined(this.aDataArray) ) {
|
594
|
+
if (goN2U.isDefined(this.aDataArray[id])) {
|
595
|
+
this.setContent(this.aDataArray[id]);
|
596
|
+
} else {
|
597
|
+
;
|
598
|
+
}
|
599
|
+
}
|
600
|
+
else {
|
601
|
+
;
|
602
|
+
}
|
603
|
+
};
|
604
|
+
N2SimplePopover.prototype.isDataAvailable = function(sAction, sID, sType, sParams, sLinkID, sHref, sLinkText) {
|
605
|
+
;
|
606
|
+
;
|
607
|
+
if ( this._isDataAvailable (sAction, sID, sType, sParams, sLinkID,
|
608
|
+
this.sLADKey, this.sLADField) ) {
|
609
|
+
return true;
|
610
|
+
} else {
|
611
|
+
if (--this.nLADRetries && this.isVisible()) {
|
612
|
+
if (!this.bLADLoading) {
|
613
|
+
this.setContent(this.sLADLoadingMessage);
|
614
|
+
this.bLADLoading = true;
|
615
|
+
}
|
616
|
+
setTimeout (new Function("", this.objectName + ".populate(" +
|
617
|
+
"'" + (sAction ? sAction : 'null') + "'," +
|
618
|
+
"'" + (sID ? sID : 'null') + "'," +
|
619
|
+
"'" + (sType ? sType : 'null') + "'," +
|
620
|
+
"'" + (sParams ? sParams : 'null') + "'," +
|
621
|
+
"'" + (sLinkID ? sLinkID : 'null') + "'," +
|
622
|
+
"'" + (sHref ? sHref : 'null') + "'," +
|
623
|
+
"'" + (sLinkText ? sLinkText : 'null') + "'" +
|
624
|
+
");"),
|
625
|
+
this.nLADRetryMs);
|
626
|
+
} else {
|
627
|
+
;
|
628
|
+
this.setContent(this.sLADTimeoutMessage);
|
629
|
+
}
|
630
|
+
return false;
|
631
|
+
}
|
632
|
+
};
|
633
|
+
N2SimplePopover.prototype._isDataAvailable = function(sAction, sID, sType, sParams, sLinkID,
|
634
|
+
sKey, sField) {
|
635
|
+
;
|
636
|
+
;
|
637
|
+
var bIsAvailable = true;
|
638
|
+
switch(sType) {
|
639
|
+
case 'he': // id of an HTML element
|
640
|
+
if ( sKey && goN2U.getRawObject(sKey)=== null ) {
|
641
|
+
bIsAvailable = false;
|
642
|
+
} else if ( goN2U.getRawObject(sID)=== null ) {
|
643
|
+
bIsAvailable = false;
|
644
|
+
}
|
645
|
+
break;
|
646
|
+
case 'ak': // array key
|
647
|
+
if (this.aDataArray) {
|
648
|
+
if ( sKey && goN2U.isUndefined(this.aDataArray[sKey]) ) {
|
649
|
+
bIsAvailable = false;
|
650
|
+
} else if ( goN2U.isUndefined(this.aDataArray[sID]) ) {
|
651
|
+
bIsAvailable = false;
|
652
|
+
}
|
653
|
+
}
|
654
|
+
break;
|
655
|
+
case 'a': // key is an ASIN (which means that the aDataArray should usually point ot gaTD)
|
656
|
+
case 'am':
|
657
|
+
var sTDKey = sType+sID;
|
658
|
+
if (this.aDataArray) {
|
659
|
+
if ( // an entry for this key
|
660
|
+
goN2U.isUndefined(this.aDataArray[sTDKey]) ||
|
661
|
+
( sField && goN2U.isUndefined(this.aDataArray[sTDKey][sField]) ) ||
|
662
|
+
( sKey && goN2U.isUndefined(this.aDataArray[sKey]) ) ||
|
663
|
+
( sKey && sField && goN2U.isUndefined(this.aDataArray[sKey][sField]) )) {
|
664
|
+
bIsAvailable = false;
|
665
|
+
}
|
666
|
+
}
|
667
|
+
break;
|
668
|
+
}
|
669
|
+
;
|
670
|
+
return bIsAvailable;
|
671
|
+
};
|
672
|
+
N2SimplePopover.prototype.sizeOrPositionChanged = function () {
|
673
|
+
if (this.myFeatureChangedCallback) {
|
674
|
+
this.myFeatureChangedCallback(this);
|
675
|
+
}
|
676
|
+
};
|
677
|
+
N2SimplePopover.prototype.updateLocation = function (flag){
|
678
|
+
var po = this.popObj;
|
679
|
+
this.left = goN2U.getObjectLeft(po);
|
680
|
+
this.top = goN2U.getObjectTop(po);
|
681
|
+
this.width = goN2U.getObjectWidth(po);
|
682
|
+
this.height = goN2U.getObjectHeight(po);
|
683
|
+
this.right = this.left + this.width;
|
684
|
+
this.bottom = this.top + this.height;
|
685
|
+
};
|
686
|
+
N2SimplePopover.prototype.mouseOver = function () {
|
687
|
+
if (this.initialMouseOver) {
|
688
|
+
;
|
689
|
+
this.initialMouseOver = false;
|
690
|
+
var ret = true;
|
691
|
+
if (this.myMouseOverCallback) {
|
692
|
+
;
|
693
|
+
ret = this.myMouseOverCallback(this);
|
694
|
+
}
|
695
|
+
if (ret) {
|
696
|
+
}
|
697
|
+
}
|
698
|
+
};
|
699
|
+
N2SimplePopover.prototype.mouseMove = function (evt) {
|
700
|
+
if (this.initialMouseOver) {
|
701
|
+
this.mouseOver();
|
702
|
+
}
|
703
|
+
};
|
704
|
+
N2SimplePopover.prototype.mouseOut = function (evt) {
|
705
|
+
var inPop = true;
|
706
|
+
evt = (evt) ? evt : ((window.event) ? window.event : null);
|
707
|
+
if (evt) {
|
708
|
+
if (goN2U.bIsIE) {
|
709
|
+
inPop = goN2U.elementIsContainedBy(evt.toElement, this.popObj);
|
710
|
+
} else {
|
711
|
+
var x = evt.pageX;
|
712
|
+
var y = evt.pageY;
|
713
|
+
var po = this.popObj;
|
714
|
+
var left = goN2U.getPageElementLeft(po);
|
715
|
+
var top = goN2U.getPageElementTop(po);
|
716
|
+
if ( (x <= left) || ( y <= top+1) ||
|
717
|
+
(x > left + this.width) ||
|
718
|
+
(y > top + this.height) ) {
|
719
|
+
inPop = false;
|
720
|
+
}
|
721
|
+
}
|
722
|
+
}
|
723
|
+
if (!inPop && !this.cursorCanLeavePopover && !this.buttonIsDown) {
|
724
|
+
;
|
725
|
+
this.initialMouseOver = true;
|
726
|
+
var ret = true;
|
727
|
+
if (this.myMouseOutCallback) {
|
728
|
+
;
|
729
|
+
ret = this.myMouseOutCallback(this);
|
730
|
+
;
|
731
|
+
}
|
732
|
+
if (ret) {
|
733
|
+
;
|
734
|
+
this.hide();
|
735
|
+
}
|
736
|
+
}
|
737
|
+
};
|
738
|
+
N2SimplePopover.prototype._hideTooltip = function (oLink) {
|
739
|
+
var firstChild = oLink.firstChild;
|
740
|
+
if (firstChild && firstChild.alt) {
|
741
|
+
this.sImgAlt = firstChild.alt;
|
742
|
+
firstChild.alt = '';
|
743
|
+
}
|
744
|
+
};
|
745
|
+
N2SimplePopover.prototype.hookEvents = function () { };
|
746
|
+
N2SimplePopover.prototype.unhookEvents = function () { };
|
747
|
+
if (window.goN2LibMon) { goN2LibMon.endLoad('simplePopover'); }
|
748
|
+
} // END library code wrapper
|
749
|
+
n2RunIfLoaded("events", n2SimplePopoverInitLibrary, "simplepopover");
|