Jump to content

Override Jquery UI CSS


Recommended Posts

Hello,

 

I've included the jQuery UI Tabs using the method recommended in the controller (in override of course)

$ this-> addJqueryUI ('ui.tabs');

 

Now, I would change the CSS which handles tabs (or any UI).

By default, the CSS used is present in the /js/jquery/ui/themes/THEME_NAME (default 'base').

 

What is the best method to deploy my own CSS?

  • creating a new theme /js/jquery/ui/themes/ ? For me the best method, but what about updating Prestashop?
  • creating a CSS file in my theme Prestashop? Yes, but where? /themes/my_theme/css/? In a subfolder?

This question is for all overloads jQuery: jQuery UI or jQuery plugins.

 

Thank you

  • Like 1
Link to comment
Share on other sites

  • 5 months later...
  • 1 year later...
  • 6 months later...
  On 11/13/2012 at 4:21 AM, Jude_AAZ said:

Hello,

 

I've included the jQuery UI Tabs using the method recommended in the controller (in override of course)

$ this-> addJqueryUI ('ui.tabs');
Now, I would change the CSS which handles tabs (or any UI).

By default, the CSS used is present in the /js/jquery/ui/themes/THEME_NAME (default 'base').

 

What is the best method to deploy my own CSS?

  • creating a new theme /js/jquery/ui/themes/ ? For me the best method, but what about updating Prestashop?
  • creating a CSS file in my theme Prestashop? Yes, but where? /themes/my_theme/css/? In a subfolder?
This question is for all overloads jQuery: jQuery UI or jQuery plugins.

 

Thank you

 

 

I start with: 

 

public function setMedia()
{
parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'identity.css');
$this->addJqueryUi(array('ui.slider', 'ui.tabs'));
$this->addJS(_PS_JS_DIR_.'validate.js');}

in Controller.

 

Slider and tabs display with jquery style's only

if i add this tag to .tpl:

(i try copy content of this css but to own css, but don't know where):

 <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

Where to put it?

In theme/css i add jquery-ui.css

and paste the content of tag file

and use

$this->addCSS(_THEME_CSS_DIR_.'jquery-ui.css');

but i have img problem:

 

post-100199-0-86074300-1427786978_thumb.jpg

 

How to make it use default Prestashop css files - path

Maybe there is some thing like?:

$this->addCSS(_PS_CSS_DIR_.'jquery-ui.css');

post-100199-0-86074300-1427786978_thumb.jpg

Edited by miki22 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...