-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from GawainLynch/hotfix/updates
Updates
- Loading branch information
Showing
11 changed files
with
58 additions
and
88 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
### Colourpicker Extension for Bolt | ||
### ColourPicker Extension for Bolt | ||
|
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 |
---|---|---|
|
@@ -3,25 +3,30 @@ | |
"description": "An extension to add a colourpicker as a field type within Bolt", | ||
"type": "bolt-extension", | ||
"require": { | ||
"bolt/bolt": ">3.0,<4.0" | ||
"bolt/bolt": "^3.0" | ||
}, | ||
"license": "MIT", | ||
"authors": [{"name": "Ross Riley", "email": "[email protected]"} | ||
"authors": [ | ||
{ | ||
"name": "Ross Riley", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"keywords": [ | ||
"backend", "field", "colourpicker" | ||
"backend", | ||
"field", | ||
"colourpicker" | ||
], | ||
"minimum-stability":"dev", | ||
"prefer-stable":true, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"autoload": { | ||
"psr-4": { | ||
"Bolt\\Extensions\\Bolt\\Colourpicker\\": "src" | ||
"Bolt\\Extensions\\Bolt\\ColourPicker\\": "src" | ||
} | ||
}, | ||
|
||
"extra": { | ||
"bolt-class": "Bolt\\Extensions\\Bolt\\Colourpicker\\Extension", | ||
"bolt-assets": "assets", | ||
"bolt-class": "Bolt\\Extensions\\Bolt\\ColourPicker\\ColourPickerExtension", | ||
"bolt-screenshots": [ | ||
"screenshot.png" | ||
] | ||
|
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 @@ | ||
<?php | ||
|
||
namespace Bolt\Extensions\Bolt\ColourPicker; | ||
|
||
use Bolt\Asset\File\JavaScript; | ||
use Bolt\Asset\File\Stylesheet; | ||
use Bolt\Extension\SimpleExtension; | ||
use Bolt\Extensions\Bolt\ColourPicker\Field\ColourPickField; | ||
|
||
class ColourPickerExtension extends SimpleExtension | ||
{ | ||
protected function registerFields() | ||
{ | ||
return [ | ||
new ColourPickField(), | ||
]; | ||
} | ||
|
||
protected function registerTwigPaths() | ||
{ | ||
return [ | ||
'templates' => ['position' => 'prepend', 'namespace' => 'bolt'], | ||
]; | ||
} | ||
|
||
protected function registerAssets() | ||
{ | ||
return [ | ||
new Stylesheet('colourpicker.css'), | ||
new JavaScript('colourpicker.js'), | ||
new JavaScript('start.js'), | ||
]; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
<?php | ||
|
||
namespace Bolt\Extensions\Bolt\Colourpicker\Field; | ||
namespace Bolt\Extensions\Bolt\ColourPicker\Field; | ||
|
||
use Bolt\Field\FieldInterface; | ||
use Bolt\Storage\Field\FieldInterface; | ||
|
||
class ColourPickField implements FieldInterface | ||
{ | ||
public function getName() | ||
{ | ||
return 'colourpicker'; | ||
} | ||
|
||
public function getTemplate() | ||
{ | ||
return '_colourpicker.twig'; | ||
} | ||
|
||
public function getStorageType() | ||
{ | ||
return 'text'; | ||
} | ||
|
||
public function getStorageOptions() | ||
{ | ||
return array('default' => ''); | ||
return ['default' => '']; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<?php | ||
namespace Bolt\Extensions\Bolt\Colourpicker\Tests; | ||
namespace Bolt\Extensions\Bolt\ColourPicker\Tests; | ||
|
||
use Bolt\Tests\BoltUnitTest; | ||
use Bolt\Extensions\Bolt\Colourpicker\Extension; | ||
use Bolt\Extensions\Bolt\ColourPicker\Extension; | ||
|
||
/** | ||
* This test ensures the Colourpicker Loads correctly. | ||
* This test ensures the ColourPicker Loads correctly. | ||
* | ||
* @author Ross Riley <[email protected]> | ||
**/ | ||
|
||
class ColourpickerTest extends BoltUnitTest | ||
class ColourPickerTest extends BoltUnitTest | ||
{ | ||
public function testExtensionLoads() | ||
{ | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.