EasyUI Forum
March 28, 2024, 04:32:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: commandSelect in treegrid is not working when signleSelect=0 & mutliSelect=1  (Read 6208 times)
chandrasigniant
Newbie
*
Posts: 21


View Profile Email
« on: January 04, 2017, 10:07:53 AM »

When using mac OS browsers commandSelect (metaKey) in treegrid is not working when signleSelect=false & mutliSelect=true. It is basically the missing line of code here (the code in block is what needs to be added to your source).
Can you fix it in your version, so I don't have to maintain the source code of your framework in my project?

function _6b0(e){
var tr=_6ab(e.target);
if(!tr){
return;
}
var _6b1=_69e(tr);
var opts=$.data(_6b1,"datagrid").options;
var _6b2=_6ae(tr);
var tt=$(e.target);
if(tt.parent().hasClass("datagrid-cell-check")){
if(opts.singleSelect&&opts.selectOnCheck){
tt._propAttr("checked",!tt.is(":checked"));
_6b3(_6b1,_6b2);
}else{
if(tt.is(":checked")){
tt._propAttr("checked",false);
_6b3(_6b1,_6b2);
}else{
tt._propAttr("checked",true);
_6b4(_6b1,_6b2);
}
}
}else{
var row=opts.finder.getRow(_6b1,_6b2);
var td=tt.closest("td[field]",tr);
if(td.length){
var _6b5=td.attr("field");
opts.onClickCell.call(_6b1,_6b2,_6b5,row[_6b5]);
}
if(opts.singleSelect==true){
_6b6(_6b1,_6b2);
}else{
if(opts.ctrlSelect){
if(e.metaKey||e.ctrlKey){
if(tr.hasClass("datagrid-row-selected")){
_6b7(_6b1,_6b2);
}else{
_6b6(_6b1,_6b2);
}
}else{
if(e.shiftKey){
$(_6b1).datagrid("clearSelections");
var _6b8=Math.min(opts.lastSelectedIndex||0,_6b2);
var _6b9=Math.max(opts.lastSelectedIndex||0,_6b2);
for(var i=_6b8;i<=_6b9;i++){
_6b6(_6b1,i);
}
}else{
$(_6b1).datagrid("clearSelections");
_6b6(_6b1,_6b2);
opts.lastSelectedIndex=_6b2;
}
}
}else{
if(tr.hasClass("datagrid-row-selected")){
_6b7(_6b1,_6b2);
}else{
_6b6(_6b1,_6b2);
}
}
}
opts.onClickRow.apply(_6b1,_636(_6b1,[_6b2,row]));
}
};
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: January 04, 2017, 05:31:27 PM »

Please download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5.1-patch.zip.
Logged
chandrasigniant
Newbie
*
Posts: 21


View Profile Email
« Reply #2 on: January 05, 2017, 03:52:19 PM »

Thank you. Can you please put the full minified file here? It is difficult to go on adding patches to the already minified JS file.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #3 on: January 05, 2017, 07:40:30 PM »

You just need to include the patch file in your page.
Code:
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.patch.js"></script>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!