volosoft / jtable

A JQuery plugin to create AJAX based CRUD tables.
http://www.jtable.org
1.1k stars 506 forks source link

new/edit dialogs #554

Open mliotta opened 11 years ago

mliotta commented 11 years ago

I am sure I am missing something simple, but I can't figure out how to make the new and edit dialogs close after submit and reload the table.

arif-rh commented 11 years ago

I have the same situation, only when I add new Record. and in my firebug i found this:

TypeError: c(...).addClass(...).attr(...) is undefined (jquery.jtable.min.js line 35)

and I see this code in line 35:

_createRowFromRecord:function(b){
b=c("<tr></tr>").addClass("jtable-data-row").attr("data-record-key",this._getKeyValueOfRecord(b)).data("record",b);
this._addCellsToRowUsingRecord(b);return b
}

I can't figure out because when I edit Record, it's just fine.

arif-rh commented 11 years ago

@mliotta, issue that I found yesterday has gone by using latest jquery and jquery-ui.

Try to using latest jquery and jquery-ui. Hope it works.

mliotta commented 11 years ago

I am using jquery 1.9.1 and jquery-ui 1.10.2

arif-rh commented 11 years ago

I am using jquery 1.9.1 and jquery-ui-1.10.3 (with latest jquery-ui css too) and it works fine. If you dont, perhaps you use another javascript or css framework that make it confilct?

sanzcruzer commented 11 years ago

to @arif-rh : saya pakai codeigniter dan jtable, tapi kasusnya sama juga pak sama issue2 di atas jquery & jquery-ui saya sudah ter-update bahkan response juga ok, di id saya tambahkan key : true juga tapi masih saja tablenya tidak mau keluar.. path2 filenya juga sudah benar.. kira2 apa kesalahan yang lain ya pak. saya pake postgreSQL buat databasenya

arif-rh commented 11 years ago

@sanzcruzer , kalau menggunakan codeigniter, dan semua path sudah benar, coba di test dulu controller utk masing-masing action, apakah sudah menghasilkan data json seperti yang dibutuhkan jTable?

sanzcruzer commented 11 years ago

@arif-rh : sebelumnya saya mencoba CRUD sederhana buatan saya sendiri hasilnya juga bisa + pagination juga.. begitu saya translate ke jTable belum bisa menghasilkan data apapun.. sudah saya test pak keluaran jsonnya seperti ini.. {"Result":"OK","Records":[{"id":"1","no_ka":"5","nama_ka":"KA Argo Bromo Anggrek","kelas_ka":"Eksekutif","sta_berangkat":"Surabaya Pasar Turi","wkt_berangkat":"08.01","sta_datang":"Jakarta Gambir","wkt_datang":"18.37","harga":"Rp. 550.000,-"},{...dst}}

arif-rh commented 11 years ago

@sanzcruzer, mungkin perlu analisa codingnya, karena misalkan ada typo satu pun dalam codingnya, bisa menyebabkan script tidak berjalan. Atau jika menggunakan firebug, bisa dilihat apakah ada informasi diperoleh dari sana.

sanzcruzer commented 11 years ago

saya menggunakan chrome pak, ketika saya inspect element semuanya berhasil tidak ada error/bug..