|
From: <be...@us...> - 2014-02-15 22:28:37
|
Revision: 12316
http://sourceforge.net/p/xoops/svn/12316
Author: beckmi
Date: 2014-02-15 22:28:32 +0000 (Sat, 15 Feb 2014)
Log Message:
-----------
Updating to Version 1.0 Final
Modified Paths:
--------------
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/about.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_footer.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_header.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/index.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/menu.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt
XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/credits.txt
XoopsModules/moduleinstaller/trunk/moduleinstaller/include/common.inc.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/include/config.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/include/install_tpl.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/include/page.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/install.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php
Added Paths:
-----------
XoopsModules/moduleinstaller/trunk/moduleinstaller/js/prototype.js
Removed Paths:
-------------
XoopsModules/moduleinstaller/trunk/moduleinstaller/js/prototype-1.6.0.3.js
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/about.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/about.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/about.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -25,4 +25,4 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include 'admin_footer.php';
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_footer.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_footer.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_footer.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -24,4 +24,4 @@
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
-xoops_cp_footer();;
\ No newline at end of file
+xoops_cp_footer();;
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_header.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_header.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/admin_header.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -34,8 +34,8 @@
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) {
include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
- }else{
+ } else {
redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
- }
\ No newline at end of file
+ }
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/index.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/index.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/index.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -21,10 +21,9 @@
include 'admin_header.php';
xoops_cp_header();
- $indexAdmin = new ModuleAdmin();
+ $indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
-include "admin_footer.php";
-?>
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -23,10 +23,10 @@
defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
if (!@include_once "../../../language/{$wizard->language}/global.php") {
- include_once "../../../language/english/global.php";
+ include_once '../../../language/english/global.php';
}
if (!@include_once "../../system/language/{$wizard->language}/admin/modulesadmin.php") {
- include_once "../../system/language/english/admin/modulesadmin.php";
+ include_once '../../system/language/english/admin/modulesadmin.php';
}
require_once '../../../class/xoopsformloader.php';
require_once '../../../class/xoopslists.php';
@@ -115,7 +115,7 @@
$content .= "<tr id='" . $file . "'" . $style . ">\n";
$content .= " <td class='img' ><img src='" . XOOPS_URL . "/modules/" . $module->getInfo('dirname') . "/" . $module->getInfo('image') . "' alt='" . $module->getInfo('name') . "'/></td>\n";
$content .= " <td>";
- $content .= " " . $module->getInfo('name') . " " . number_format( round($module->getInfo('version'), 2), 2) . " (" . $module->getInfo('dirname') . ")";
+ $content .= " " . $module->getInfo('name') . " " . number_format( round($module->getInfo('version'), 2), 2) . " " . $module->getInfo('module_status') . " (folder: /" . $module->getInfo('dirname') . ")";
$content .= " <br />" . $module->getInfo('description');
$content .= " </td>\n";
$content .= " <td class='yesno'>";
@@ -136,4 +136,3 @@
include './../include/install_tpl.php';
include 'admin_footer.php';
-?>
\ No newline at end of file
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/menu.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/menu.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/menu.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -15,16 +15,16 @@
$adminmenu[$i]["title"] = _MI_INSTALLER_MENU_00;
$adminmenu[$i]["link"] = 'admin/index.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_INSTALLER_MENU_01;
// $adminmenu[$i]["link"] = 'admin/page_moduleinstaller.php';
$adminmenu[$i]["link"] = 'admin/install.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/add.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_INSTALLER_MENU_02;
$adminmenu[$i]["link"] = 'admin/uninstall.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/delete.png';
-$i++;
+++$i;
$adminmenu[$i]["title"] = _MI_INSTALLER_ADMIN_ABOUT;
$adminmenu[$i]["link"] = 'admin/about.php';
$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -23,10 +23,10 @@
defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
if (!@include_once "../../../language/{$wizard->language}/global.php") {
- include_once "../../../language/english/global.php";
+ include_once '../../../language/english/global.php';
}
if (!@include_once "../../system/language/{$wizard->language}/admin/modulesadmin.php") {
- include_once "../../system/language/english/admin/modulesadmin.php";
+ include_once '../../system/language/english/admin/modulesadmin.php';
}
require_once '../../../class/xoopsformloader.php';
require_once '../../../class/xoopslists.php';
@@ -91,6 +91,8 @@
$javascript = "";
$content = "<ul class='log'><li>";
$content .= "<table class='module'>\n";
+ //remove System module and itself from the list of modules that can be uninstalled
+ $dirlist = array_diff($dirlist, array('system', 'moduleinstaller'));
foreach ($dirlist as $file) {
clearstatcache();
if (in_array($file, $listed_mods)) {
@@ -115,7 +117,7 @@
$content .= "<tr id='" . $file . "'" . $style . ">\n";
$content .= " <td class='img' ><img src='" . XOOPS_URL . "/modules/" . $module->getInfo('dirname') . "/" . $module->getInfo('image') . "' alt='" . $module->getInfo('name') . "'/></td>\n";
$content .= " <td>";
- $content .= " " . $module->getInfo('name') . " " . number_format( round($module->getInfo('version'), 2), 2) . " (" . $module->getInfo('dirname') . ")";
+ $content .= " " . $module->getInfo('name') . " " . number_format( round($module->getInfo('version'), 2), 2) . " " . $module->getInfo('module_status') . " (folder: /" . $module->getInfo('dirname') . ")";
$content .= " <br />" . $module->getInfo('description');
$content .= " </td>\n";
$content .= " <td class='yesno'>";
@@ -136,4 +138,3 @@
include './../include/install_tpl.php';
include 'admin_footer.php';
-?>
\ No newline at end of file
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -86,6 +86,7 @@
// Prevent client caching
header("Cache-Control: no-store, no-cache, must-revalidate", false);
header("Pragma: no-cache");
+
return true;
}
@@ -96,16 +97,19 @@
header('WWW-Authenticate: Basic realm="XOOPS Installer"');
header('HTTP/1.0 401 Unauthorized');
echo 'You can not access this XOOPS installer.';
+
return false;
}
- if(INSTALL_USER != '' && $_SERVER['PHP_AUTH_USER'] != INSTALL_USER) {
+ if (INSTALL_USER != '' && $_SERVER['PHP_AUTH_USER'] != INSTALL_USER) {
header('HTTP/1.0 401 Unauthorized');
echo 'You can not access this XOOPS installer.';
+
return false;
}
- if(INSTALL_PASSWORD != $_SERVER['PHP_AUTH_PW']){
+ if (INSTALL_PASSWORD != $_SERVER['PHP_AUTH_PW']) {
header('HTTP/1.0 401 Unauthorized');
echo 'You can not access this XOOPS installer.';
+
return false;
}
}
@@ -123,6 +127,7 @@
if (!$GLOBALS['xoopsUser']->isAdmin()) {
return false;
}
+
return true;
}
@@ -148,10 +153,10 @@
function setPage($page)
{
$pages = array_keys($this->pages);
- if ((int)$page && $page >= 0 && $page < count($pages)) {
+ if ((int) $page && $page >= 0 && $page < count($pages)) {
$this->pageIndex = $page;
$this->currentPage = $pages[$page];
- } else if (isset( $this->pages[$page])) {
+ } elseif (isset( $this->pages[$page])) {
$this->currentPage = $page;
$this->pageIndex = array_search($this->currentPage, $pages);
} else {
@@ -170,6 +175,7 @@
$proto = ( @$_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
$host = $_SERVER['HTTP_HOST'];
$base = substr( $_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/'));
+
return $proto . '://' . $host . $base;
}
@@ -177,13 +183,13 @@
{
$pages = array_keys($this->pages);
$pageIndex = $this->pageIndex;
- if (!(int)$page{0}) {
+ if (!(int) $page{0}) {
if ($page{0} == '+') {
$pageIndex += substr($page, 1);
- } else if ($page{0} == '-') {
+ } elseif ($page{0} == '-') {
$pageIndex -= substr($page, 1);
} else {
- $pageIndex = (int)array_search($page, $pages);
+ $pageIndex = (int) array_search($page, $pages);
}
}
if (!isset($pages[$pageIndex])) {
@@ -194,6 +200,7 @@
}
}
$page = $pages[$pageIndex];
+
return $this->baseLocation() . "/page_{$page}.php";
}
@@ -234,8 +241,8 @@
}
$ret .= "</fieldset>\n" . $hidden. "\n" . $form->renderValidationJS(true);
}
+
return $ret;
}
}
-?>
\ No newline at end of file
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt 2014-02-15 22:28:32 UTC (rev 12316)
@@ -1,3 +1,10 @@
+1.00 Final [2014/02/15]
+=================================
+- fixed highlight of selected modules (mamba)
+- removed System and ModuleInstaller from the list of modules that can be uninstalled (mamba)
+- updated to prototype.js 1.71
+
+
1.00 Beta [2011/07/22] (Mamba)
=================================
First beta release
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/credits.txt
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/credits.txt 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/credits.txt 2014-02-15 22:28:32 UTC (rev 12316)
@@ -1,7 +1,7 @@
Credits
===============
-ModuleInstaller put together by Michael Beck (Mamba)
+ModuleInstaller developed by Michael Beck (Mamba)
Based on code from the XOOPS Install script developed by: Haruki Setoyama, Kazumi Ono, Skalpa Keo, Taiwen Jiang, DuGris
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/include/common.inc.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/include/common.inc.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/include/common.inc.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -68,5 +68,3 @@
if (!@is_array($_SESSION['settings'])) {
$_SESSION['settings'] = array();
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/include/config.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/include/config.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/include/config.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -69,4 +69,3 @@
),
'configs' => null
);
-?>
\ No newline at end of file
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/include/install_tpl.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/include/install_tpl.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/include/install_tpl.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -29,7 +29,7 @@
defined('XOOPS_INSTALL') or die('XOOPS Installation wizard die');
-include_once '../../../language/' . $wizard->language . '/global.php';
+include_once '../../../language/'. $wizard->language . '/global.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo _LANGCODE; ?>" lang="<?php echo _LANGCODE; ?>">
@@ -46,19 +46,18 @@
if (file_exists('language/' . $wizard->language . '/style.css')) {
echo '<link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="language/' . $wizard->language . '/style.css" />';
} else {
- $xoTheme->addStylesheet( XOOPS_URL . "/modules/" . $xoopsModule->getVar("dirname") . "/css/style.css" );
- }
+ $xoTheme->addStylesheet( XOOPS_URL . "/modules/" . $xoopsModule->getVar("dirname") . "/css/style.css" );
+ }
?>
-
- <script type="text/javascript" src="./js/prototype-1.6.0.3.js"></script>
- <script type="text/javascript" src="./js/xo-installer.js"></script>
+
+ <script type="text/javascript" src="./../js/prototype.js"></script>
+ <script type="text/javascript" src="./../js/xo-installer.js"></script>
</head>
<body>
<div id="xo-content">
-
<form id='<?php echo $wizard->pages[$wizard->currentPage]['name']; ?>' action='<?php echo $_SERVER['PHP_SELF']; ?>' method='post'>
<?php echo $content; ?>
@@ -76,4 +75,4 @@
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/include/page.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/include/page.php 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/include/page.php 2014-02-15 22:28:32 UTC (rev 12316)
@@ -67,5 +67,3 @@
'name' => WELCOME,
'title' => WELCOME_TITLE),
);
-
-?>
\ No newline at end of file
Deleted: XoopsModules/moduleinstaller/trunk/moduleinstaller/js/prototype-1.6.0.3.js
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/js/prototype-1.6.0.3.js 2014-02-15 07:35:30 UTC (rev 12315)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/js/prototype-1.6.0.3.js 2014-02-15 22:28:32 UTC (rev 12316)
@@ -1,4320 +0,0 @@
-/* Prototype JavaScript framework, version 1.6.0.3
- * (c) 2005-2008 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-
-var Prototype = {
- Version: '1.6.0.3',
-
- Browser: {
- IE: !!(window.attachEvent &&
- navigator.userAgent.indexOf('Opera') === -1),
- Opera: navigator.userAgent.indexOf('Opera') > -1,
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
- navigator.userAgent.indexOf('KHTML') === -1,
- MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
- },
-
- BrowserFeatures: {
- XPath: !!document.evaluate,
- SelectorsAPI: !!document.querySelector,
- ElementExtensions: !!window.HTMLElement,
- SpecificElementExtensions:
- document.createElement('div')['__proto__'] &&
- document.createElement('div')['__proto__'] !==
- document.createElement('form')['__proto__']
- },
-
- ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
- JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
-
- emptyFunction: function() { },
- K: function(x) { return x }
-};
-
-if (Prototype.Browser.MobileSafari)
- Prototype.BrowserFeatures.SpecificElementExtensions = false;
-
-
-/* Based on Alex Arnell's inheritance implementation. */
-var Class = {
- create: function() {
- var parent = null, properties = $A(arguments);
- if (Object.isFunction(properties[0]))
- parent = properties.shift();
-
- function klass() {
- this.initialize.apply(this, arguments);
- }
-
- Object.extend(klass, Class.Methods);
- klass.superclass = parent;
- klass.subclasses = [];
-
- if (parent) {
- var subclass = function() { };
- subclass.prototype = parent.prototype;
- klass.prototype = new subclass;
- parent.subclasses.push(klass);
- }
-
- for (var i = 0; i < properties.length; i++)
- klass.addMethods(properties[i]);
-
- if (!klass.prototype.initialize)
- klass.prototype.initialize = Prototype.emptyFunction;
-
- klass.prototype.constructor = klass;
-
- return klass;
- }
-};
-
-Class.Methods = {
- addMethods: function(source) {
- var ancestor = this.superclass && this.superclass.prototype;
- var properties = Object.keys(source);
-
- if (!Object.keys({ toString: true }).length)
- properties.push("toString", "valueOf");
-
- for (var i = 0, length = properties.length; i < length; i++) {
- var property = properties[i], value = source[property];
- if (ancestor && Object.isFunction(value) &&
- value.argumentNames().first() == "$super") {
- var method = value;
- value = (function(m) {
- return function() { return ancestor[m].apply(this, arguments) };
- })(property).wrap(method);
-
- value.valueOf = method.valueOf.bind(method);
- value.toString = method.toString.bind(method);
- }
- this.prototype[property] = value;
- }
-
- return this;
- }
-};
-
-var Abstract = { };
-
-Object.extend = function(destination, source) {
- for (var property in source)
- destination[property] = source[property];
- return destination;
-};
-
-Object.extend(Object, {
- inspect: function(object) {
- try {
- if (Object.isUndefined(object)) return 'undefined';
- if (object === null) return 'null';
- return object.inspect ? object.inspect() : String(object);
- } catch (e) {
- if (e instanceof RangeError) return '...';
- throw e;
- }
- },
-
- toJSON: function(object) {
- var type = typeof object;
- switch (type) {
- case 'undefined':
- case 'function':
- case 'unknown': return;
- case 'boolean': return object.toString();
- }
-
- if (object === null) return 'null';
- if (object.toJSON) return object.toJSON();
- if (Object.isElement(object)) return;
-
- var results = [];
- for (var property in object) {
- var value = Object.toJSON(object[property]);
- if (!Object.isUndefined(value))
- results.push(property.toJSON() + ': ' + value);
- }
-
- return '{' + results.join(', ') + '}';
- },
-
- toQueryString: function(object) {
- return $H(object).toQueryString();
- },
-
- toHTML: function(object) {
- return object && object.toHTML ? object.toHTML() : String.interpret(object);
- },
-
- keys: function(object) {
- var keys = [];
- for (var property in object)
- keys.push(property);
- return keys;
- },
-
- values: function(object) {
- var values = [];
- for (var property in object)
- values.push(object[property]);
- return values;
- },
-
- clone: function(object) {
- return Object.extend({ }, object);
- },
-
- isElement: function(object) {
- return !!(object && object.nodeType == 1);
- },
-
- isArray: function(object) {
- return object != null && typeof object == "object" &&
- 'splice' in object && 'join' in object;
- },
-
- isHash: function(object) {
- return object instanceof Hash;
- },
-
- isFunction: function(object) {
- return typeof object == "function";
- },
-
- isString: function(object) {
- return typeof object == "string";
- },
-
- isNumber: function(object) {
- return typeof object == "number";
- },
-
- isUndefined: function(object) {
- return typeof object == "undefined";
- }
-});
-
-Object.extend(Function.prototype, {
- argumentNames: function() {
- var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
- .replace(/\s+/g, '').split(',');
- return names.length == 1 && !names[0] ? [] : names;
- },
-
- bind: function() {
- if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
- var __method = this, args = $A(arguments), object = args.shift();
- return function() {
- return __method.apply(object, args.concat($A(arguments)));
- }
- },
-
- bindAsEventListener: function() {
- var __method = this, args = $A(arguments), object = args.shift();
- return function(event) {
- return __method.apply(object, [event || window.event].concat(args));
- }
- },
-
- curry: function() {
- if (!arguments.length) return this;
- var __method = this, args = $A(arguments);
- return function() {
- return __method.apply(this, args.concat($A(arguments)));
- }
- },
-
- delay: function() {
- var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
- return window.setTimeout(function() {
- return __method.apply(__method, args);
- }, timeout);
- },
-
- defer: function() {
- var args = [0.01].concat($A(arguments));
- return this.delay.apply(this, args);
- },
-
- wrap: function(wrapper) {
- var __method = this;
- return function() {
- return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
- }
- },
-
- methodize: function() {
- if (this._methodized) return this._methodized;
- var __method = this;
- return this._methodized = function() {
- return __method.apply(null, [this].concat($A(arguments)));
- };
- }
-});
-
-Date.prototype.toJSON = function() {
- return '"' + this.getUTCFullYear() + '-' +
- (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
- this.getUTCDate().toPaddedString(2) + 'T' +
- this.getUTCHours().toPaddedString(2) + ':' +
- this.getUTCMinutes().toPaddedString(2) + ':' +
- this.getUTCSeconds().toPaddedString(2) + 'Z"';
-};
-
-var Try = {
- these: function() {
- var returnValue;
-
- for (var i = 0, length = arguments.length; i < length; i++) {
- var lambda = arguments[i];
- try {
- returnValue = lambda();
- break;
- } catch (e) { }
- }
-
- return returnValue;
- }
-};
-
-RegExp.prototype.match = RegExp.prototype.test;
-
-RegExp.escape = function(str) {
- return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-};
-
-/*--------------------------------------------------------------------------*/
-
-var PeriodicalExecuter = Class.create({
- initialize: function(callback, frequency) {
- this.callback = callback;
- this.frequency = frequency;
- this.currentlyExecuting = false;
-
- this.registerCallback();
- },
-
- registerCallback: function() {
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- execute: function() {
- this.callback(this);
- },
-
- stop: function() {
- if (!this.timer) return;
- clearInterval(this.timer);
- this.timer = null;
- },
-
- onTimerEvent: function() {
- if (!this.currentlyExecuting) {
- try {
- this.currentlyExecuting = true;
- this.execute();
- } finally {
- this.currentlyExecuting = false;
- }
- }
- }
-});
-Object.extend(String, {
- interpret: function(value) {
- return value == null ? '' : String(value);
- },
- specialChar: {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '\\': '\\\\'
- }
-});
-
-Object.extend(String.prototype, {
- gsub: function(pattern, replacement) {
- var result = '', source = this, match;
- replacement = arguments.callee.prepareReplacement(replacement);
-
- while (source.length > 0) {
- if (match = source.match(pattern)) {
- result += source.slice(0, match.index);
- result += String.interpret(replacement(match));
- source = source.slice(match.index + match[0].length);
- } else {
- result += source, source = '';
- }
- }
- return result;
- },
-
- sub: function(pattern, replacement, count) {
- replacement = this.gsub.prepareReplacement(replacement);
- count = Object.isUndefined(count) ? 1 : count;
-
- return this.gsub(pattern, function(match) {
- if (--count < 0) return match[0];
- return replacement(match);
- });
- },
-
- scan: function(pattern, iterator) {
- this.gsub(pattern, iterator);
- return String(this);
- },
-
- truncate: function(length, truncation) {
- length = length || 30;
- truncation = Object.isUndefined(truncation) ? '...' : truncation;
- return this.length > length ?
- this.slice(0, length - truncation.length) + truncation : String(this);
- },
-
- strip: function() {
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
- },
-
- stripTags: function() {
- return this.replace(/<\/?[^>]+>/gi, '');
- },
-
- stripScripts: function() {
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
- },
-
- extractScripts: function() {
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
- var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
- return (this.match(matchAll) || []).map(function(scriptTag) {
- return (scriptTag.match(matchOne) || ['', ''])[1];
- });
- },
-
- evalScripts: function() {
- return this.extractScripts().map(function(script) { return eval(script) });
- },
-
- escapeHTML: function() {
- var self = arguments.callee;
- self.text.data = this;
- return self.div.innerHTML;
- },
-
- unescapeHTML: function() {
- var div = new Element('div');
- div.innerHTML = this.stripTags();
- return div.childNodes[0] ? (div.childNodes.length > 1 ?
- $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
- div.childNodes[0].nodeValue) : '';
- },
-
- toQueryParams: function(separator) {
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
- if (!match) return { };
-
- return match[1].split(separator || '&').inject(...
[truncated message content] |
|
From: <be...@us...> - 2014-03-19 09:18:37
|
Revision: 12394
http://sourceforge.net/p/xoops/svn/12394
Author: beckmi
Date: 2014-03-19 09:18:33 +0000 (Wed, 19 Mar 2014)
Log Message:
-----------
Adding 1.01 Beta 1 (see changelog.txt)
Modified Paths:
--------------
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt
XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt
XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js
XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php
XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/install.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -16,6 +16,8 @@
**/
include 'admin_header.php';
xoops_cp_header();
+
+
$xoopsOption['checkadmin'] = true;
$xoopsOption['hascommon'] = true;
require_once './../include/common.inc.php';
@@ -91,6 +93,7 @@
$javascript = "";
$content = "<ul class='log'><li>";
$content .= "<table class='module'>\n";
+// $content .= "<input type='button' name='getTotal1' id='getTotal1' value='Select All' onclick='selectAll();' /> <input type='button' name='getTotal1' id='getTotal1' value='Unselect All' onclick='unselectAll();' /><br />";
foreach ($dirlist as $file) {
clearstatcache();
if (!in_array($file, $listed_mods)) {
@@ -121,7 +124,7 @@
$content .= " <td class='yesno'>";
$content .= $moduleYN->render() ;
$content .= " </td></tr>\n";
- $toinstal++;
+ ++$toinstal;
}
}
$content .= "</table>";
@@ -131,8 +134,24 @@
$content = "<div class='x2-note confirmMsg'>" . NO_MODULES_FOUND . "</div>";
}
}
+
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('install.php');
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_ALL,
+ "javascript:selectAll();",
+ 'button_ok'
+);
+
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_NONE,
+ "javascript:unselectAll();",
+ 'prune'
+);
+
+echo $indexAdmin->renderButton('left', '');
+
+
include './../include/install_tpl.php';
include 'admin_footer.php';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/admin/uninstall.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -123,7 +123,7 @@
$content .= " <td class='yesno'>";
$content .= $moduleYN->render() ;
$content .= " </td></tr>\n";
- $toinstal++;
+ ++$toinstal;
}
}
$content .= "</table>";
@@ -136,5 +136,21 @@
$indexAdmin = new ModuleAdmin();
echo $indexAdmin->addNavigation('uninstall.php');
+
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_ALL,
+ "javascript:selectAll();",
+ 'button_ok'
+);
+
+$indexAdmin->addItemButton(
+ _AM_INSTALLER_SELECT_NONE,
+ "javascript:unselectAll();",
+ 'prune'
+);
+
+echo $indexAdmin->renderButton('left', '');
+
+
include './../include/install_tpl.php';
include 'admin_footer.php';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/class/installwizard.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -32,6 +32,9 @@
var $pageIndex = 0;
var $configs = array();
+ /**
+ * @return bool
+ */
function xoInit()
{
if (@empty( $_SERVER['REQUEST_URI'])) {
@@ -90,6 +93,9 @@
return true;
}
+ /**
+ * @return bool
+ */
function checkAccess()
{
if (INSTALL_USER != '' && INSTALL_PASSWORD != '') {
@@ -131,6 +137,9 @@
return true;
}
+ /**
+ * @param $file
+ */
function loadLangFile($file)
{
if (file_exists("./language/{$this->language}/{$file}.php")) {
@@ -140,6 +149,9 @@
}
}
+ /**
+ * @param $language
+ */
function initLanguage($language)
{
$language = preg_replace("/[^a-z0-9_\-]/i", "", $language);
@@ -150,6 +162,11 @@
$this->loadLangFile('install');
}
+ /**
+ * @param $page
+ *
+ * @return bool|mixed
+ */
function setPage($page)
{
$pages = array_keys($this->pages);
@@ -170,6 +187,9 @@
return $this->pageIndex;
}
+ /**
+ * @return string
+ */
function baseLocation()
{
$proto = ( @$_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
@@ -179,6 +199,11 @@
return $proto . '://' . $host . $base;
}
+ /**
+ * @param $page
+ *
+ * @return string
+ */
function pageURI( $page )
{
$pages = array_keys($this->pages);
@@ -204,6 +229,11 @@
return $this->baseLocation() . "/page_{$page}.php";
}
+ /**
+ * @param $page
+ * @param int $status
+ * @param string $message
+ */
function redirectToPage( $page, $status = 303, $message = 'See other' )
{
$location = $this->pageURI( $page );
@@ -213,6 +243,9 @@
header("Location: {$location}");
}
+ /**
+ * @return string
+ */
function CreateForm()
{
$hidden = '';
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/changelog.txt 2014-03-19 09:18:33 UTC (rev 12394)
@@ -1,3 +1,7 @@
+1.01 Beta 1 [2014/03/18]
+=================================
+- added option to select and un-select ALL modules (mamba)
+
1.00 Final [2014/02/15]
=================================
- fixed highlight of selected modules (mamba)
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/docs/lang_diff.txt 2014-03-19 09:18:33 UTC (rev 12394)
@@ -1,4 +1,10 @@
LANGUAGE DIFFERENCES
=====================
-Below are language differences from a version to next version.
\ No newline at end of file
+Below are language differences from a version to next version.
+
+1.01
+-------------------
+/language/english/admin.php
+added define('_AM_INSTALLER_SELECT_ALL' , "Select All");
+added define('_AM_INSTALLER_SELECT_NONE' , "Un-Select All");
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/js/xo-installer.js 2014-03-19 09:18:33 UTC (rev 12394)
@@ -113,4 +113,37 @@
return true;
}
-window.onload = xoopsExternalLinks;
\ No newline at end of file
+
+function selectAll() {
+// alert('You are clicking on me');
+ var radios = document.getElementsByTagName("input");
+ var modules = document.getElementsByTagName("input");
+ for (var i = 0; i < radios.length; i++) {
+
+ if (radios[i].type === "radio" && radios[i].id.slice(-1) === "1") {
+ radios[i].checked = true;
+
+ radios[i].parentNode.parentNode.style.background = '#E6EFC2';
+ } else {
+ radios[i].checked = false;
+ }
+ }
+}
+
+
+function unselectAll() {
+// alert('You are clicking on me');
+ var radios = document.getElementsByTagName("input");
+ for (var i = 0; i < radios.length; i++) {
+
+ if (radios[i].type === "radio" && radios[i].id.slice(-1) === "2") {
+ radios[i].checked = true;
+ radios[i].parentNode.parentNode.style.background = 'transparent';
+ } else {
+ radios[i].checked = false;
+ }
+ }
+}
+
+
+window.onload = xoopsExternalLinks;
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/language/english/admin.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -2,3 +2,5 @@
// Text for Admin footer
define("_AM_ADMIN_FOOTER","<div class='center smallsmall italic pad5'>Module Installer is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
+define('_AM_INSTALLER_SELECT_ALL' , "Select All");
+define('_AM_INSTALLER_SELECT_NONE' , "Un-Select All");
Modified: XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php
===================================================================
--- XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php 2014-03-19 09:11:53 UTC (rev 12393)
+++ XoopsModules/moduleinstaller/trunk/moduleinstaller/xoops_version.php 2014-03-19 09:18:33 UTC (rev 12394)
@@ -27,7 +27,7 @@
$moduleDirName = basename( dirname( __FILE__ ) ) ;
$modversion['name'] = _MI_INSTALLER_NAME;
-$modversion['version'] = '1.0';
+$modversion['version'] = '1.01';
$modversion['description'] = _MI_INSTALLER_DESC;
$modversion['author'] = 'Michael Beck';
$modversion['nickname'] = 'Mamba';
@@ -45,7 +45,7 @@
$modversion['release_date'] = '2014/02/15';
$modversion["module_website_url"] = "www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["module_status"] = "Final";
+$modversion["module_status"] = "Beta 1";
$modversion['min_php']='5.3.7';
$modversion['min_xoops']="2.5.6";
$modversion['min_admin']='1.1';
|