Jump to content

SayeyeZohor

uniGUI Subscriber
  • Posts

    215
  • Joined

  • Last visited

Posts posted by SayeyeZohor

  1. 9 minutes ago, Sherzod said:

    What do you mean?

    
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      UniButton1.JSInterface.JSAddListener('click', 'function(sender, e, eOpts){window.open("https://www.digikala.com/", "_blank")}');
    end;

    ?

    yessss but i use that when cellclick in unidbgrid if column = "field1"

     

    @Sherzod

  2. 12 hours ago, Sherzod said:

    Hello,

    Sorry for the late reply.

    Try this:

    
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      with UniHTMLMemo1 do
        JSInterface.JSAddListener('initialize', 'function(editor){'+
                                  '  const bodyArea = editor.getEditorBody();'+
                                  '  bodyArea.style["border"] = "1px solid";'+
                                  '  bodyArea.style["border-radius"] = "4px";'+
                                  '  bodyArea.style["padding"] = "12px 10px";'+
                                  '  bodyArea.style["line-height"] = "2";'+
                                  '}'
        );
    end;

     

    tnx how to add css to unimemo or other component?

    @Sherzod

     

  3. 10 minutes ago, Sherzod said:

    OK, try to use like this:

    
    function window.afterrender(sender, eOpts) 
    {
        Ext.onReady(function() {
            ConvertNumberToPersion();
        });
    
        function ConvertNumberToPersion() {
            persian = {
                0: '۰',
                1: '۱',
                2: '۲',
                3: '۳',
                4: '۴',
                5: '۵',
                6: '۶',
                7: '۷',
                8: '۸',
                9: '۹'
            };
    
            function traverse(el) {
                if (el.nodeType == 3) {
                    var list = el.data.match(/[0-9]/g);
                    if (list != null && list.length != 0) {
                        for (var i = 0; i < list.length; i++)
                            el.data = el.data.replace(list[i], persian[list[i]]);
                    }
                }
                for (var i = 0; i < el.childNodes.length; i++) {
                    traverse(el.childNodes[i]);
                }
            }
            traverse(document.body);
        }
    }

     

    hi are you test this code? working?

    image.thumb.png.9df982c21c25e94adcee262d5cf0e378.png

  4. 10 hours ago, Sherzod said:

    Hi,

    Once again in brief, what do you want to achieve? 

     hi,

    i want to Convert all of numbers in html to persian number

    sample:

    2: '۲'

    and use this script in onload webpage

    <script>
        $(document).ready(function () {
            ConvertNumberToPersion();
        });
      
    	function ConvertNumberToPersion() {
            persian = { 0: '۰', 1: '۱', 2: '۲', 3: '۳', 4: '۴', 5: '۵', 6: '۶', 7: '۷', 8: '۸', 9: '۹' };
            function traverse(el) {
                if (el.nodeType == 3) {
                    var list = el.data.match(/[0-9]/g);
                    if (list != null && list.length != 0) {
                        for (var i = 0; i < list.length; i++)
                            el.data = el.data.replace(list[i], persian[list[i]]);
                    }
                }
                for (var i = 0; i < el.childNodes.length; i++) {
                    traverse(el.childNodes[i]);
                }
            }
            traverse(document.body);
        }
     
    </script>

     

    @Sherzod

  5. hi

    how to add javascript code in onload page with unigui?

     

    <script>
        $(document).ready(function () {
            ConvertNumberToPersion();
        });
      
    	function ConvertNumberToPersion() {
            persian = { 0: '۰', 1: '۱', 2: '۲', 3: '۳', 4: '۴', 5: '۵', 6: '۶', 7: '۷', 8: '۸', 9: '۹' };
            function traverse(el) {
                if (el.nodeType == 3) {
                    var list = el.data.match(/[0-9]/g);
                    if (list != null && list.length != 0) {
                        for (var i = 0; i < list.length; i++)
                            el.data = el.data.replace(list[i], persian[list[i]]);
                    }
                }
                for (var i = 0; i < el.childNodes.length; i++) {
                    traverse(el.childNodes[i]);
                }
            }
            traverse(document.body);
        }
     
    </script>

     

  6. On 9/11/2019 at 11:43 PM, GRFS2000 said:

    Always seeking to help the developers, we held on September 9, 10, 11 in-person training for 5 people from Rondônia at the headquarters of Angel Sistemas in Cuiabá-MT-BR. 

    Let's go, uniGUI in the vein, uniGUI forever.

    /WhatsApp Image 2019-09-11 at 14.58.46.jpeg

    Can you teach these tutorials to other developers as well?

  7. 13 hours ago, Sherzod said:

    Hi,

    Please clarify your question again.
    How and when you want to know whether it is active or not.
    If possible, make a test case. 

    hi

    yes

    i want whether it is active or not on expand or collapse run a showmessage for me ...

×
×
  • Create New...