-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
1,859 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Windows image file caches | ||
Thumbs.db | ||
ehthumbs.db | ||
|
||
# Folder config file | ||
Desktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
nbproject | ||
vendor | ||
composer.phar | ||
composer.lock | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
.idea/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "hoaaah/yii2-ajaxcrud-bs4", | ||
"description": "Gii CRUD template for Single Page Ajax Administration for yii2", | ||
"type": "yii2-extension", | ||
"keywords": ["yii2","extension","ajax","crud","gii","template","database"], | ||
"license": "Apache-2.0", | ||
"authors": [ | ||
{ | ||
"name": "John Martin", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/johnitvn?tab=repositories" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/johnitvn/yii2-ajaxcrud/issues?state=open", | ||
"source": "https://github.com/johnitvn/yii2-ajaxcrud" | ||
}, | ||
"require": { | ||
"yiisoft/yii2": "*", | ||
"yiisoft/yii2-gii": "*", | ||
"yiisoft/yii2-bootstrap": "*", | ||
"kartik-v/yii2-grid": "^3.0.4", | ||
"kartik-v/yii2-mpdf": "^1.0.0", | ||
"kartik-v/yii2-editable": "^1.7.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"hoaaah\\ajaxcrud\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"bootstrap": "hoaaah\\ajaxcrud\\Bootstrap" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace hoaaah\ajaxcrud; | ||
|
||
use Yii; | ||
use yii\base\Application; | ||
use yii\base\BootstrapInterface; | ||
|
||
/** | ||
* @author John Martin <[email protected]> | ||
* @since 1.0 | ||
*/ | ||
class Bootstrap implements BootstrapInterface { | ||
|
||
/** | ||
* Bootstrap method to be called during application bootstrap stage. | ||
* | ||
* @param Application $app the application currently running | ||
*/ | ||
public function bootstrap($app) { | ||
Yii::setAlias("@ajaxcrud", __DIR__); | ||
Yii::setAlias("@hoaaah/ajaxcrud", __DIR__); | ||
if ($app->hasModule('gii')) { | ||
if (!isset($app->getModule('gii')->generators['ajaxcrud'])) { | ||
$app->getModule('gii')->generators['ajaxcrud'] = 'hoaaah\ajaxcrud\generators\Generator'; | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
namespace hoaaah\ajaxcrud; | ||
|
||
use yii\base\Widget; | ||
use yii\helpers\Html; | ||
|
||
class BulkButtonWidget extends Widget{ | ||
|
||
public $buttons; | ||
|
||
public function init(){ | ||
parent::init(); | ||
|
||
} | ||
|
||
public function run(){ | ||
$content = '<div class="pull-left">'. | ||
'<span class="glyphicon glyphicon-arrow-right"></span> With selected '. | ||
$this->buttons. | ||
'</div>'; | ||
return $content; | ||
} | ||
} | ||
?> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace hoaaah\ajaxcrud; | ||
|
||
use yii\web\AssetBundle; | ||
|
||
/** | ||
* @author John Martin <[email protected]> | ||
* @since 1.0 | ||
*/ | ||
class CrudAsset extends AssetBundle | ||
{ | ||
public $sourcePath = '@ajaxcrud/assets'; | ||
|
||
// public $publishOptions = [ | ||
// 'forceCopy' => true, | ||
// ]; | ||
|
||
public $css = [ | ||
'ajaxcrud.css' | ||
]; | ||
|
||
public $depends = [ | ||
'yii\web\YiiAsset', | ||
'yii\bootstrap\BootstrapAsset', | ||
'yii\bootstrap\BootstrapPluginAsset', | ||
'kartik\grid\GridViewAsset', | ||
]; | ||
|
||
public function init() { | ||
// In dev mode use non-minified javascripts | ||
$this->js = YII_DEBUG ? [ | ||
'ModalRemote.js', | ||
'ajaxcrud.js', | ||
]:[ | ||
'ModalRemote.min.js', | ||
'ajaxcrud.min.js', | ||
]; | ||
|
||
parent::init(); | ||
} | ||
} |
Oops, something went wrong.