Recent Topics

1 Nov 21, 2010 13:18    

My b2evolution Version: Not Entered

I need to insert and initiate some javascript on the admin side, mainly for enhancing usability and visuals of skin parameters.

Therefore i need a function like AdminEndHtmlHead that exists in plugins or a way to insert and initiate some javascript on the admin side, that i can use in the skin files.

2 Nov 21, 2010 16:04

class foo_Skin extends Skin{

function foo_Skin( $db_row = NULL, $skin_folder = NULL )
{
  parent::Skin( $db_row, $skin_folder );
  if( param( 'ctrl', 'string' ) == 'coll_settings' && param( 'tab', 'string' ) == 'skin_settings' )
  {
     require_js( 'whatever.js' );
  }
}

¥

3 Nov 25, 2010 21:08

¥åßßå wrote:

class foo_Skin extends Skin{

function foo_Skin( $db_row = NULL, $skin_folder = NULL )
{
  parent::Skin( $db_row, $skin_folder );
  if( param( 'ctrl', 'string' ) == 'coll_settings' && param( 'tab', 'string' ) == 'skin_settings' )
  {
     require_js( 'whatever.js' );
  }
}

¥

great. just a note the tab will be "skin" instead of "skin_settings"

4 Nov 28, 2010 01:53

Note: Also need an "AdminEndHtmlBody" function like SkinEndHtmlBody to execute javascripts those have to be right before body.

5 Nov 30, 2010 17:13

Why? Just use jQuery( document ).ready( function(){}); ?

¥

6 Nov 30, 2010 20:27

¥åßßå wrote:

Why? Just use jQuery( document ).ready( function(){}); ?

¥

well i have but somehow it did not work unless after it's executed after the selector i want to manipulate

7 Nov 30, 2010 20:58

Then you have a flaw in your code as the above executes after all "html" is loaded

¥

8 Nov 30, 2010 21:19

¥åßßå wrote:

Then you have a flaw in your code as the above executes after all "html" is loaded

¥

may be.. i finally got it working after reviewing my code, but it's still weird that it worked until after putting it below

9 Nov 30, 2010 21:42

Glad you found the flaw ;)

¥


Form is loading...