FIX Add and optimise namespaces

This commit is contained in:
Raissa North 2017-12-18 16:30:49 +13:00
parent 0916970951
commit 285b46fafb
7 changed files with 8 additions and 21 deletions

View File

@ -1,19 +1,19 @@
en: en:
Widget: SilverStripe\Widgets\Model\Widget:
PLURALNAME: Widgets PLURALNAME: Widgets
SINGULARNAME: Widget SINGULARNAME: Widget
WidgetArea: SilverStripe\Widgets\Model\WidgetArea:
PLURALNAME: 'Widget Areas' PLURALNAME: 'Widget Areas'
SINGULARNAME: 'Widget Area' SINGULARNAME: 'Widget Area'
WidgetAreaEditor_ss: SilverStripe\Widgets\Templates\SilverStripe\Widgets\Forms\WidgetAreaEditor_ss:
AVAILABLE: 'Available Widgets' AVAILABLE: 'Available Widgets'
AVAILWIDGETS: 'Click a widget title below to use it on this page.' AVAILWIDGETS: 'Click a widget title below to use it on this page.'
INUSE: 'Widgets currently used' INUSE: 'Widgets currently used'
NOAVAIL: 'There are currently no widgets available.' NOAVAIL: 'There are currently no widgets available.'
TOSORT: 'To sort currently used widgets on this page, drag them up and down.' TOSORT: 'To sort currently used widgets on this page, drag them up and down.'
WidgetDescription_ss: SilverStripe\Widgets\Templates\WidgetDescription_ss:
CLICKTOADDWIDGET: 'Click to add this widget' CLICKTOADDWIDGET: 'Click to add this widget'
WidgetEditor_ss: SilverStripe\Widgets\Templates\WidgetEditor_ss:
DELETE: Delete DELETE: Delete
WidgetPageExtension: WidgetPageExtension:
INHERITSIDEBAR: 'Inherit Sidebar From Parent' INHERITSIDEBAR: 'Inherit Sidebar From Parent'

View File

@ -6,8 +6,6 @@ use SilverStripe\Admin\LeftAndMain;
use SilverStripe\Control\Controller; use SilverStripe\Control\Controller;
use SilverStripe\Control\Director; use SilverStripe\Control\Director;
use SilverStripe\Core\ClassInfo; use SilverStripe\Core\ClassInfo;
use SilverStripe\i18n\i18n;
use SilverStripe\Security\Member;
use SilverStripe\Widgets\Model\Widget; use SilverStripe\Widgets\Model\Widget;
/** /**

View File

@ -10,7 +10,6 @@ use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\HiddenField; use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\TextField; use SilverStripe\Forms\TextField;
use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObject;
use SilverStripe\Widgets\Model\WidgetArea;
/** /**
* Widgets let CMS authors drag and drop small pieces of functionality into * Widgets let CMS authors drag and drop small pieces of functionality into

View File

@ -4,7 +4,6 @@ namespace SilverStripe\Widgets\Model;
use SilverStripe\ORM\ArrayList; use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObject;
use SilverStripe\Widgets\Model\Widget;
/** /**
* Represents a set of widgets shown on a page. * Represents a set of widgets shown on a page.

View File

@ -2,17 +2,14 @@
namespace SilverStripe\Widgets\Tests; namespace SilverStripe\Widgets\Tests;
use Page;
use SilverStripe\CMS\Controllers\ContentController; use SilverStripe\CMS\Controllers\ContentController;
use SilverStripe\CMS\Model\SiteTree; use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPRequest;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\FieldList; use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form; use SilverStripe\Forms\Form;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Widgets\Extensions\WidgetPageExtension; use SilverStripe\Widgets\Extensions\WidgetPageExtension;
use SilverStripe\Widgets\Forms\WidgetAreaEditor; use SilverStripe\Widgets\Forms\WidgetAreaEditor;
use SilverStripe\Widgets\Model\Widget;
use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\FakePage; use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\FakePage;
use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\TestWidget; use SilverStripe\Widgets\Tests\WidgetAreaEditorTest\TestWidget;

View File

@ -3,13 +3,7 @@
namespace SilverStripe\Widgets\Tests; namespace SilverStripe\Widgets\Tests;
use SilverStripe\Dev\FunctionalTest; use SilverStripe\Dev\FunctionalTest;
use SilverStripe\Widgets\Model\Widget;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Forms\TextField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\Form; use SilverStripe\Forms\Form;
use SilverStripe\Widgets\Controllers\WidgetController;
use SilverStripe\Widgets\Tests\WidgetControllerTest\TestPage; use SilverStripe\Widgets\Tests\WidgetControllerTest\TestPage;
use SilverStripe\Widgets\Tests\WidgetControllerTest\TestWidget; use SilverStripe\Widgets\Tests\WidgetControllerTest\TestWidget;
@ -35,7 +29,7 @@ class WidgetControllerTest extends FunctionalTest
$response = $this->get($page->URLSegment); $response = $this->get($page->URLSegment);
$formAction = sprintf('%s/widget/%d/Form', $page->URLSegment, $widget->ID); $formAction = sprintf('%s/widget/%d/%s', $page->URLSegment, $widget->ID, 'Form');
$this->assertContains( $this->assertContains(
$formAction, $formAction,
$response->getBody(), $response->getBody(),

View File

@ -23,7 +23,7 @@ class TestWidgetController extends WidgetController implements TestOnly
{ {
$widgetform = new Form( $widgetform = new Form(
$this, $this,
'Form', __FUNCTION__,
new FieldList( new FieldList(
new TextField('TestValue') new TextField('TestValue')
), ),