EasyUI Forum
May 13, 2024, 07:55:50 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 9 10 [11]
151  General Category / EasyUI for jQuery / onBeforeCheck not work on children tree on: November 09, 2014, 10:47:50 PM
hello,

i have a problem with onBeforeCheck event on tree plugin.
onBeforeCheck will triggered if will physically checked/clicked some node, but when that node had a child node. the onBeforeCheck event not triggered on that child node.

so how to get it work (event onBeforeCheck) on some child node. i need that child node have that event too.
sorry for my poor english.

thanks in advance
Opan
152  General Category / EasyUI for jQuery / how to add new event in menu or menubutton on: November 06, 2014, 11:13:13 PM
just simple, how to do that? its just like extende it? or something else?

i need an event like onLoad or onAppend when i append menu or submenu, and then i can add an attribute on it,

thanks in advance
Opan
153  General Category / EasyUI for jQuery / Re: create dynamically menu button on easyui on: November 05, 2014, 04:53:29 AM
problem solved Cheesy thank for looking my post.
154  General Category / EasyUI for jQuery / Re: menu: enable/disable item by name? on: November 05, 2014, 01:33:15 AM
sorry, but still not working ?
155  General Category / EasyUI for jQuery / Re: menu: enable/disable item by name? on: November 04, 2014, 10:23:04 PM
find by id not work, still get null,
my id is result from generate ex:

Code:
var id = 00;

var item = $('#mm').menu('findItem',$('#'+id'')[0]);



and item give null
156  General Category / EasyUI for jQuery / create dynamically menu button on easyui on: November 04, 2014, 08:16:02 PM
hello again,

in to the point, it is possible to make menu button display dynamically?

for example i have one menubutton below:

Code:
<a class="easyui-menubutton" href="javascript:void(0)" id="test" menu="#0001" plain="true"> Test </a>


and i have a div to provide the sub menu

Code:
<div id='0001'> 
<div> 1 </div>
<div> 2</div>
</div>

so when i hover the menubutton, it will show the sub menu right?, and what i want is when i hover again to submenu with textmenu = 2, it will append new submenu in it self.

so the code it look like this (ex):
Code:
<div id='0001'> 
<div> 1 </div>
<div>
2
<div> 2.1</div>
<div> 2.2</div>
</div>
</div>

again, it is possible to do this in easyui plugin?
thanks for every answer
157  General Category / EasyUI for jQuery / problem using getChanges in treegrid on: October 26, 2014, 07:19:43 PM
hello all,

i have a problem with getChanges method in treegrid.
in datagrid i can easily get the inserted, updated, or delted row.
but when i use that method in treegrid, i can only get the updated and deleted method, but when i used the inserted like: dg.treegrid('getChanges','inserted') i always get 0 length changes row. in fact i didnt update any row on that treegrid before, but i append/insert a new row into that treegrid.
so its possible using getChanges method in treegrid like in datagrid? or just for now is not supported for treegrid?


sorry for my bad english
any help will appriciate
thanks

158  General Category / EasyUI for jQuery / Re: show error when click child node treegrid on: October 24, 2014, 03:22:01 AM
maaf mas udah bikiin repot, masalahnya sudah fix, itu kelalaian saya kurang teliti. Cheesy
terima kasih sudah mau merespon problem saya
159  General Category / EasyUI for jQuery / Re: show error when click child node treegrid on: October 23, 2014, 11:53:39 PM
hello? anybody? i really need help here.

any help will appriciate
thanks
160  General Category / EasyUI for jQuery / show error when click child node treegrid on: October 23, 2014, 09:24:29 PM
hi all, ,
i have a problem with my treegrid,
when i click row in child node, firebug shows error :
Code:
TypeError: row is null


_79.onClickCell.call(_76,_85,_86,row[_86]);

here is my script:

Code:
:javascript

// start VAR global atau yang dipakai berulang-ulang untuk function dibawah

var frm_url; // variable untuk url save, update, dan delete form
var cmenu;
var rep_obj = 'admin_ms_menu';
var $list_data = $('#list_data');
var $frm_dlg = $('#frm_dlg');
var $frm = $('#frm');
var url_crud_row    = "#{control_data_admin_ms_menus_path}";
var init_url = "#{sc_get_initial_data_admin_ms_menus_path}";

// stop VAR

$(function(){
$list_data.treegrid({
url: '#{sc_load_data_admin_ms_menus_path}',
method: 'get',
toolbar: '#tb_list_data',
idField: 'id_tree',
treeField: 'namamenu',
animate: true,
striped: true,
rownumbers: true,
remoteSort: true,
resizeHandle: 'both',
//autoRowHeight: true,
//remoteSort: true,
//remoteFilter: true,
filterPosition: 'top',
pageSize: 20,
// view: scrollview, // note: treegrid tidak support scrollview (untuk saat ini)
multiSort: true,

frozenColumns: [[
{field: 'ck', checkbox:true},
{field: 'namamenu', title: 'Menu Name', width:300, sortable:true},
]],
columns: [[
{field: 'id_menu_parent', title: 'ID Menu Parent', width:100, sortable:true},
{field: 'id_menu', title: 'ID Menu', width:100, sortable:true},
{field: 'id_product', title: 'ID Product', width:100, sortable:true},
{field: 'levelmenu', title: 'Level', width:100, sortable:true},
{field: 'id_modul', title: 'ID Modul', width:100, sortable:true},
{field: 'status1', title: 'Status', width:100, sortable:true},
{field: 'nourut', title: 'Sort', width:100, sortable:true},
{field: 'nolist', title: 'List', width:100, sortable:true},
{field: 'created_at', title: 'Created At', width:100, sortable:true},
{field: 'updated_at', title: 'Updated At', width:100, sortable:true},
]],
onHeaderContextMenu:function(e, field){
e.preventDefault();
if (!cmenu){
createColumnMenu($list_data);
}
cmenu.menu('show',{
left: e.pageX,
top: e.pageY
});
}
});

// start function FILTER datagrid

$list_data.treegrid('enableFilter',[
{
field:'created_at',
type:'dateRange',
op:'betweenDate'
},
{
field:'updated_at',
type:'dateRange',
op:'betweenDate'
},
{field:'namamenu',type:'label'}
]);

// stop function FILTER datagrid

});



// start function untuk FORM

$(function(){
$frm_dlg.dialog({
title: 'Form Admin Menu',
toolbar: '#tb_frm_dlg',
maximized: true,
closed: true,
modal: true,
draggable: false,
shadow: true,
minimizable: true,
maximizable: false,
onBeforeOpen: function(){
if (state.op == "show_form"){
show_form_before_open();
}else if (state.op == "new_form"){
new_form_before_open();
}
}
});
});

function new_form_before_open(){
$('#delete_form, #edit_form, #cancel_form').hide();
$('#save_form, #close_form').show();
$('.cp').textbox('disable').prop('readonly', true)
$('.m').textbox('readonly', false).textbox('enable').textbox({required: true});
$('.o').textbox('readonly', false).textbox('enable');
};

function show_form_before_open(){
$('#save_form, #cancel_form').hide();
$('#delete_form, #edit_form, #close_form').show();
$('.cp').textbox('disable').textbox('readonly', true)
$('.m').textbox('readonly', true).textbox('disable').textbox({required: true});
$('.o').textbox('readonly', true).textbox('disable');
}

function save_form(){
$.messager.progress({msg: 'Please Wait...', text: 'Processing...'});
$('#frm').form('submit',{
url: frm_url,
onSubmit: function(param){
param.authenticity_token = "#{form_authenticity_token}";
var v = $(this).form('validate');
if (!v) $.messager.progress('close');
return v;
},
success: function(result){
$.messager.progress('close');
var result = eval('('+result+')');
if (result.msg){
show_form_before_open();
$list_data.datagrid('reload');
}else{
$.messager.show({
title: 'Error',
msg: result.error
});
}
}
});
}

function delete_form(){
var row = getRow($list_data);
frm_url = "#{control_data_admin_ms_menus_path}?form_data=true&delete=true";
if (row){
$.messager.confirm('Confirm', "Are you sure want to Delete?", function(r){
if (r){
$.post(frm_url,{id: row.id},function(data){
$frm_dlg.dialog('close');
$list_data.datagrid('reload');
}, 'json');
}
});
}else{
$.messager.confirm('Confirm', "Are you sure want to Delete?", function(r){
if (r){
$list_data.datagrid('load',{id_navigasi: $('#id_navigasi').val()});
row = $list_data.datagrid('getData');
console.log(row.id);
$.post(frm_url,{id: row.id},function(data){
$frm_dlg.dialog('close');
$list_data.datagrid('reload');
}, 'json');
}
});
}
}

function edit_form(){
$('#save_form, #cancel_form').show();
$('#delete_form, #close_form, #edit_form').hide();
$('.m').textbox('readonly', false).textbox('enable').textbox({required: true});
$('.o').textbox('readonly', false).textbox('enable');
var row = getRow($list_data);
frm_url = "#{control_data_admin_ms_menus_path}?form_data=true&id="+row.id;
}

function new_form(){
if ( state.op == 'edit'){
$.messager.alert('Warning', 'There are current record being edited. Finish editing process before open a new form.');
return false;
}
state.op = "new_form";
$frm_dlg.dialog('open').dialog('setTitle', "New Form");
$frm.form('clear');

frm_url = "#{control_data_admin_ms_menus_path}?form_data=true";

}


// stop function untuk FORM


sorry i can attach that error picture,
but can somebody explain to me why this error show up?
thanks
161  General Category / EasyUI for jQuery / Re: create datebox range filter in datagrid on: October 17, 2014, 09:02:22 PM
oh stworthy, sorry i asked again, where to place formatter in code that you gave to me? cause that calendar format still: yyyy/mm/dd

i want format it to  yyyy-mm-dd;

can you give an example using your code

thanks
162  General Category / EasyUI for jQuery / Re: create datebox range filter in datagrid on: October 17, 2014, 08:22:55 PM
thank you stworthy for your fast response  Grin, its really help, now i just customized it with what i want.

163  General Category / EasyUI for jQuery / create datebox range filter in datagrid on: October 17, 2014, 04:33:23 AM
hi, i have a project was need to create a filter with datebox but in range, i mean when i clicked the calendar icon, it will show two datebox, then i can choose date range i want.

i found this before: http://www.jeasyui.com/forum/index.php?topic=3653.0
but the result not was i expected.

in that example, show two datebox filter, yes, but its display inline.

it is possible for that using easyui framework?

sorry for my bad english, any help will appriciate.

thanks
164  General Category / EasyUI for jQuery / Re: datebox filter on: October 17, 2014, 04:28:17 AM
how to create operator for filter datebox with date range, i used this but doesn't work:
Code:
$(function(){
$.extend($.fn.datagrid.defaults.operators, {
dateCompare: {
text: 'Date Compare',
isMatch: function(source, value){
var dtr = value.split('until');
var dt1 = dtr[0].split(' ');
var dt2 = dtr[1].split(' ');

var date1 = dt1[0].split(',').toString();
var time1 = dt1[1].split(',').toString();

var date2 = dt2[0].split(',').toString();
var time2 = dt2[1].split(',').toString();

var val1  = date1.concat(' ',time1);
var val2  = date2.concat(' ',time2);

console.log(source+' '+val1+' '+val2);
return ((source >= val1) && (source <= val2));

}
}
});
});

with value ex: "2014-10-09 00:00:00 until 2014-10-17 23:59:59" and source is "2014-10-13 00:00:00"

any help appriciate, sorry for my bad english

thanks.
Pages: 1 ... 9 10 [11]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!