Skip to content

Commit

Permalink
Merge pull request #11 from sminnee/3.1-fixes
Browse files Browse the repository at this point in the history
3.1 fixes
  • Loading branch information
nyeholt committed May 30, 2013
2 parents 709d0dd + 5b5a2f3 commit b937354
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
18 changes: 11 additions & 7 deletions code/controllers/ExternalContentAdmin.php
@@ -1,8 +1,5 @@
<?php

define('EXTERNALCONTENT', 'external-content');


/**
* Backend administration pages for the external content module
*
Expand All @@ -16,12 +13,17 @@ class ExternalContentAdmin extends LeftAndMain implements CurrentPageIdentifier,
*/
const URL_STUB = 'extadmin';

/**
* The directory that the module is assuming it's installed in to.
*/
static $directory = 'external-content';

/**
* URL segment used by the backend
*
* @var string
*/
static $url_segment = EXTERNALCONTENT;
static $url_segment = 'external-content';
static $url_rule = '$Action//$ID';
static $menu_title = 'External Content';
public static $tree_class = 'ExternalContentSource';
Expand All @@ -36,16 +38,18 @@ class ExternalContentAdmin extends LeftAndMain implements CurrentPageIdentifier,
'migrate',
'download',
'view',
'treeview'
'treeview',
'EditForm',
'AddForm'
);


public function init(){
parent::init();
Requirements::css(CMS_DIR . '/css/screen.css');
Requirements::customCSS($this->generatePageIconsCss());
Requirements::css(EXTERNALCONTENT . '/css/external-content-admin.css');
Requirements::javascript(EXTERNALCONTENT . '/javascript/external-content-admin.js');
Requirements::css(self::$directory . '/css/external-content-admin.css');
Requirements::javascript(self::$directory . '/javascript/external-content-admin.js');
}


Expand Down
2 changes: 1 addition & 1 deletion code/extensions/ExternalContentHtmlEditorExtension.php
Expand Up @@ -9,7 +9,7 @@
class ExternalContentHtmlEditorExtension extends Extension {

public function updateLinkForm(Form $form) {
Requirements::javascript(EXTERNALCONTENT . "/javascript/external_tiny_mce_improvements.js");
Requirements::javascript(ExternalContentAdmin::$directory . "/javascript/external_tiny_mce_improvements.js");

$fields = $form->Fields();
$fields->replaceField('LinkType', $options = new OptionsetField(
Expand Down
2 changes: 1 addition & 1 deletion code/forms/ExternalHtmlEditorField_Toolbar.php
Expand Up @@ -25,7 +25,7 @@ function __construct($controller, $name) {
*/
function LinkForm() {
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js");
Requirements::javascript(EXTERNALCONTENT . "/javascript/external_tiny_mce_improvements.js");
Requirements::javascript(ExternalContentAdmin::$directory . "/javascript/external_tiny_mce_improvements.js");

$form = new Form(
$this->controller,
Expand Down

0 comments on commit b937354

Please sign in to comment.