loading popup

12 posts, 0 answers
  1. jim
    jim avatar
    8 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2013 Link to this post

    I tried the following exactly as it is

    http://demos.kendoui.com/mobile/application/loadingpopup.html

    when i try to run it i always get the following everytime i click the button in chrome

    Uncaught ReferenceError: kendoMobileApplication is not defined

    The error is shown when i use kendoMobileApplication as shown below

    loaderElement = kendoMobileApplication.pane.loader.element.find("h1");
  2. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 21 Nov 2013 Link to this post

    Hello Jim,

    kendoMobileApplication is a variable that is only available in our demos. You can get the application object when you initialize it, like this:

    var app = new kendo.mobile.Application();
    var loaderElement = kendoMobileApplication.pane.loader.element.find("h1");


    Let me know if this helps.

    Regards,
    Kamen Bundev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. jim
    jim avatar
    8 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2013 Link to this post

    I dont understand. That's what i wrote. Maybe i am missing something. What i am doing is for example

    $(document).ready(function () {
        var app = new kendo.mobile.Application();
        var loaderElement = kendoMobileApplication.pane.loader.element.find("h1");

    ........

    but it returns the same error in chrome

    Uncaught ReferenceError: kendoMobileApplication is not defined

  5. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 21 Nov 2013 Link to this post

    Hi Jim,

    Sorry, my mistake, the code should read:
    var app = new kendo.mobile.Application();
    var loaderElement = app.pane.loader.element.find("h1");


    Additionally, there is now a special method to change the loader message, which you can use instead.

    Regards,
    Kamen Bundev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. jim
    jim avatar
    8 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2013 Link to this post

    It's ok. I forgot to say that i have already tried this because it seemed like a good idea but i get

    Uncaught TypeError: Cannot read property 'loader' of undefined
  7. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 21 Nov 2013 Link to this post

    Hello,

    If you get this error, then you application didn't initialize properly. Can you post the whole page you are trying to get running?

    Regards,
    Kamen Bundev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. jim
    jim avatar
    8 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2013 Link to this post

    I am using the default kendo app from icenium. It contains kendo+jaydata. All is working fine but i cannot get the popup to fire. The app is using the default app.js file

    (function (global) {
        var mobileSkin = "",
            app = global.app = global.app || {},
            os = kendo.support.mobileOS,
            statusBarStyle = os.ios && os.flatVersion >= 700 ? "black-translucent" : "black";

        document.addEventListener('deviceready', function () {
            navigator.splashscreen.hide();
        }, false);

        app.application = new kendo.mobile.Application(document.body, { layout: "tabstrip-layout", statusBarStyle: statusBarStyle });

        app.changeSkin = function (e) {
            if (e.sender.element.text() === "Flat") {
                e.sender.element.text("Native");
                mobileSkin = "flat";
            }
            else {
                e.sender.element.text("Flat");
                mobileSkin = "";
            }
            app.application.skin(mobileSkin);
        };
    })(window);

    i load my sripts like this

           <script src="Scripts/kendo/js/kendo.all.min.js"></script>
            <script src="Scripts/kendo/app.js"></script>
            <script src="Scripts/DataTransactions.js"></script>
            <!--Bootstrap-->
            <script src="Scripts/bootstrap.min.js"></script>
            <!--Jaydata-->
            <script src="Scripts/datajs-1.1.1.min.js"></script>
            <script src="Scripts/JayData/jaydata.min.js"></script>
            <script src="Scripts/JayData/jaydatamodules/kendo.min.js"></script>

    then in my main index.html file i use the exact same code as in example for popup. I've tried using instead of app app.application, and also tried without setting

    var app = new kendo.mobile.Application(document.body);





  9. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 21 Nov 2013 Link to this post

    Hi Jim,

    Then you don't need the initialization I've sent you. You can get the element directly like this:

    var loaderElement = app.application.pane.loader.element.find("h1");

    or use the change loading message method like this:

    app.application.changeLoadingMessage("Please wait...");

    Let me know if this helps.

    Regards,
    Kamen Bundev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. jim
    jim avatar
    8 posts
    Member since:
    Oct 2013

    Posted 22 Nov 2013 Link to this post

    Hello!

    Thanks for your help, what I did is when i am starting a transacttion for syncronizing my app is just set

     app.showLoading();

    and when it's done

    Database.saveChanges({
                                success: function (db) {
                                    app.hideLoading();
                                    alert("Sync Complete");
                                }
                            });

    So far so good but i cannot get changeLoadingMessage() to work. I tried updating the oldre kendo.mobile.min.js with the latest one but it didn't work either

  11. Kamen Bundev
    Admin
    Kamen Bundev avatar
    1532 posts

    Posted 26 Nov 2013 Link to this post

    Hello Jim,

    Can you show me a sample of how you are trying to change the loading message with the method? Thank you in advance.

    Regards,
    Kamen Bundev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  12. jim
    jim avatar
    8 posts
    Member since:
    Oct 2013

    Posted 28 Nov 2013 Link to this post

    What i was trying to do is before i show the popup, change the message. For example before

    app.showLoading();

    use wjat u told me to use in order to change the message

    app.changeLoadingMessage("Please wait...");

    but it doesn't work. So i change it by using jquery

    (".km-loader h1").text("Synchronizing");

    I was hoping i could use changeLoadingMessage()

  13. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 28 Nov 2013 Link to this post

    Hello Jim,

    The changeLoadingMessage method was added in the Q3 release (v2013.3.1119) and will not work with any of the previous Kendo UI Releases.
    Here is a small working example with Kendo UI v2013.3.1119:

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready