Skip to content

Commit

Permalink
fixes, remove webcomponets
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Sep 1, 2017
1 parent 727401a commit ddb59ac
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 982 deletions.
6 changes: 1 addition & 5 deletions installation/template/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidator');
JHtml::_('script', 'installation/template/js/template.js', ['version' => 'auto']);
JHtml::_('script', 'installation/template/js/wc-loader.min.js', ['version' => 'auto']);
//JHtml::_('webcomponent', ['joomla-alert' => 'system/joomla-alert.min.js'], ['version' => 'auto', 'relative' => true]);

// Add script options
$this->addScriptOptions('system.installation', ['url' => JRoute::_('index.php')]);
$this->addScriptOptions(
'webcomponents',
['joomla-alert' => JHtml::_('script', 'installation/template/js/joomla-alert.min.js', ['relative' => false, 'pathOnly' => true])]
);

// Load JavaScript message titles
JText::script('ERROR');
Expand Down
63 changes: 0 additions & 63 deletions installation/template/js/joomla-alert.js

This file was deleted.

1 change: 0 additions & 1 deletion installation/template/js/joomla-alert.min.js

This file was deleted.

11 changes: 8 additions & 3 deletions installation/template/js/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var url = Joomla.getOptions('system.installation').url ? Joomla.getOptions('syst

if (document.getElementById('installAddFeatures')) {
document.getElementById('installAddFeatures').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installLanguages').classList.add('active');
document.getElementById('installCongrat').classList.remove('active');
document.getElementById('installRecommended').classList.remove('active');
Expand All @@ -11,21 +12,25 @@ if (document.getElementById('installAddFeatures')) {

if (document.getElementById('skipLanguages')) {
document.getElementById('skipLanguages').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}

if (document.getElementById('installSampleData')) {
document.getElementById('installSampleData').addEventListener('click', function(e) {
document.getElementById('installLanguages').classList.add('active');
document.getElementById('installSampleData').classList.remove('active');
e.preventDefault();
document.getElementById('installSampleData').classList.add('active');
document.getElementById('installLanguages').classList.remove('active');
})
}

if (document.getElementById('skipSampleData')) {
document.getElementById('skipSampleData').addEventListener('click', function(e) {
e.preventDefault();
document.getElementById('installSampleData').classList.toggle('active');
document.getElementById('installSampleData').style.display = 'none';
document.getElementById('installFinal').classList.add('active');
document.getElementById('installSampleData').classList.remove('active');
})
}
4 changes: 2 additions & 2 deletions installation/template/js/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Joomla.checkInputs = function() {


if (Joomla.checkFormField(['#jform_site_name', '#jform_admin_user', '#jform_admin_email', '#jform_admin_password', '#jform_db_type', '#jform_db_host', '#jform_db_user', '#jform_db_name'])) {
console.log('hdfgh')
console.log('hdfgh')
Install.checkDbCredentials();
}
};
Expand Down Expand Up @@ -318,7 +318,7 @@ window.Install = new Joomla.installation(
document.getElementById('jform_site_name').focus();
}

// Are we in the main form?
// Are we in the main form?
if (document.getElementById('jform_admin_password')) {
var elemmm = document.getElementById('jform_admin_password').parentNode;
elemmm.querySelector('span.input-group-addon').addEventListener('click', function(e) {
Expand Down
21 changes: 11 additions & 10 deletions installation/template/js/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@
// Check for FTP credentials
Joomla.installation = Joomla.installation || {};

// @todo FTP persistent data ?
// Initialize the FTP installation data
if (sessionStorage && sessionStorage.getItem('installation-data')) {
var data = sessionStorage.getItem('installData').split(',');
Joomla.installation.data = {
ftpUsername: data[0],
ftpPassword: data[1],
ftpHost: data[2],
ftpPort: data[3],
ftpRoot: data[4]
};
}
// if (sessionStorage && sessionStorage.getItem('installation-data')) {
// var data = sessionStorage.getItem('installData').split(',');
// Joomla.installation.data = {
// ftpUsername: data[0],
// ftpPassword: data[1],
// ftpHost: data[2],
// ftpPort: data[3],
// ftpRoot: data[4]
// };
// }
return 'Loaded...'
};

Expand Down
84 changes: 0 additions & 84 deletions installation/template/js/wc-loader.js

This file was deleted.

Loading

0 comments on commit ddb59ac

Please sign in to comment.