CS
This commit is contained in:
parent
55ceabbe52
commit
89478191be
@ -42,38 +42,38 @@ class HelperFormBootstrap
|
||||
|
||||
public function renderStyle()
|
||||
{
|
||||
$this->_style .= '<style type="text/css">';
|
||||
$this->_style .= "\n" . '<style type="text/css">' . "\n";
|
||||
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/ui-1.12.1/jquery-ui.min.css"); ';
|
||||
'/ui-1.12.1/jquery-ui.min.css"); ' . "\n";
|
||||
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/bootstrap-3.3.7/css/bootstrap.min.css"); ';
|
||||
'/bootstrap-3.3.7/css/bootstrap.min.css"); ' . "\n";
|
||||
|
||||
if ($this->_select2) {
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/select2-4.0.5/css/select2.min.css"); ';
|
||||
'/select2-4.0.5/css/select2.min.css"); ' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_dateTimePicker) {
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/bootstrap-datetimepicker-4.17.47/css/bootstrap-datetimepicker.min.css"); ';
|
||||
'/bootstrap-datetimepicker-4.17.47/css/bootstrap-datetimepicker.min.css"); ' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_inputTag) {
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/tagsinput-1.3.6/jquery.tagsinput.min.css"); ';
|
||||
'/tagsinput-1.3.6/jquery.tagsinput.min.css"); ' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_inputSwitch) {
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/switchery-0.8.2/switchery.min.css"); ';
|
||||
'/switchery-0.8.2/switchery.min.css"); ' . "\n";
|
||||
}
|
||||
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.'/custom.css"); ';
|
||||
$this->_style .= '@import url("'.__PS_BASE_URI__.$this->pathAssets.'/custom.css"); ' . "\n";
|
||||
|
||||
$this->_style .= $this->_css;
|
||||
$this->_style .= '</style>';
|
||||
$this->_style .= '</style>' . "\n";
|
||||
|
||||
return $this->_style;
|
||||
}
|
||||
@ -81,49 +81,49 @@ class HelperFormBootstrap
|
||||
public function renderScript()
|
||||
{
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/jquery-3.3.1.min.js"></script>';
|
||||
'/jquery-3.3.1.min.js"></script>' . "\n";
|
||||
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/ui-1.12.1/jquery-ui.min.js"></script>';
|
||||
'/ui-1.12.1/jquery-ui.min.js"></script>' . "\n";
|
||||
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/bootstrap-3.3.7/js/bootstrap.min.js"></script>';
|
||||
'/bootstrap-3.3.7/js/bootstrap.min.js"></script>' . "\n";
|
||||
|
||||
if ($this->_select2) {
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/select2-4.0.5/js/select2.full.min.js"></script>';
|
||||
'/select2-4.0.5/js/select2.full.min.js"></script>' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_dateTimePicker) {
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/moment-with-locales.min.js"></script>';
|
||||
'/moment-with-locales.min.js"></script>' . "\n";
|
||||
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/bootstrap-datetimepicker-4.17.47/js/bootstrap-datetimepicker.min.js"></script>';
|
||||
'/bootstrap-datetimepicker-4.17.47/js/bootstrap-datetimepicker.min.js"></script>' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_inputMask) {
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/inputmask-3.3.11/jquery.inputmask.bundle.min.js"></script>';
|
||||
'/inputmask-3.3.11/jquery.inputmask.bundle.min.js"></script>' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_inputTag) {
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/tagsinput-1.3.6/jquery.tagsinput.min.js"></script>';
|
||||
'/tagsinput-1.3.6/jquery.tagsinput.min.js"></script>' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_inputSwitch) {
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/switchery-0.8.2/switchery.min.js"></script>';
|
||||
'/switchery-0.8.2/switchery.min.js"></script>' . "\n";
|
||||
}
|
||||
|
||||
if ($this->_inputWizard) {
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.
|
||||
'/smartwizard-3.3.1/js/jquery.smartWizard.js"></script>';
|
||||
'/smartwizard-3.3.1/js/jquery.smartWizard.js"></script>' . "\n";
|
||||
}
|
||||
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.'/custom.js"></script>';
|
||||
$this->_script .= $this->_js;
|
||||
$this->_script .= '<script type="text/javascript" src="'.__PS_BASE_URI__.$this->pathAssets.'/custom.js"></script>' . "\n";
|
||||
$this->_script .= $this->_js . "\n";
|
||||
|
||||
return $this->_script;
|
||||
}
|
||||
@ -477,7 +477,7 @@ class HelperFormBootstrap
|
||||
|
||||
if(isset($p['multiple']) && $p['multiple']){
|
||||
$this->_html .='<script>
|
||||
$(document).ready(function() {
|
||||
$(function() {
|
||||
$("#'.(isset($p['id']) ? $p['id'] : $p['name']).'").select2({
|
||||
maximumSelectionLength: '.count($p['options']).',
|
||||
placeholder: "'.(isset($p['placeholder'])?$p['placeholder']:'').'",
|
||||
@ -495,7 +495,7 @@ class HelperFormBootstrap
|
||||
</script>';
|
||||
} else {
|
||||
$this->_html .='<script>
|
||||
$(document).ready(function() {
|
||||
$(function() {
|
||||
$("#'.(isset($p['id']) ? $p['id'] : $p['name']).'").select2({
|
||||
placeholder: "'.(isset($p['placeholder'])?$p['placeholder']:'').'",
|
||||
allowClear: true
|
||||
|
Loading…
Reference in New Issue
Block a user