We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30562
    • 99 Posts
    Hi friends!

    There was an offer to unify messages which are generated in modal dialogues in client browsers. For example, similar dialogues arise at erratic input of a login or the password at authorisation etc.

    It would be excellent, if all calls of appropriate JavaScript-functions (alert, prompt...), have been substituted on call corresponding to function of client browser layer MODx API.

    Such separation of calls of dialogues from their concrete implementation (for example, by means of library scripts moodalbox12, modalbox16 and others) will allow the designer to change easily both libraries for displaying and design of dialog boxes.

    With hope!
      • 25663 MODX Staff
      • 12,272 Posts
      Please feel free to add this to the bugtracker as a feature request so it doesn’t get lost. Even better, submit it with a patch and it’ll likely be handled much much faster. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 30562
        • 99 Posts
        Quote from: rthrash at Feb 21, 2008, 08:43 AM

        Please feel free to add this to the bugtracker as a feature request so it doesn’t get lost...
        Prompt, please, the link to bugtracker. I’m the newbie.
          • 22303 MODX Staff
          • 10,725 Posts
          This is already done for the next release using ExtJS and some custom MODx extensions to it. No bug report is necessary.
            • 30562
            • 99 Posts
            Hi all!

            Has tried to fulfil substitution “alert” on a similar method “Modalbox.alert”.
            ( http://www.wildbit.com/labs/modalbox/ )

            In a method has installed a substitution property “overrideAlert”
            Modalbox. Methods = {
            overrideAlert: true, …

            I insert libraries
            <script type = "text/javascript" src = "manager/media/script/modalbox/prototype.js"> </script>
            <script type = "text/javascript" src = "manager/media/script/modalbox/scriptaculous.js? load=builder, effects"> </script>
            <script type = "text/javascript" src = "manager/media/script/modalbox/modalbox.js"> </script>
               <link rel = "stylesheet" href = "manager/media/script/modalbox/modalbox.css" type = "text/css"/>

            into html code.

            In a simple test html-file, for example line
               … <li> <a href = "#" title = "Alert Test" onclick ='window.setTimeout ("alert (\" In the entered login or the password an error! \")", 10); '> TEST </a> </li> …


            works correctly. Substitution of “alert” on a similar method “Modalbox.alert” is made. OK!

            But the same substitution does not work in real template.

            In the bottom of a window of browser IE7 the message is produced
            String:  56
            Character: 3
            Error: the Object does not support this property or a method 
            (translation from Russian).
            This error to me is absolutely not clear. It shows on lines:
              <ul>
               <li><a href="#" onclick="qe.open('1');return false;" title="Редактировать RTE for the new blog entries">blogContent</a></li><li><a href="#" onclick="qe.open('4');return false;" title="Редактировать Comma delimited tags for the current document">Tags-comma</a></li><li><a href="#" onclick="qe.open('3');return false;" title="Редактировать Space delimited tags for the current document">Tags</a></li><li><a href="#" onclick="qe.open('2');return false;" title="Редактировать Conditional name for the Login menu item">loginName</a></li><li><a href="#" onclick="qe.open('content');return false;" title="Редактировать Содержимое документа">Содержимое документа</a></li><li><a href="#" onclick="qe.open('description');return false;" title="Редактировать описание документа">Описание</a></li><li><a href="#" onclick="qe.open('introtext');return false;" title="Редактировать аннотацию документа">Аннотация (введение)</a></li><li><a href="#" onclick="qe.open('longtitle');return false;" title="Редактировать расширенный заголовок документа (может быть полезно для поисковых систем)">Расширенный заголовок</a></li><li><a href="#" onclick="qe.open('pagetitle');return false;" title="Редактировать название (заголовок) документа. Нежелательно использовать в названии обратный слэш (\)">Заголовок</a></li>
              </ul>
            (lines 55,56,57)

            I understand, that a code

             <script> window.setTimeout ("alert (' In the entered login or the password an error! ')", 10); </script> <script type = "text/JavaScript">

            is generated dynamically. In it difference of a test example from a real site consists.


            Who will tell me how to troubleshoot?
              • 30562
              • 99 Posts
              Has tried to use library “thickbox” on the basis of “JQuary” for output of modal dialogues.
              The standalone example with “thickbox” works OK. After I insert “thickbox” into the MODx-template, IE7 still produces the same muffled message. I deleted various strings from a template code. The trial and error method had appeared, that library
              <script type = "text/javascript" src = "manager/media/script/modalbox/thickbox.js"> </script>

              "does not wish" to work with IE7 or with MODx.


              My conclusion.
              Most likely, the size of a JS-code from various libraries is very great.

              For example:
                 <link rel = "stylesheet" href = "assets/templates/2columns/layout.css" type = "text/css" media = "screen"/>
              ...
                 <script src = "manager/media/script/mootools/mootools.js" type = "text/javascript"> </script>
                 <script src = "assets/templates/modxhost/drop_down_menu.js" type = "text/javascript"> </script>
              
              <script type = "text/javascript" src = "manager/media/script/modalbox/jquery.js"> </script>
              <script type = "text/javascript" src = "manager/media/script/modalbox/thickbox.js"> </script>
              <link rel = "stylesheet" href = "manager/media/script/modalbox/thickbox.css" type = "text/css" media = "screen"/>
              


              The browser does not cope with this size of a code correctly.
                • 30562
                • 99 Posts
                Hi all!

                I have looked for the suitable software on the Internet. And here that has found:
                http://sivel.net/2008/02/shadowbox-js/ .
                It is a plugin for a blog “WordPress” which allows to build modal dialogues as for graphics images so going the text. It is good replacement to unsightly dialogues of type “alert” and so on. The charm of this approach is concluded that the plugin is based on JScript. And besides there are adapters to different libraries including to “mootools”.

                There would be an excellent solution of a problem if it was possible to adapt this plugin from WordPress for MODx.
                  • 30562
                  • 99 Posts
                  Here that was necessary for me: http://www.moord.it/documentation/custom_alert/
                  The library is based on mootools.
                  Join.