Show Posts
|
Pages: [1] 2 3 4
|
1
|
General Category / EasyUI for jQuery / Filebox on IOS device always force open Camera
|
on: December 19, 2020, 07:37:38 AM
|
Hi Expert! By using Filebox, I found it is inconvenient on IOS Device. Cuz I do not have option to select Photo Library beside taking photo from Camera. But If I use the legacy input type="file", then I have option to select Photo Librara; Take Photo or Browse... Do you have solution for this? Thanks.
|
|
|
10
|
General Category / EasyUI for jQuery / Loading data from form into three dependency combobox
|
on: August 23, 2017, 07:54:32 PM
|
I have a three level dependency combobox such as cmb_province_id, cmb_district_id, and cmb_commune_id. I use : onChange event in cmb_province_id [ $("#cmb_district_id").combobox("reload", url+"get_data.php?type=dis&id="+newValue).combobox("clear"); ] onChange event in cmb_district_id [ $("#cmb_commune_id").combobox("reload", url+"get_data.php?type=com&id="+newValue).combobox("clear"); ] In Addnew data mode, it works fine. But in Edit data mode it is not. When it load data from form into combobox, the three combobox not load the correct value. The last combobox, cmb_commune_id, not shown data. I used to apply this code in the old version, 1.4.1, and it works fine. Does anyone has this problem?
|
|
|
12
|
General Category / EasyUI for jQuery / Re: Validate combobox on form submit?
|
on: July 10, 2017, 10:09:31 PM
|
Let try: First extend check validation to check when user key in. $.extend($.fn.validatebox.defaults.rules, { check: { validator: function(value,param){ var obj = $(param[0]).combobox('getData'); var arr = [],n,result; arr = $.map(obj,function(n,i){ n = n.textfield || n.text ; return n; }); result = jQuery.inArray(value, arr); if(result == -1) return false; else return true; }, message: 'Please fill it correctly!' } }); Add validType="check['#company_name']" to your combobox. Define id=0 to your default text "- Select City -" In my case i load data from server so i will do like: $item = array('id'=>'0','text'=>'- Select City -'); $result = array(); array_push($result, $item); For form submit: $('#fm').form('submit', { url: savedata_url, onSubmit: function(param) { if ($('input[name=city_name]').val() === '0') { msg = 'Please select City!'; $.messager.alert('Confirm', msg, 'info'); return false; } else return $(this).form('validate'); },
|
|
|
13
|
General Category / EasyUI for jQuery / combotree scrollTo not work
|
on: July 10, 2017, 09:41:41 PM
|
I have a long list inside combotree. when user open form for edit, for combotree, when user click on the combotree then i want it scroll to that node. In my code: var node = $('#mycombotree').combotree('tree').tree('find',250); $('#mycombotree').combotree('tree').tree('expandTo', node.target); $('#mycombotree').combotree('tree').tree('select', node.target); $('#mycombotree').combotree('tree').tree('scrollTo', node.target); But it seems not scroll to that node. Any solution?
|
|
|
|