johnitvn / yii2-ajaxcrud Goto Github PK
View Code? Open in Web Editor NEWGii CRUD template for Single Page Ajax Administration for yii2
Gii CRUD template for Single Page Ajax Administration for yii2
I try to add more than ten rows and still they are in one page.
Does the gridview has pagination?
See two lines in ModelRemote.js
$(elm).attr('data-comfirm-ok'),
$(elm).attr('data-comfirm-cancel'),
'comfirm must change to confirm
Hi, i'm using karik widgets in the create forms. If i go directly to the create action all widgets work as expected, but if i click the add button in the gridview and the create form loads in the corresponding modal, the form loads ok but widget dont work. It isn't loading assets for de widgets.
To solve this, simply change the method renderPartial() for renderAjax() for the sections marked as "Process for ajax request" in src\generators\default\controller.php
Hi, I see the extension not work with Yii2 active form ajax validation. In addtion, the client validation also didn't work. I use $this->renderAjax().
Please guide me how will i add a new action in the actions column with having the current ID of that row.
I tried to install using composer. There seems to have a problem.
Command: composer update --prefer-dist
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- johnitvn/yii2-ajaxcrud 1.0.3 requires johnitvn/yii2-ajaxcrud-assets * -> s
atisfiable by johnitvn/yii2-ajaxcrud-assets[1.0.0, 1.0.1, 1.0.2, 2.0.0, dev-mast
er].
- johnitvn/yii2-ajaxcrud 1.0.4 requires johnitvn/yii2-ajaxcrud-assets * -> s
atisfiable by johnitvn/yii2-ajaxcrud-assets[1.0.0, 1.0.1, 1.0.2, 2.0.0, dev-mast
er].
- johnitvn/yii2-ajaxcrud 1.0.5 requires johnitvn/yii2-ajaxcrud-assets * -> s
atisfiable by johnitvn/yii2-ajaxcrud-assets[1.0.0, 1.0.1, 1.0.2, 2.0.0, dev-mast
er].
- johnitvn/yii2-ajaxcrud 1.0.6 requires johnitvn/yii2-ajaxcrud-assets 1.0.*
-> satisfiable by johnitvn/yii2-ajaxcrud-assets[1.0.0, 1.0.1, 1.0.2].
- johnitvn/yii2-ajaxcrud 2.0.0 requires johnitvn/yii2-ajaxcrud-assets 1.0.*
-> satisfiable by johnitvn/yii2-ajaxcrud-assets[1.0.0, 1.0.1, 1.0.2].
- johnitvn/yii2-ajaxcrud dev-master requires johnitvn/yii2-ajaxcrud-assets *
-> satisfiable by johnitvn/yii2-ajaxcrud-assets[1.0.0, 1.0.1, 1.0.2, 2.0.0, dev
-master].
- johnitvn/yii2-ajaxcrud 2.0.1 requires johnitvn/yii2-ajaxcrud-assets 2.0.*
-> satisfiable by johnitvn/yii2-ajaxcrud-assets[2.0.0].
- johnitvn/yii2-ajaxcrud 1.0.0 requires kartik-v/yii2-mpdf v1.0.0 -> satisfi
able by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud 1.0.1 requires kartik-v/yii2-mpdf v1.0.0 -> satisfi
able by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud 1.0.2 requires kartik-v/yii2-mpdf v1.0.0 -> satisfi
able by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud-assets 1.0.0 requires kartik-v/yii2-mpdf v1.0.0 ->
satisfiable by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud-assets 1.0.1 requires kartik-v/yii2-mpdf v1.0.0 ->
satisfiable by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud-assets 1.0.2 requires kartik-v/yii2-mpdf v1.0.0 ->
satisfiable by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud-assets 2.0.0 requires kartik-v/yii2-mpdf v1.0.0 ->
satisfiable by kartik-v/yii2-mpdf[v1.0.0].
- johnitvn/yii2-ajaxcrud-assets dev-master requires kartik-v/yii2-mpdf v1.0.
0 -> satisfiable by kartik-v/yii2-mpdf[v1.0.0].
- Conclusion: don't install kartik-v/yii2-mpdf v1.0.0
- Installation request for johnitvn/yii2-ajaxcrud * -> satisfiable by johnit
vn/yii2-ajaxcrud[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 2.0.0, 2.0.1,
dev-master].
Note. I already installed kartik-v/yii2-mpdf. It's already in its latest release.
$request = Yii::$app->request;
if($request->isAjax){
.....
}else{
return $this->redirect(['index']);
}
I'd like to use iframe to show view/update page, how can I implement it?
I can't delete anything from firefox, it seams an event is missing in one handler causing this error:
ReferenceError: event is not defined ModalRemote.js:133:5
Chrome and IE works. This may be related:
http://stackoverflow.com/questions/20522887/referenceerror-event-is-not-defined-error-in-firefox
I use zxbodya/yii2-tinymce for textarea input, but ajax broken tinymce
Loading modal not shown on google chrome (or showed only after post request process finished).
This problem is caused by the async property on doRemote is set to false, and it makes beforeRemoteRequest.call(instance);
call delayed right after the post request process finished.
please help me : validate upload file not working
When user press to toggle fullscreen button, the button icon is worked fine but when user press the ESC key for quit fullscreen icon is wrong
the close button isn't working when no item selected.
I replaced the following code in ajaxcrud.js as quick solution
modal.addFooterButton("Close", 'btn btn-default', function (button, event) {
this.hide();
});
with
modal.setFooter('Close');
or we can edit addFooterButton function in ModalRemote.js to accept more option like (dismiss="modal").
Thanks you.
Modal.remote.js:26
this.dialog - $(modalId).find('.modal-dialog');
instead of
this.dialog = $(modalId).find('.modal-dialog');
Hi,
After separating the code into a different repo, the yii2-ajaxcrud-assets has no stable release, so it is not possible to install yii2-ajaxcrud v1.0.3 because this dependency.
Also:
Why are you separating those assets in a different repo?
Thanks
class BulkButtonWidget extends Widget{
...
$content = '<div class="pull-left">'. '<span class="glyphicon glyphicon-arrow-right"></span> With selected '. $this->buttons. '</div>';
....
must be something like this:
$content = sprintf('%s%s %s: %s%s', '<div class="pull-left">', '<span class="glyphicon glyphicon-arrow-right"></span>', \Yii::t('yii2crud', 'With selected'), $this->buttons, '</div>');
When use pjax => true on gridview, the delete not reload the grid.
Sorry my english.
Hi John,
I've wanted to let you know that I started a new extension (https://github.com/drsdre/yii2-radtools) which adds base controller classes for your excellent ajax crud functionality. The goal is to quickly setup CRUD structures and minimize code redundancy (and ongoing management). Additionally it adds functionality like hierarchical links (i.e. persistent prefiltered grids), configurable auto-breadcrumbs, subgrids, editable field handling and persistent grid filtering, sorting and page selection.
The extension is being actively developed. The most prominent missing features is a GII generator which is being worked on.
If you see value in integrating and combining the power of the two extensions together, let me know.
Andre
Hallo! Thanks you for you extension. I found a bug:
If I add datepicker in filter for some field it will work only for first selection. In connected with calling this line of code:
$('#contractsearch-datedoc').datepicker($.extend({}, $.datepicker.regional['ru'], {"dateFormat":"yy-mm-dd"}));
this line is called on page load. But it must be called every time when content in crud is updated (this line makes datepicker work).
Sorry for my english:)
composer require --prefer-dist johnitvn/yii2-ajaxcrud "*"
The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this WILL break in the future and it should be fixed ASAP (require ^1.0 for example)../composer.json has been updated
The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this WILL break in the future and it should be fixed ASAP (require ^1.0 for example).
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- johnitvn/yii2-ajaxcrud 2.0.7 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.6 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.5 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.4 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.3 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.2 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.1 requires johnitvn/yii2-ajaxcrud-assets 2.0.* -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.0 requires johnitvn/yii2-ajaxcrud-assets 1.0.* -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.6 requires johnitvn/yii2-ajaxcrud-assets 1.0.* -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.5 requires johnitvn/yii2-ajaxcrud-assets * -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.4 requires johnitvn/yii2-ajaxcrud-assets * -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.3 requires johnitvn/yii2-ajaxcrud-assets * -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.2 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.1 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 1.0.0 requires kartik-v/yii2-mpdf v1.0.0 -> no matching package found.
- johnitvn/yii2-ajaxcrud 2.0.8 requires kartik-v/yii2-mpdf ^1.0.0 -> satisfiable by kartik-v/yii2-mpdf[1.0.0.x-dev].
- johnitvn/yii2-ajaxcrud 2.0.9 requires kartik-v/yii2-mpdf ^1.0.0 -> satisfiable by kartik-v/yii2-mpdf[1.0.0.x-dev].
- Conclusion: don't install kartik-v/yii2-mpdf 1.0.0.x-dev
- Installation request for johnitvn/yii2-ajaxcrud * -> satisfiable by johnitvn/yii2-ajaxcrud[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 2.0.0, 2.0.1,2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
Potential causes:
Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
Installation failed, reverting ./composer.json to its original content.
How to change message confirmation on deleteOptions in gridview?
i follow this setting, but noting change.
'deleteOptions'=>['role'=>'modal-remote','title'=>'Delete',
'data-confirm'=>false, 'data-method'=>false,// for overide yii data api
'data-request-method'=>'post',
'data-toggle'=>'tooltip',
'data-confirm-title'=>'Hello?',
'data-confirm-message'=>'Hello Kirenius'],
Some time we want to add toogle column for boolean field.
Examples: Active/Inactive, Block/Nonblock fields
Is it possible to turn off modals and make link to open on another page (with loading all of the widgets)?
setting pjax:false just turns off pjax rendering.
Thanks
where i can edit them? i need show edit button only for admin role users
Help me please
How can we use kartik widgets in the forms with your extension ? Even renderAjax for the content does not load the form. Can you point me in the right direction?
Some time user need extends and them want to catch event from jquery
When user clicks the export button nothing happens. I've installed it in many different application and It never works. Could it be an issue with Kartik widgets?
after update to version 1.0.3
Class 'johnitvn\ajaxcrud\assets\CrudAsset' not found
Is it possible to change the default IDs of them? Trying to make multiple modals in one page...
Looks like they are hard-coded in .js..
Thanks.
Sometime i need change the default of modal style, Default label of Ok/Cancel button... We need to api to change it
After upgrading from 1.0.4 to 2.0.2 through composer, I've not been able to get it up and running anymore. It stops working with the message:
Class 'johnitvn\ajaxcrudassets\CrudAsset' not found
I've created pull request #20 with a fix.
Dear @johnitvn sir,
Sometimes When I click on Gridview action buttons or create button, It's causes some jquery error. Sir, Please check below screenshot.
When response contain field error:true
So we need to change style of modal like as modal-danger.
Hi John,
I tried to install and generate a model using your yii2-ajaxcrud. The Update and View is working fine but not with delete. I tried in Firefox and Chrome but delete did not work for both. I like this extension so much, but I am really frustrated since delete is not working. I did not change anything on the code yet. The prompt message is pop up but when "Delete" button is clicked nothing is happened!
Can you help me on this?
I check with my ModalRemote.js
this.addFooterButton = function (label, type, classes, callback) { buttonElm = document.createElement('button'); buttonElm.setAttribute('type', type === null ? 'button' : type); buttonElm.setAttribute('class', classes === null ? 'btn btn-primary' : classes); buttonElm.innerHTML = label; var instance = this; $(this.footer).append(buttonElm); if (callback !== null) { $(buttonElm).click(function (event) { callback.call(instance, this, event); }); } };
Additionally, in chrome delete is also not working
Create document for data blind in extension
Create guide for add bulk action buttons
Create guide for add toogle column
I add variable in class BulkButtonWidget
public $text
and in function
if(!$this->text) $this->text='<span class="glyphicon glyphicon-arrow-right"></span> With selected ';
$content = '<div class="pull-left">'.
$this->text.
$this->buttons.
'</div>';
Latest version is kartik-v/yii2-editable: 1.7.3 (which includes important updates). Please update this package when you can.
Can you update the requirement to allow kartik-v/yii2-grid >3.04 ?
your latest version of this extension
requires kartik-v/yii2-grid 3.0.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.