Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CS for #10308 #9

Merged
merged 3 commits into from
May 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
206 changes: 96 additions & 110 deletions administrator/components/com_installer/views/install/tmpl/default.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* @package Joomla.Administrator
* @package Joomla.Administrator
* @subpackage com_installer
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;
Expand All @@ -15,62 +15,62 @@

JFactory::getDocument()->addScriptDeclaration(
'
Joomla.submitbutton4 = function() {
var form = document.getElementById("adminForm");
Joomla.submitbutton4 = function() {
var form = document.getElementById("adminForm");

// do field validation
if (form.install_url.value == "" || form.install_url.value == "http://" || form.install_url.value == "https://") {
alert("' . JText::_('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL', true) . '");
}
else
{
jQuery("#loading").css("display", "block");
form.installtype.value = "url";
form.submit();
}
};
// do field validation
if (form.install_url.value == "" || form.install_url.value == "http://" || form.install_url.value == "https://") {
alert("' . JText::_('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL', true) . '");
}
else
{
jQuery("#loading").css("display", "block");
form.installtype.value = "url";
form.submit();
}
};

Joomla.submitbuttonInstallWebInstaller = function() {
var form = document.getElementById("adminForm");
form.install_url.value = "https://appscdn.joomla.org/webapps/jedapps/webinstaller.xml";
Joomla.submitbutton4();
};
Joomla.submitbuttonInstallWebInstaller = function() {
var form = document.getElementById("adminForm");
form.install_url.value = "https://appscdn.joomla.org/webapps/jedapps/webinstaller.xml";
Joomla.submitbutton4();
};

// Add spindle-wheel for installations:
jQuery(document).ready(function($) {
var outerDiv = $("#installer-install");
$("#loading")
.css("top", outerDiv.position().top - $(window).scrollTop())
.css("left", outerDiv.position().left - $(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("display", "none");
});
'
// Add spindle-wheel for installations:
jQuery(document).ready(function($) {
var outerDiv = $("#installer-install");
$("#loading")
.css("top", outerDiv.position().top - $(window).scrollTop())
.css("left", outerDiv.position().left - $(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("display", "none");
});
'
);

JFactory::getDocument()->addStyleDeclaration(
'
#loading {
background: rgba(255, 255, 255, .8) url(\'' . JHtml::_('image', 'jui/ajax-loader.gif', '', null, true, true) . '\') 50% 15% no-repeat;
position: fixed;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80);
filter: alpha(opacity = 80);
margin: -10px -50px 0 -50px;
overflow: hidden;
}
.j-jed-message {
margin-bottom: 40px;
line-height: 2em;
color:#333333;
}
'
#loading {
background: rgba(255, 255, 255, .8) url(\'' . JHtml::_('image', 'jui/ajax-loader.gif', '', null, true, true) . '\') 50% 15% no-repeat;
position: fixed;
opacity: 0.8;
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80);
filter: alpha(opacity = 80);
margin: -10px -50px 0 -50px;
overflow: hidden;
}
.j-jed-message {
margin-bottom: 40px;
line-height: 2em;
color:#333333;
}
'
);

?>
Expand All @@ -91,74 +91,60 @@
</script>

<div id="installer-install" class="clearfix">
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_installer&view=install'); ?>"
method="post" name="adminForm" id="adminForm" class="form-horizontal">
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>

<!-- Render messages set by extension install scripts here -->
<?php if ($this->showMessage) : ?>
<?php echo $this->loadTemplate('message'); ?>
<?php elseif ($this->showJedAndWebInstaller) : ?>
<div class="alert alert-info j-jed-message"
style="margin-bottom: 40px; line-height: 2em; color:#333333;">
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_installer&view=install'); ?>"
method="post" name="adminForm" id="adminForm" class="form-horizontal">
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<!-- Render messages set by extension install scripts here -->
<?php if ($this->showMessage) : ?>
<?php echo $this->loadTemplate('message'); ?>
<?php elseif ($this->showJedAndWebInstaller) : ?>
<div class="alert alert-info j-jed-message"
style="margin-bottom: 40px; line-height: 2em; color:#333333;">
<?php echo JHtml::_(
'link',
JRoute::_('index.php?option=com_installer&view=discover' . urlencode(base64_encode(JUri::getInstance()))),
'&times;',
'class="close hasTooltip" data-dismiss="alert" title="' . str_replace('"', '&quot;', JText::_('COM_INSTALLER_SHOW_JED_INFORMATION_TOOLTIP')) . '"'
);
?>
<p><?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_INFO'); ?>
&nbsp;&nbsp;<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_TOS'); ?></p>
<input class="btn" type="button"
value="<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB'); ?>"
onclick="Joomla.submitbuttonInstallWebInstaller()"/>
</div>
<?php endif; ?>

<?php echo JHtml::_('bootstrap.startTabSet', 'myTab'); ?>

<?php
// Show installation tabs at the start
$firstTab = JEventDispatcher::getInstance()->trigger('onInstallerViewBeforeFirstTab', array());
?>
<?php
// Show installation tabs
$tabs = JEventDispatcher::getInstance()->trigger('onInstallerAddInstallationTab', array());
?>
<?php
// Show installation tabs at the end
$lastTab = JEventDispatcher::getInstance()->trigger('onInstallerViewAfterLastTab', array());
?>

<?php
$tabs = array_merge($firstTab, $tabs, $lastTab);

if (!$tabs)
{
JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_NO_INSTALLATION_PLUGINS_FOUND'), 'warning');
}
?>
<p><?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_INFO'); ?>
&nbsp;&nbsp;<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_TOS'); ?></p>
<input class="btn" type="button"
value="<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB'); ?>"
onclick="Joomla.submitbuttonInstallWebInstaller()"/>
</div>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab'); ?>
<?php // Show installation tabs at the start ?>
<?php $firstTab = JEventDispatcher::getInstance()->trigger('onInstallerViewBeforeFirstTab', array()); ?>
<?php // Show installation tabs ?>
<?php $tabs = JEventDispatcher::getInstance()->trigger('onInstallerAddInstallationTab', array()); ?>
<?php // Show installation tabs at the end ?>
<?php $lastTab = JEventDispatcher::getInstance()->trigger('onInstallerViewAfterLastTab', array()); ?>
<?php $tabs = array_merge($firstTab, $tabs, $lastTab); ?>
<?php if (!$tabs) : ?>
<?php JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_NO_INSTALLATION_PLUGINS_FOUND'), 'warning'); ?>
<?php endif; ?>

<?php if ($this->ftp) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'ftp', JText::_('COM_INSTALLER_MSG_DESCFTPTITLE', true)); ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->ftp) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'ftp', JText::_('COM_INSTALLER_MSG_DESCFTPTITLE', true)); ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<input type="hidden" name="installtype" value=""/>
<input type="hidden" name="task" value="install.install"/>
<?php echo JHtml::_('form.token'); ?>
<input type="hidden" name="installtype" value=""/>
<input type="hidden" name="task" value="install.install"/>
<?php echo JHtml::_('form.token'); ?>

<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</div>
</form>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
</div>
</form>
</div>
<div id="loading"></div>
2 changes: 1 addition & 1 deletion plugins/installer/packageinstaller/packageinstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PlgInstallerPackageInstaller extends JPlugin
* Recognized key values include 'name', 'group', 'params', 'language'
* (this list is not meant to be comprehensive).
*
* @since 1.5
* @since 3.6.0
*/
public function __construct(&$subject, $config = array())
{
Expand Down
2 changes: 1 addition & 1 deletion plugins/installer/urlinstaller/urlinstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PlgInstallerUrlInstaller extends JPlugin
* Recognized key values include 'name', 'group', 'params', 'language'
* (this list is not meant to be comprehensive).
*
* @since 1.5
* @since 3.6.0
*/
public function __construct(&$subject, $config = array())
{
Expand Down