theillo Posted December 14, 2016 Share Posted December 14, 2016 Trying to get a basic jquery ui example working... Neither of those are working: $(document).ready(function(){ $( "#date" ).datepicker(); }); $( function() { $( "#date" ).datepicker(); } ); All the libraries are included, all the scripts are loaded in the right order... Link to comment Share on other sites More sharing options...
theillo Posted December 15, 2016 Author Share Posted December 15, 2016 So I disabled ALL the modules. Still same error... WTF? Link to comment Share on other sites More sharing options...
theillo Posted December 15, 2016 Author Share Posted December 15, 2016 Okay I'm loading it from google and now it's working. Let's see for how long - once I include the other modules again it probably breaks again. grr $this->context->controller->addCSS('https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css'); $this->context->controller->addJS('https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js'); Link to comment Share on other sites More sharing options...
theillo Posted December 16, 2016 Author Share Posted December 16, 2016 Now, as I learned on stackoverflow, the reason it wasn't working is because you have to include each plugin/component of jquery ui separately. so datepicker is a whole different file, that needs to be included separately. Link to comment Share on other sites More sharing options...
DD_DD2 Posted December 20, 2016 Share Posted December 20, 2016 It depends on your Prestashop version. 1.6 or 1.7 ? 1 Link to comment Share on other sites More sharing options...
theillo Posted December 22, 2016 Author Share Posted December 22, 2016 It depends on your Prestashop version. 1.6 or 1.7 ? Thanks for your response, I am using 1.6.10 I am now having more problems like this in back office. If I use the google hosted library, it breaks in back office. If I use ALL the prestashop included libraries, it breaks. If I manage to include all libraries without breaking it, there won't be any errors in the console, but it will not do .menu(); -.- More details in my stackoverflow question: http://stackoverflow.com/questions/41290138/jquery-ui-menu-not-working-in-prestashop-back-office Link to comment Share on other sites More sharing options...
DD_DD2 Posted December 26, 2016 Share Posted December 26, 2016 Hi Theillo About datepicker, jquery.ui.datepicker.min.js should be loaded. But I can't see it in your screenshot. Have you tried out "$this->context->controller->addJqueryUI('ui.datepicker');" in your module ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now