Skip to content

Commit

Permalink
work around for custom less until fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Powers committed May 21, 2013
1 parent 29c13b1 commit a894962
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions editor/editor.interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function __construct( PageLinesPage $pg, EditorSettings $siteset, EditorDraft $d

}


$this->url = PL_PARENT_URL . '/editor';
$this->images = $this->url . '/images';

Expand Down
11 changes: 9 additions & 2 deletions editor/panel.code.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,19 @@ function __construct( ){
add_filter('pl_toolbar_config', array(&$this, 'toolbar'));
add_action('pagelines_editor_scripts', array(&$this, 'scripts'));

add_action( 'wp_enqueue_scripts', array( &$this, 'load_less_js' ) );

add_action( 'pagelines_head_last', array( &$this, 'draw_custom_styles' ), 200 );

add_action( 'pagelines_head_last', array( &$this, 'draw_custom_scripts' ) );

$this->url = PL_PARENT_URL . '/editor';
}

function load_less_js(){
wp_enqueue_script( 'pl-less-parser', $this->url . '/js/utils.less.js', array( 'jquery' ), PL_CORE_VERSION, true );
}

function scripts(){

// Codemirror Styles
Expand All @@ -32,7 +39,7 @@ function scripts(){
// PageLines Specific JS @Code Stuff
wp_enqueue_script( 'pl-js-code', $this->url . '/js/pl.code.js', array( 'jquery', 'codemirror' ), PL_CORE_VERSION, true );

wp_enqueue_script( 'pl-less-parser', $this->url . '/js/utils.less.js', array( 'jquery' ), PL_CORE_VERSION, true );

}

function toolbar( $toolbar ){
Expand All @@ -45,7 +52,7 @@ function toolbar( $toolbar ){
'heading' => "Custom Design",

'user_less' => array(
'name' => 'Custom CSS',
'name' => 'Custom LESS/CSS',
'call' => array(&$this, 'custom_less'),
'icon' => 'icon-circle'
),
Expand Down

0 comments on commit a894962

Please sign in to comment.