silverstripe 4 compatibility

This commit is contained in:
Daniel Taege 2017-06-09 09:14:28 +02:00
parent 6f71cd8d47
commit bf5686e2ef
4 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,3 @@
<?php <?php
define('FONT_AWESOME_DIR', ltrim(Director::makeRelative(realpath(__DIR__)), DIRECTORY_SEPARATOR)); define('FONT_AWESOME_DIR', ltrim(\SilverStripe\Control\Director::makeRelative(realpath(__DIR__)), DIRECTORY_SEPARATOR));

View File

@ -1,5 +1,8 @@
<?php <?php
use SilverStripe\Core\Extension;
use SilverStripe\View\Requirements;
/** /**
* Class FontAwesomeControllerExtension * Class FontAwesomeControllerExtension
*/ */

View File

@ -1,5 +1,10 @@
<?php <?php
namespace SilverStripe\FontAwesome;
use SilverStripe\Forms\TextField;
use SilverStripe\View\Requirements;
/** /**
* Class FontAwesomeField * Class FontAwesomeField
*/ */
@ -23,7 +28,6 @@ class FontAwesomeField extends TextField
$this->addExtraClass('form-control icp icp-auto'); $this->addExtraClass('form-control icp icp-auto');
//Libraries //Libraries
Requirements::css(FONT_AWESOME_DIR . '/css/lib/bootstrap.min.css');
Requirements::css(FONT_AWESOME_DIR . '/css/lib/font-awesome.min.css'); Requirements::css(FONT_AWESOME_DIR . '/css/lib/font-awesome.min.css');
Requirements::css(FONT_AWESOME_DIR . '/css/lib/font-awesome-iconpicker.min.css'); Requirements::css(FONT_AWESOME_DIR . '/css/lib/font-awesome-iconpicker.min.css');
Requirements::javascript(FONT_AWESOME_DIR . '/js/lib/font-awesome-iconpicker.min.js'); Requirements::javascript(FONT_AWESOME_DIR . '/js/lib/font-awesome-iconpicker.min.js');

View File

@ -1,9 +1,3 @@
* {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.iconpicker-popover.popover { .iconpicker-popover.popover {
width: 512px; width: 512px;
} }