Announcement

Collapse
No announcement yet.

Integration of Alertify

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Integration of Alertify

    I'm using alertify (http://alertifyjs.org) for nice looking dialogs but cannot integrate it in sc for custom dialogs. It will be very nice if sc itself integrate Alertify for nice looking dialogs in their future release.
    __________________
    S. M. Rajibul Huda
    CEO & Founder
    www.efficienterp.com

  • #2
    What's exactly your problem?

    - Copy Alertify files to _lib folder of your project for example.
    - Add references to your header template*
    - Add 2 javascript buttons to your grid, and add alertify code.
    - Enjoy.

    alertify1.JPGalertify2.JPGalertify3.JPGalertify4.JPG

    * Instead using header templaet, you can integrate just in 1 application, using on your onApplicationInit something like:
    PHP Code:
    ?>
    <link rel="stylesheet" href="./_lib/alertify/css/alertify.css" />
    <script src="../_lib/alertify/js/alertify.min.js"></script>
    <?
    Last edited by Giu; 08-13-2014, 01:59 PM.
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Thank you very much Giuseppe. It works. But I want to use on php button also is that possible?
      __________________
      S. M. Rajibul Huda
      CEO & Founder
      www.efficienterp.com

      Comment


      • #4
        Originally posted by rajibul View Post
        Thank you very much Giuseppe. It works. But I want to use on php button also is that possible?
        You can try creating a Javascript method and calling it from a button using sc_ajax_javascript

        sc_ajax_javascript( 'JavascriptMethodName', array("parameter"))
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Hi,
          just to save you some headaches. sc_ajax_javascript doesn't run on php button you have to take a little detour.

          From your button call a php method like php_alertify() and from there call your javascript method like Giu suggested.

          jsb

          Comment


          • #6
            Hello,

            I will discuss your suggestion with our team.

            regards,
            Bernhard Bernsmann

            Comment


            • #7
              Dear Giuseppe and JSB thank you guys. It works like a charm!
              Thanks Bernhard Bernsmann for taking it.
              __________________
              S. M. Rajibul Huda
              CEO & Founder
              www.efficienterp.com

              Comment


              • #8
                Hi, i tried use alertify from a button php but do not worked, i did:
                Create a button php: b_php with this script: php_alertify();
                Create a method php: php_alertify with this script: sc_ajax_javascript("js_alertify");
                Create a method javascript: js_alertify with this script: alertify.alert("Hello ");

                But i cliked on button b_php and it navigates and do not shows nothing.
                Which is the error?

                Comment


                • #9
                  Hard to say. Are JS and CSS files loaded? Did you checked web console to see if some error appears?
                  /Giuseppe

                  Professional Scriptcase Services
                  Some Customers opinions

                  Comment


                  • #10
                    Yes, i tested and files are loaded.
                    Addittionality i Create a button JS: b_js with this script: js_alertify(); and it work. show dialog (files are loaded)

                    But when i cliked on button PHP b_php it navigates and do not shows nothing.

                    Comment

                    Working...
                    X