This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| src/GroceryCrud/Core/State/StateAbstract.php | 5 ++++- | |
| 1 file changed, 4 insertions(+), 1 deletion(-) | |
| diff --git a/src/GroceryCrud/Core/State/StateAbstract.php b/src/GroceryCrud/Core/State/StateAbstract.php | |
| index 6b37f87..c2c2424 100644 | |
| --- a/src/GroceryCrud/Core/State/StateAbstract.php | |
| +++ b/src/GroceryCrud/Core/State/StateAbstract.php | |
| @@ -1311,11 +1311,14 @@ class StateAbstract | |
| public function getFieldTypesAddForm() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use GroceryCrud\Core\Model; | |
| use Zend\Db\Sql\Sql; | |
| class customModel extends Model { | |
| public function customInsert($insertId) | |
| { | |
| $sql = new Sql($this->adapter); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ... | |
| class Examples extends CI_Controller { | |
| ... | |
| private function _getDbData() { | |
| $db = []; | |
| include(APPPATH . 'config/database.php'); | |
| return [ | |
| 'adapter' => [ | |
| 'driver' => 'Pdo_Pgsql', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <?php | |
| foreach($css_files as $file): ?> | |
| <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" /> | |
| <?php endforeach; ?> | |
| <?php foreach($js_files as $file): ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function () { | |
| $('.gc-container').groceryCrud({ | |
| openInModal: false, // Prevent forms to open in modal. (Default = true) | |
| hashEvents: false, // Remove the hash events from the URL (Default = true) | |
| callbackBeforeInsert: function (currentForm) { | |
| console.log('callback that is called right before the insert'); | |
| }, | |
| callbackBeforeUpdate: function (currentForm) { | |
| console.log('callback that is called right before the update'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function () { | |
| $('.gc-container').groceryCrud({ | |
| onRowMount: function (primaryKeyValue) { | |
| $('.grocery-crud-table').on('dblclick', '.gc-datagrid-row[data-id=' + primaryKeyValue + ']', function (event) { | |
| event.preventDefault(); | |
| this.onEditClick.apply(this, [primaryKeyValue]); | |
| }.bind(this)); | |
| }, | |
| onRowUpdate: function (primaryKeyValue) { | |
| $('.grocery-crud-table').on('dblclick', '.gc-datagrid-row[data-id=' + primaryKeyValue + ']', function (event) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //CustomersModel.php | |
| use GroceryCrud\Core\Model; | |
| use GroceryCrud\Core\Model\ModelFieldType; | |
| class CustomersModel extends Model { | |
| protected $ci; | |
| protected $db; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Please have in mind that as those data are only for testing purposes | |
| -- we did add the full list of cities only for Greece and United Kingdom. | |
| -- Other than that they are few cities for France and Italy in case you would | |
| -- like to test it. | |
| -- | |
| -- phpMyAdmin SQL Dump | |
| -- version 4.8.2 | |
| -- https://www.phpmyadmin.net/ | |
| -- | |
| -- Host: localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use GroceryCrud\Core\GroceryCrud; | |
| class CustomersController extends Controller | |
| { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use GroceryCrud\Core\GroceryCrud; | |
| class CustomersController extends Controller | |
| { | |
| /** |