Skip to content

Commit

Permalink
create project
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Jun 5, 2015
1 parent 878ed20 commit 8bc5c81
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 57 deletions.
13 changes: 7 additions & 6 deletions CodemirrorAsset.php
@@ -1,17 +1,18 @@
<?php
/**
* @link https://github.com/borodulin/yii2-codemirror
* @copyright Copyright (c) 2015 Andrey Borodulin
* @license https://github.com/borodulin/yii2-codemirror/blob/master/LICENSE.md
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 05.06.2015
*/
namespace conquer\codemirror;
namespace skeeks\widget\codemirror;

use yii\web\View;
use yii\helpers\ArrayHelper;

/**
* @author Andrey Borodulin
* @link http://codemirror.net/
* Class CodemirrorAsset
* @package skeeks\widget\codemirror
*/
class CodemirrorAsset extends \yii\web\AssetBundle
{
Expand Down
14 changes: 8 additions & 6 deletions CodemirrorWidget.php
@@ -1,18 +1,20 @@
<?php
/**
* @link https://github.com/borodulin/yii2-codemirror
* @copyright Copyright (c) 2015 Andrey Borodulin
* @license https://github.com/borodulin/yii2-codemirror/blob/master/LICENSE.md
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 05.06.2015
*/
namespace conquer\codemirror;
namespace skeeks\widget\codemirror;

use yii\helpers\Html;
use yii\web\JsExpression;
use yii\helpers\ArrayHelper;
use conquer\helpers\Json;
use yii\helpers\Json;

/**
* @author Andrey Borodulin
* Class CodemirrorWidget
* @package skeeks\widget\codemirror
*/
class CodemirrorWidget extends \yii\widgets\InputWidget
{
Expand Down
45 changes: 28 additions & 17 deletions LICENSE.md
@@ -1,21 +1,32 @@
The MIT License (MIT)
The Yii framework is free software. It is released under the terms of
the following BSD License.

Copyright (c) 2015 Andrey Borodulin
Copyright © 2010 by SkeekS (http://www.skeeks.com)
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Yii Software LLC nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -13,20 +13,20 @@ The preferred way to install this extension is through [composer](http://getcomp
To install, either run

```
$ php composer.phar require conquer/codemirror "*"
$ php composer.phar require skeeks/yii2-widget-codemirror "*"
```
or add

```
"conquer/codemirror": "*"
"skeeks/yii2-widget-codemirror": "*"
```

to the ```require``` section of your `composer.json` file.

## Usage

```php
use conquer\codemirror\CodemirrorWidget;
use skeeks\widget\codemirror\CodemirrorWidget;

$form->field($model, 'code')->widget(
CodemirrorWidget::className(),
Expand All @@ -40,7 +40,7 @@ $form->field($model, 'code')->widget(
You can use ready-made presets, or create your own. To do this, specify the folder to your presets.

```php
use conquer\codemirror\CodemirrorWidget;
use skeeks\widget\codemirror\CodemirrorWidget;

$form->field($model, 'code')->widget(
CodemirrorWidget::className(),
Expand All @@ -54,8 +54,8 @@ $form->field($model, 'code')->widget(
In general, you can customize the widget directly specifying its properties.

```php
use conquer\codemirror\CodemirrorWidget;
use conquer\codemirror\CodemirrorAsset;
use skeeks\widget\codemirror\CodemirrorWidget;
use skeeks\widget\codemirror\CodemirrorAsset;

$form->field($model, 'code')->widget(
CodemirrorWidget::className(),
Expand Down
20 changes: 6 additions & 14 deletions composer.json
@@ -1,31 +1,23 @@
{
"name": "conquer/codemirror",
"name": "skeeks/yii2-widget-codemirror",
"description": "Yii2 codemirror widget",
"keywords": ["yii2", "extension", "widget", "codemirror"],
"homepage": "https://github.com/borodulin/yii2-codemirror",
"homepage": "http://git.skeeks.com/skeeks/yii2-widget-codemirror",
"type": "yii2-extension",
"license": "MIT",
"license": "BSD 3-Clause",
"authors": [
{
"name": "Andrey Borodulin",
"email": "borodulin@gmail.com",
"homepage": "https://github.com/borodulin/yii2-codemirror"
"name": "Semenov Alexander",
"email": "semenov@skeeks.com"
}
],
"extra": {
"branch-alias": {
"dev-master": "1.2.7.x-dev"
}
},
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"conquer/helpers": "~1.0.0",
"bower-asset/codemirror": "*"
},
"autoload": {
"psr-4": {
"conquer\\codemirror\\": ""
"skeeks\\widget\\codemirror\\": ""
}
}
}
9 changes: 5 additions & 4 deletions presets/JavascriptPreset.php
@@ -1,10 +1,11 @@
<?php
/**
* @link https://github.com/borodulin/yii2-codemirror
* @copyright Copyright (c) 2015 Andrey Borodulin
* @license https://github.com/borodulin/yii2-codemirror/blob/master/LICENSE.md
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 05.06.2015
*/
use conquer\codemirror\CodemirrorAsset;
use skeeks\widget\codemirror\CodemirrorAsset;

return [
'assets'=>[
Expand Down
9 changes: 5 additions & 4 deletions presets/PhpPreset.php
@@ -1,10 +1,11 @@
<?php
/**
* @link https://github.com/borodulin/yii2-codemirror
* @copyright Copyright (c) 2015 Andrey Borodulin
* @license https://github.com/borodulin/yii2-codemirror/blob/master/LICENSE.md
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 05.06.2015
*/
use conquer\codemirror\CodemirrorAsset;
use skeeks\widget\codemirror\CodemirrorAsset;
use yii\web\JsExpression;
return [
'assets'=>[
Expand Down

0 comments on commit 8bc5c81

Please sign in to comment.