1

Windows Phone 7 で動作するphonegapアプリケーションがありますが、2 つの問題があります。

  1. 車輪が回らない。

    画像はこちら

  2. 任意のボタンをクリックすると、このように灰色の四角が表示されます。

    画像はこちら

この問題で私を助けてくれませんか?

これはコードです:

<head>
 <style type="text/css">
    .BBImagesStyle
    {
        height: 85px;
        width: 85px;
    }
 </style>
</head>
<div id="WheelDiv" style="display: block; width: 100%; height: 100%; background-color: transparent; padding: 0; margin: 0;">

 <script language="javascript" type="text/javascript">
     $(document).ready(function () {

        var ua = navigator.userAgent; //Grab USER AGENT STRING
        var checker = { webOS: ua.match(/webOS/), iphone: ua.match(/iPhone/), ipad: ua.match(/iPad/), ipod: ua.match(/iPod/), blackberry: ua.match(/BlackBerry/), android: ua.match(/Android/), symbian: ua.match(/Symbian/) };

        if (checker.blackberry) {
            setTimeout(' BB();', 500);
        } else {
            var HalfscreenHeight = $(window).height();

            $("#WheelContentDiv").height(HalfscreenHeight);
            if ($(window).height() <= 620) {

                $("#WheelContentDiv").CloudCarousel(
            {
                xPos: 165,
                yPos: 75,
                yRadius: 100,
                bringToFront: false,
                minScale: 0.5,
                clickActionOnLowerIconOnly: false

            });

                var HalfscreenHeightQua = "";
                if ($(window).height() < 600) {
                    HalfscreenHeightQua = $(window).height() * 0.05;
                } else {
                    HalfscreenHeightQua = $(window).height() * 0.15;
                }


                $("#WheelContentDiv").css("padding-top", HalfscreenHeightQua + "px");
                $("#Taw3DLogo").css("padding-top", "100px");

                document.getElementById("Wheel_MedicalServices").src = "../TawuniyaMobileWeb/Images/Wheel/Wheel_MedicalServices.png";
                document.getElementById("Wheel_Tracking").src = "../TawuniyaMobileWeb/Images/Wheel/Wheel_Tracking.png";
                document.getElementById("Wheel_ContactUS").src = "../TawuniyaMobileWeb/Images/Wheel/Wheel_ContactUs.png";
                document.getElementById("Wheel_Products").src = "../TawuniyaMobileWeb/Images/Wheel/Wheel_Products.png";
                document.getElementById("Wheel_Offers").src = "../TawuniyaMobileWeb/Images/Wheel/Wheel_Offers.png";
                document.getElementById("Wheel_Locations").src = "../TawuniyaMobileWeb/Images/Wheel/Wheel_Locations.png";



            } else {

                var h = $(window).height() / 5;
                var w = $(window).width() / 2.5;
                $("#middleLogoImg").css("width", w / 2 + "px");
                $("#Taw3DLogo").css("padding-left", w / 3.2 + "px");
                $("#WheelContentDiv").CloudCarousel(
            {
                xPos: 165,
                yPos: 65,
                yRadius: h,
                xRadius: w,
                bringToFront: false,
                minScale: 0.5,
                clickActionOnLowerIconOnly: false

            });

                var HalfscreenHeight_ = $(window).height() * 0.2;
                $("#WheelContentDiv").css("padding-top", HalfscreenHeight_ + "px");

                document.getElementById("Wheel_MedicalServices").src = "Images/Wheel/Wheel_MedicalServices@2.png";
                document.getElementById("Wheel_Tracking").src = "Images/Wheel/Wheel_Tracking@2.png";
                document.getElementById("Wheel_ContactUS").src = "Images/Wheel/Wheel_ContactUs@2.png";
                document.getElementById("Wheel_Products").src = "Images/Wheel/Wheel_Products@2.png";
                document.getElementById("Wheel_Offers").src = "Images/Wheel/Wheel_Offers@2.png";
                document.getElementById("Wheel_Locations").src = "Images/Wheel/Wheel_Locations@2.png";

                $("#Taw3DLogo").css("padding-top", "180px");
                $("#Wheel_Tawuniya").css("overflow", "hidden");
                $("#WheelContentDiv").css("overflow", "");

            }
            DisableWindowScroll();
            $("#ALLPageContent").css("background-image", "url(../TawuniyaMobileWeb/Images/HomeScreenBackground.png)");
            var leftno = Math.max(0, (($(window).width() - $("#WheelContentDiv").outerWidth()) / 2) + $(window).scrollLeft()) - 20 + "px";
            $("#WheelContentDiv").css("left", leftno);
            //  alert(450);
        }
        try {
            var isWindowsPhone = /windows phone/i.test(navigator.userAgent.toLowerCase());
            if (isWindowsPhone) {
                window.external.notify("noScroll");
                setTimeout('WP2();', 1500);
            }
        } catch (e) { alert(e); }

        ModifyHeaderOnBlur(false);
        try {
            if (navigator.geolocation) {
                //navigator.geolocation.getCurrentPosition(LocationsSuccess, LocationError);
            } else {
                alert('geolocation not supported');
            }
        } catch (e) {

        }
    });
</script>
<div id="WheelContentDiv" style="width: 330px; background-color: transparent; position: fixed;">
    <div id="Taw3DLogo" style="z-index: 1000000; padding-left: 110px;">
        <img id="middleLogoImg" src="../ePortal5Core/Libs/jQuery/Ext/professorcloud_carousel/Taw3DLogo.png"
            width="110" style="visibility: hidden;" />
    </div>
    <center>
        <img style="visibility: hidden;" id="Wheel_MedicalServices" class="cloudcarousel"
            alt="" onclick="MoveToPortalCustomize('Login_Tawuniya', this);OpenMedicalServiceWidgets='True';DisableWindowScroll();Check_remember();">
        <img style="visibility: hidden;" id="Wheel_Tracking" class="cloudcarousel" alt=""
            onclick="MoveToPortalCustomize('Tracking_PreLogin', this);">
        <img style="visibility: hidden;" id="Wheel_ContactUS" class="cloudcarousel" alt=""
            onclick="MoveToPortalCustomize('ContactUS_PreLogin', this);">
        <img style="visibility: hidden;" id="Wheel_Products" class="cloudcarousel" alt=""
            onclick="MoveToPortalCustomize('Products', this);">
        <img style="visibility: hidden;" id="Wheel_Offers" class="cloudcarousel" alt="" onclick="MoveToPortalCustomize('Promotions', this);">
        <img style="visibility: hidden;" id="Wheel_Locations" class="cloudcarousel" alt=""
            onclick="MoveToPortalCustomize('Locations', this);">
    </center>
</div>
<div id="WheelContentDivBB" style="width: 100%; background-color: transparent; height: 100%;
    display: none;">
    <center>
        <table id="BBWheelTable" style="z-index: 1000000; width: 100%; height: 100%; margin-left: 0px;">
            <tr>
                <td>
                    <img id="Wheel_MedicalServicesBB" class="BBImagesStyle" src="../TawuniyaMobileWeb/Images/Wheel_MedicalServices.png"
                        alt="" onclick="MoveToPortalCustomize('Login_Tawuniya', this);OpenMedicalServiceWidgets='True';DisableWindowScroll();Check_remember();">
                </td>
                <td>
                    <img id="Wheel_TrackingBB" class="BBImagesStyle" src="../TawuniyaMobileWeb/Images/Wheel_Tracking.png"
                        alt="" onclick="MoveToPortalCustomize('Tracking_PreLogin', this);">
                </td>
                <td>
                    <img id="Wheel_ContactUSBB" class="BBImagesStyle" src="../TawuniyaMobileWeb/Images/Wheel_ContactUs.png"
                        alt="" onclick="MoveToPortalCustomize('ContactUS_PreLogin', this);">
                </td>
            </tr>
            <tr>
                <td>
                    <img id="Wheel_ProductsBB" class="BBImagesStyle" src="../TawuniyaMobileWeb/Images/Wheel_Products.png"
                        alt="" onclick="MoveToPortalCustomize('Products', this);">
                </td>
                <td>
                    <img id="Wheel_OffersBB" class="BBImagesStyle" src="../TawuniyaMobileWeb/Images/Wheel_Offers.png"
                        alt="" onclick="MoveToPortalCustomize('Promotions', this);">
                </td>
                <td>
                    <img id="Wheel_LocationsBB" class="BBImagesStyle" src="../TawuniyaMobileWeb/Images/Wheel_Locations.png"
                        alt="" onclick="MoveToPortalCustomize('Locations', this);">
                </td>
            </tr>
        </table>
    </center>
</div>
4

1 に答える 1

1

#1の場合

カルーセルの実装についてはよくわかりませんが、mousemoveに基づいている場合(WP7ブラウザーではそのままではサポートされていません)、mousemoveイベントに特別なポリフィルを追加する最新のCordova forWP7.5バージョンを使用していることを確認してください。次のコードをindex.htmlヘッダーファイルに追加して、jsエラーがないことを確認することもできます

<script type="text/javascript">
    window.console = {
        log: function (str) { window.external.Notify(str); }
    };

    // output errors to console log
    window.onerror = function (e) {
        console.log("window.onerror ::" + JSON.stringify(e));
    };

    console.log("Installed console !");
</script>

#2の場合

WindowsPhone7ブラウザ-リンクがクリックされたときに灰色の網掛けをオフにします

https://github.com/triceam/WinPhone-NoGrayBox/

于 2013-03-18T12:39:18.293 に答える