Is it possible to have Add view and then the CRUD datagrid below it. so user enters in add view and clicks save and sees it in the CRUD?
Add View on same page as the CRUD
- Single Page
Posted 28 August 2015 - 03:26 AM
Posted 28 August 2015 - 08:46 AM
No one have tried it but can be possible with iframes.. and javascript @play
Posted 28 August 2015 - 11:38 AM
What I do is load form on modal and refresh list on close or save.
Posted 28 August 2015 - 11:51 AM
that surely is a good option!!
Posted 28 August 2015 - 19:58 PM
titu, thats awesome. could you please share how its done? Thanks.
Posted 31 August 2015 - 15:17 PM
This would be one of many approaches:
With boostrap library loaded:
<a href="/companies/index/add" data-target="#ajaxModal" data-toggle="modal" class="btn btn-sm"> <i class="fa fa-plus"></i> New Company </a>
And replace href with your controller/model.
$('#ajaxModal').on('hidden.bs.modal', function () { // do something… })
Posted 17 September 2015 - 02:04 AM
@titu, can you share what is the code inside those function? it would be helpful to others, and also how do you put save or button actions in your modal buttons(like in the add,edit and view button actions) or did you move those action buttons via javascript? please how? plz answer asap :(
thanks in advance ;)
Posted 22 September 2015 - 09:14 AM
@noel no problem in sharing but could you be more specific, in what do you need. Save buttons are generated by GC template so if you load the form on the modal they will appear.
Posted 24 September 2015 - 14:27 PM
i mean that i just want to move the save button(groceryCRUD save button and other buttons) on the modal button (see the attachment)
i just want to know if this is possible, and additional problem: how to make the height and width of the iframe change when modal is in at open state? sometimes, it changes height when the record is successfully added(the successfully added message will appear at the bottom). Any idea @titu? btw, thx for the reply, i successfully show the map on the crud operation by using pure javascript provided at the biostall page. kudos! :)
Posted 25 September 2015 - 22:40 PM
Are you using bootstrap? this syntax should be ok. I don't use modal buttons, just the GC buttons (if not you'll have to edit the template).
<a href="/companies/index/add" data-target="#ajaxModal" data-toggle="modal">
<i class="fa fa-plus"></i> New Company </a>
Regarding the modal length, try using this:
$('#modal').on('show', function () {
Posted 27 September 2015 - 16:15 PM
@titu yes i am using bootstrap theme. i solve the height/length issue of my modal using iFrame Resizer. I just want to move the functionality of the GC buttons to my modal thats all. Thanks anyway for the suggestions :mellow: , it is deeply appreciated ;) .