jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts

  • Ankit Shah
    Participant

    Hi Peter,

    Can you please answer to the question and let me know if you are able to replicate the scenario and if yes, how we should resolve this issue.

    My utility relying on resolution of this issue before going on production.

    Hope you understand the situation.

    Thanks and I appreciate your help.

    –Ankit Shah


    Ankit Shah
    Participant

    Hi Peter,

    The code is not working for me. I am using below steps to replicate the issue.

    1) Open page in browser. The listbox is populated with some items.
    2) Click on Disable button. This will disable the list box.
    3) Open developer options of your browser (F12). I am using Chrome as my browser.
    4) Try to drag item from listbox to textarea.
    5) In browser consol you will get error while dragging the item. The error says “Uncaught TypeError: Cannot read property ‘hide’ of undefined”.

    Can you please verify again?

    Thanks in advance.

    Ankit


    Ankit Shah
    Participant

    Hello Peter,

    Thanks for pointing the errors. We are under impression that we can also set properties with “instance” object. But after carefully reviewing the documentation, we come to know that we can call methods only with “instance” object.

    However, trying your given code we are still experiencing the issue.

    Can you please suggest any remedy of this issue?

    Also please note that the same issue we checked with 3.8 version of JQWidget library and same issue happens.

    Thanks,


    Ankit Shah
    Participant

    Thanks Peter.

    Please find updated e.g. as below. The thing is even after updating the code with your sugestion, we are getting the same error.
    Please note that we are using 3.7 version of JQWidget.

    
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta name="keywords" content="jQuery DropDownList, List, ListBox, Popup List, jqxDropDownList, jqxListBox, List Widget, ListBox Widget, DropDownList Widget" /> 
        <meta name="description" content="The jqxListBox represents a widget that contains a list of selectable items."/>
        <title id='Description'>Initialize the jqxListBox from Array</title>
        <link rel="stylesheet" href="styles/jqx.base.css" type="text/css" />
    	
        <script type="text/javascript" src="angular.js"></script>
    	<script type="text/javascript" src="jquery-2.1.4.js"></script>
    	<script type="text/javascript" src="jqxcore.js"></script>
        <script type="text/javascript" src="jqx-all.js"></script>
    	<script type="text/javascript" src="jqxangular.js"></script>
    	 <script type="text/javascript">
    		 var demoApp = angular.module("drag", ["jqwidgets"]);
            demoApp.controller("dragController", function ($scope) {
                $scope.people = ["Pedro", "Clara", "John", "Pier"];
                // init ListBox's settings object.
    		
                $scope.listboxinstance = {};
                $scope.listBoxSettings =
                {
                    width: 200,
                    height: 200,
                    source: $scope.people,
    				allowDrag:true,
    				//disabled:false,
    				dragEnd: function(event){
    				$('#textArea').text(event.value);
    				}
                }
    			
    		$scope.disableListbox = function(){
    			$scope.listboxinstance.disabled = true;
    			$scope.listboxinstance.allowDrag = false;
    		};	
               
            });
    		
            </script>
    </head>
    <body ng-app="drag" ng-controller="dragController">
        <div id='content'>
           
            <jqx-list-box id='dd' jqx-settings='listBoxSettings' jqx-instance="listboxinstance">
            </jqx-list-box>
    		<textarea id="textArea"></textarea>
            <jqx-button  ng-click="disableListbox()" style='width:100px;height:25px'>Disable</jqx-button>
            </div>
        
    </body>
    </html>
    

    Ankit Shah
    Participant

    Dimitar,
    Thanks for your quick turnaround on this issue. Actually, I should have been more clear on what I need.

    I need jqx-menu created on the fly when user right-click on tree node. In your e.g. menu is defined in DOM, but I need that should be created when contex menu is pulled on tree node.

    Can you please suggest a way to achieve this functionality?

    Thanks,


    Ankit Shah
    Participant

    Thanks you, Dimitar.

    Can you please show how to achieve the same with AngularJS?

    Thanks,


    Ankit Shah
    Participant

    Ok, that answers the question. I just wanted to know if there is such in-built support.

    Thanks Peter.


    Ankit Shah
    Participant

    Hi Peter,

    Thank you for your answer. I was surprise to see this working until your last answer, because it was not working until version 3.6.

    Thanks again and appreciate your help!!

    — Ankit


    Ankit Shah
    Participant

    Hello Nadezhda

    I really didn’t understand your point here. If I execute following code on document ready, it correctly recognize “(” character and shows correct output.

    $(document).ready(function () {
    
                    alert("This is test for (".toUpperCase());
                });
    

    What I am missing here?

    I want to search with all words that user enters. This does not work when I compare “value” and “itemValue” without converting them to upper case (or may be lower case).

    Thanks,


    Ankit Shah
    Participant

    Hi Peter,

    Can you please explain/elaborate on the given solution?

    Thanks,


    Ankit Shah
    Participant

    Don’t know why the link disappear. Posting as a plain text here..

    http://www.jqwidgets.com/community/topic/jqxinput-is-not-recognizing-with-autocomplete/


    Ankit Shah
    Participant

    Hi Peter,

    I am facing the same problem with “(“. I tried to take help from jqx team with following post:

    I didn’t get the good answers from there and i think you are already aware of this issue so asking you in this post.

    If we do not talk in terms of & char., I still want to allow user “(” character.
    As per your statement, “However, you should note that the Popup should be closed when you type. Otherwise, what you type will try to select a record from the popup.“, I am assuming the reason for not allowing “&” in the input is it is not part of the popup. However, in my case, “(” is still part of the pop-up and jqxInput control is not allowing me to insert that char. without pressing escape key (or closing the popup).

    I really appreciate the help.

    Thanks,


    Ankit Shah
    Participant

    Hello Nadezhda,
    What I want is to build a expression or formula using function signatures (for e.g. GetValue() + Max() + Min() ), and provide autocomplete feature for that. The function list is my source data from which I want to search. So, my function list contains items as “functionName()”. Now when I search the function list by typing in its name, say “GetValue”, jqxInput correctly shows me the option as “GetValue()”. Then I type “(” the jqxInput is not taking that character and does not highlight the “(“.
    I put alert on “query” parameter of ‘source’ callback function, but alert didn’t show me the “(” char but “GetValue” is still displayed on alert. The same thing happened when i put alert on ‘this.query’ inside ‘filter’ callback.

    So, the steps are:

    1) Type “getvalue”, the jqxinput will highlight matching result.
    2) Type “(” or “&”, jqxInput will not accept that character and does not highlight “(” or “&” in the list.

    Note: If I press Esc key after step 1 to remove the matches and then type the “(” jqxInput will allow me that char, and also highlight that.

    Below is the modified code. I slightly modified the filter callback to match every character, irrespective of its case.

    <script type="text/javascript">
            $(document).ready(function () {
                var Selectedfunction;
                $(function () {
                    var functionList = [
                          "IF",
                          "ELSE",
                         "GetValue()",
                         "GetValue&", //this is just for e.g.
                         "Min()",
                         "Max()",
                         "Average()",
                         "Sum()",
                         "Mul()"
                    ];
    
                    $("#expressionWindow").jqxInput({
                        opened: true,
                        height: 100,
                        width: 500,
                        theme: 'energyblue',
                       // searchMode: 'containsignorecase',
                        source: function (query, response) {
                           
                            var item = query.split(/\s*[+|\-|*|\/]\s*/g).pop();
                            $("#expressionWindow").jqxInput({ query: item });
                            response(functionList);
                        },
                        renderer: function (itemValue, inputValue) {
                            $.jqx.string.containsIgnoreCase(itemValue, inputValue);
                            Selectedfunction = itemValue;
                            var stringContrinsOperators;
                            var value;
                            var regex = /.*[+|\-|*|\/]/g;
    
                            var textBoxString = regex.exec(inputValue);
    
                            if (textBoxString === null)
                                value = itemValue;
                            else
                                value = textBoxString + itemValue;
                            return value;
                        },
                        filter: function (item) {
                           
                            var value = this.query;
                           // alert(this.query);
                            var itemValue = item;
                            if (itemValue == null || value == null)
                                return false;
                            if (value.length == itemValue.length) {
                                return itemValue.toUpperCase().slice(0, value.length) == value.toUpperCase();
                            }
                            return itemValue.toUpperCase().indexOf(value.toUpperCase()) != -1;
                        }
                    });
                });
            });
        </script>

    Thanks,


    Ankit Shah
    Participant

    Ankit Shah
    Participant

    Hello Nadezhda,

    Thank you for your suggestion, but it didn’t work for me. The solution you give is highlighting only one character in formula when auto-complete list appears and that is why we use searchMode property to “containsignorecase”. It also didn’t address the real problem I am facing.

    It appears to me that the “(” and “&” are not being recognized by the jqxInput. I am saying so, because when I put alert on “query” parameter of source callback function, type something so that search show you some results and then presses ( or & the alert box does not contain these two chars. I am referring to below jsFiddle given as example for multiple value for jqxInput.

    Can you see why it is not allowing the ( and & chars?

    Thanks,
    Ankit

Viewing 15 posts - 16 through 30 (of 30 total)