From 79c38dcb6339cfe065472d40f38a1b73ff8dceff Mon Sep 17 00:00:00 2001 From: jarrett Date: Thu, 1 Oct 2009 00:18:59 +0200 Subject: [PATCH] Merge Work/Home --- setup/wizard/config/databases.xml | 2 +- setup/wizard/htmlHelper.php | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup/wizard/install.lock | 1 - setup/wizard/installUtil.php | 7 +++++-- setup/wizard/installWizard.php | 4 ++-- setup/wizard/lib/helpers/config-path-mock-windows | 8 ++++++++ setup/wizard/lib/services/unixLucene.php | 10 ++-------- setup/wizard/lib/services/unixOpenOffice.php | 6 ++++-- setup/wizard/lib/services/unixScheduler.php | 5 +++-- setup/wizard/lib/services/unixService.php | 24 ++++++++++++++++++++++++ setup/wizard/lib/services/windowsLucene.php | 17 ++++++----------- setup/wizard/lib/services/windowsScheduler.php | 17 +++++++++++------ setup/wizard/lib/services/windowsService.php | 12 +++++++++++- setup/wizard/path.php | 3 +++ setup/wizard/resources/css/wizard.css | 547 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup/wizard/resources/form.js | 12 ------------ setup/wizard/resources/jquery.blockUI.js | 463 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- setup/wizard/resources/jquery.form.js | 13 ------------- setup/wizard/resources/jquery.js | 4376 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- setup/wizard/resources/js/form.js | 12 ++++++++++++ setup/wizard/resources/js/jquery.blockUI.js | 463 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup/wizard/resources/js/jquery.form.js | 13 +++++++++++++ setup/wizard/resources/js/jquery.hotkeys.js | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup/wizard/resources/js/jquery.js | 4376 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup/wizard/resources/js/wizard.js | 228 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup/wizard/resources/wizard.css | 547 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- setup/wizard/resources/wizard.js | 228 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ setup/wizard/steps/configuration.php | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------- setup/wizard/template.php | 4 +++- setup/wizard/templates/complete.tpl | 2 +- setup/wizard/templates/configuration.tpl | 2 +- setup/wizard/templates/configuration_confirm.tpl | 2 +- setup/wizard/templates/database.tpl | 2 +- setup/wizard/templates/database_confirm.tpl | 2 +- setup/wizard/templates/dependencies.tpl | 2 +- setup/wizard/templates/error.tpl | 6 +++--- setup/wizard/templates/install.tpl | 4 ++-- setup/wizard/templates/license.tpl | 4 ++-- setup/wizard/templates/registration.tpl | 4 ++-- setup/wizard/templates/registration_confirm.tpl | 4 ++-- setup/wizard/templates/services.tpl | 2 +- setup/wizard/templates/welcome.tpl | 4 ++-- setup/wizard/templates/wizard.tpl | 17 +++++++++-------- 43 files changed, 6191 insertions(+), 5766 deletions(-) create mode 100644 setup/wizard/htmlHelper.php create mode 100644 setup/wizard/lib/helpers/config-path-mock-windows create mode 100644 setup/wizard/resources/css/wizard.css delete mode 100644 setup/wizard/resources/form.js delete mode 100644 setup/wizard/resources/jquery.blockUI.js delete mode 100644 setup/wizard/resources/jquery.form.js delete mode 100644 setup/wizard/resources/jquery.js create mode 100644 setup/wizard/resources/js/form.js create mode 100644 setup/wizard/resources/js/jquery.blockUI.js create mode 100644 setup/wizard/resources/js/jquery.form.js create mode 100644 setup/wizard/resources/js/jquery.hotkeys.js create mode 100644 setup/wizard/resources/js/jquery.js create mode 100644 setup/wizard/resources/js/wizard.js delete mode 100644 setup/wizard/resources/wizard.css delete mode 100644 setup/wizard/resources/wizard.js diff --git a/setup/wizard/config/databases.xml b/setup/wizard/config/databases.xml index cd2e9a5..897f8c5 100644 --- a/setup/wizard/config/databases.xml +++ b/setup/wizard/config/databases.xml @@ -15,7 +15,7 @@ 3306 dms root - dmsadminuser + dmsuser js9281djw dmsuser djw9281js diff --git a/setup/wizard/htmlHelper.php b/setup/wizard/htmlHelper.php new file mode 100644 index 0000000..fe286f0 --- /dev/null +++ b/setup/wizard/htmlHelper.php @@ -0,0 +1,133 @@ + '', + 'metalink' => '', + 'link' => '%s', + 'mailto' => '%s', + 'form' => '
', + 'formend' => '
', + 'input' => '', + 'textarea' => '', + 'hidden' => '', + 'checkbox' => '', + 'checkboxmultiple' => '', + 'radio' => '%s', + 'selectstart' => '', + 'selectempty' => '', + 'selectoption' => '', + 'selectend' => '', + 'optiongroup' => '', + 'optiongroupend' => '', + 'checkboxmultiplestart' => '', + 'checkboxmultipleend' => '', + 'password' => '', + 'file' => '', + 'file_no_model' => '', + 'submit' => '', + 'submitimage' => '', + 'button' => '', + 'image' => '', + 'tableheader' => '%s', + 'tableheaderrow' => '%s', + 'tablecell' => '%s', + 'tablerow' => '%s', + 'block' => '%s', + 'blockstart' => '', + 'blockend' => '', + 'tag' => '<%s%s>%s', + 'tagstart' => '<%s%s>', + 'tagend' => '', + 'para' => '%s

', + 'parastart' => '', + 'label' => '', + 'fieldset' => '%s', + 'fieldsetstart' => '
%s', + 'fieldsetend' => '
', + 'legend' => '%s', + 'css' => '', + 'style' => '', + 'charset' => '', + 'ul' => '%s', + 'ol' => '%s', + 'li' => '%s', + 'error' => '%s' + ); + + function __construct() { + } + + function js($name) { + return ""; + } + + function css($name) { + return ""; + } + + function image($name, $options = array()) { + $path = "resources/graphics/$name"; + $image = sprintf($this->tags['image'], $path, $this->_parseAttributes($options, null, '', ' ')); + + return $image; + //return ""; + } + + function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { + if (is_array($options)) { + $options = array_merge(array('escape' => true), $options); + + if (!is_array($exclude)) { + $exclude = array(); + } + $keys = array_diff(array_keys($options), array_merge((array)$exclude, array('escape'))); + $values = array_intersect_key(array_values($options), $keys); + $escape = $options['escape']; + $attributes = array(); + + foreach ($keys as $index => $key) { + $attributes[] = $this->__formatAttribute($key, $values[$index], $escape); + } + $out = implode(' ', $attributes); + } else { + $out = $options; + } + return $out ? $insertBefore . $out . $insertAfter : ''; + } + + function __formatAttribute($key, $value, $escape = true) { + $attribute = ''; + $attributeFormat = '%s="%s"'; + $minimizedAttributes = array('compact', 'checked', 'declare', 'readonly', 'disabled', 'selected', 'defer', 'ismap', 'nohref', 'noshade', 'nowrap', 'multiple', 'noresize'); + if (is_array($value)) { + $value = ''; + } + + if (in_array($key, $minimizedAttributes)) { + if ($value === 1 || $value === true || $value === 'true' || $value == $key) { + $attribute = sprintf($attributeFormat, $key, $key); + } + } else { + $attribute = sprintf($attributeFormat, $key, $this->ife($escape, $this->h($value), $value)); + } + return $attribute; + } + + function ife($condition, $val1 = null, $val2 = null) { + if (!empty($condition)) { + return $val1; + } + return $val2; + } + + function h($text, $charset = 'UTF-8') { + if (is_array($text)) { + return array_map('h', $text); + } + return htmlspecialchars($text, ENT_QUOTES, $charset); + } + } +?> \ No newline at end of file diff --git a/setup/wizard/install.lock b/setup/wizard/install.lock index 8f18131..e69de29 100644 --- a/setup/wizard/install.lock +++ b/setup/wizard/install.lock @@ -1 +0,0 @@ -Install Lock File \ No newline at end of file diff --git a/setup/wizard/installUtil.php b/setup/wizard/installUtil.php index e1c790c..099461a 100644 --- a/setup/wizard/installUtil.php +++ b/setup/wizard/installUtil.php @@ -254,9 +254,12 @@ class InstallUtil { * @param boolean $create Whether to create the directory if it doesn't exist * @return array The message and css class to use */ - public function checkPermission($dir, $create=false) + public function checkPermission($dir, $create=false, $file = false) { - $exist = 'Directory doesn\'t exist'; + if(!$file) + $exist = 'Directory doesn\'t exist'; + else + $exist = 'File doesn\'t exist'; $write = 'Directory not writable'; $ret = array('class' => 'cross'); diff --git a/setup/wizard/installWizard.php b/setup/wizard/installWizard.php index 2c6b928..0841c16 100644 --- a/setup/wizard/installWizard.php +++ b/setup/wizard/installWizard.php @@ -73,7 +73,7 @@ class InstallWizard { protected $bypass = null; /** - * Install bypass flag + * Level of debugger * * @author KnowledgeTree Team * @access protected @@ -228,7 +228,7 @@ class InstallWizard { if(isset($_GET['debug'])) { $this->setDebugLevel($_GET['debug']); } else { - $this->setDebugLevel(0); + $this->setDebugLevel($this->debugLevel); } $this->setIUtil(new InstallUtil()); } diff --git a/setup/wizard/lib/helpers/config-path-mock-windows b/setup/wizard/lib/helpers/config-path-mock-windows new file mode 100644 index 0000000..92d4112 --- /dev/null +++ b/setup/wizard/lib/helpers/config-path-mock-windows @@ -0,0 +1,8 @@ +C:\ktdms\var +C:\ktdms\config\config.ini +C:\ktdms\log +C:\ktdms\tmp +C:\ktdms\var\Documents +C:\ktdms\var\indexes +C:\ktdms\var\proxies +C:\ktdms\var\uploads \ No newline at end of file diff --git a/setup/wizard/lib/services/unixLucene.php b/setup/wizard/lib/services/unixLucene.php index 0250c84..89e8ad0 100644 --- a/setup/wizard/lib/services/unixLucene.php +++ b/setup/wizard/lib/services/unixLucene.php @@ -42,6 +42,7 @@ class unixLucene extends unixService { public $util; + private $shutdownScript; private $indexerDir; private $lucenePidFile; @@ -58,7 +59,6 @@ class unixLucene extends unixService { } public function load() { - $this->setSystemOutputDir(); $this->setLuceneDir(SYSTEM_DIR."bin".DS."luceneserver".DS); $this->setIndexerDir(SYSTEM_DIR."search2".DS."indexing".DS."bin".DS); $this->setLucenePidFile("lucene_test.pid"); @@ -68,12 +68,6 @@ class unixLucene extends unixService { $this->setShutdownScript("shutdown.php"); } - function setSystemOutputDir() { - $conf = $this->util->getDataFromSession('configuration'); - print_r($conf); - die; -// $conf['path']['']; - } public function setIndexerDir($indexerDir) { $this->indexerDir = $indexerDir; @@ -190,7 +184,7 @@ class unixLucene extends unixService { $state = $this->status(); if($state != 'STARTED') { $cmd = "cd ".$this->getLuceneDir()."; "; - $cmd .= "nohup java {$this->getJavaXmx()} {$this->getJavaXmx()} -jar ".$this->getLuceneSource()." > ".SYS_LOG_DIR."lucene.log 2>&1 & echo $!"; + $cmd .= "nohup java {$this->getJavaXmx()} {$this->getJavaXmx()} -jar ".$this->getLuceneSource()." > ".$this->outputDir."lucene.log 2>&1 & echo $!"; if(DEBUG) { echo "Command : $cmd
"; return ; diff --git a/setup/wizard/lib/services/unixOpenOffice.php b/setup/wizard/lib/services/unixOpenOffice.php index e711fae..261354d 100644 --- a/setup/wizard/lib/services/unixOpenOffice.php +++ b/setup/wizard/lib/services/unixOpenOffice.php @@ -68,7 +68,7 @@ class unixOpenOffice extends unixService { } public function load() { - + $this->setPort("8100"); $this->setHost("localhost"); $this->setLog("openoffice.log"); @@ -76,6 +76,8 @@ class unixOpenOffice extends unixService { $this->setOption(); } + + private function setPort($port = "8100") { $this->port = $port; } @@ -156,7 +158,7 @@ class unixOpenOffice extends unixService { public function start() { $state = $this->status(); if($state != 'STARTED') { - $cmd = "nohup {$this->getBin()} ".$this->getOption()." > ".SYS_LOG_DIR."{$this->getLog()} 2>&1 & echo $!"; + $cmd = "nohup {$this->getBin()} ".$this->getOption()." > ".$this->outputDir."{$this->getLog()} 2>&1 & echo $!"; if(DEBUG) { echo "Command : $cmd
"; return ; diff --git a/setup/wizard/lib/services/unixScheduler.php b/setup/wizard/lib/services/unixScheduler.php index 2ea1a04..8a58038 100644 --- a/setup/wizard/lib/services/unixScheduler.php +++ b/setup/wizard/lib/services/unixScheduler.php @@ -59,6 +59,7 @@ class unixScheduler extends unixService { $this->setSchedulerDir(VAR_BIN_DIR); $this->setSchedulerSourceLoc('schedulerTask.sh'); } + function setSystemDir($systemDir) { $this->systemDir = $systemDir; @@ -155,10 +156,10 @@ class unixScheduler extends unixService { $source = $this->getSchedulerSourceLoc(); $this->writeSchedulerTask(); if($source) { // Source - $cmd = "nohup ".$source." > ".SYS_LOG_DIR."scheduler.log 2>&1 & echo $!"; + $cmd = "nohup ".$source." > ".$this->outputDir."scheduler.log 2>&1 & echo $!"; } else { // Could be Stack $source = SYS_BIN_DIR.$this->schedulerSource; - $cmd = "nohup ".$source." > ".SYS_LOG_DIR."scheduler.log 2>&1 & echo $!"; + $cmd = "nohup ".$source." > ".$this->outputDir."scheduler.log 2>&1 & echo $!"; } if(DEBUG) { echo "Command : $cmd
"; diff --git a/setup/wizard/lib/services/unixService.php b/setup/wizard/lib/services/unixService.php index c4c42c8..0b2b6c7 100644 --- a/setup/wizard/lib/services/unixService.php +++ b/setup/wizard/lib/services/unixService.php @@ -41,6 +41,30 @@ */ class unixService extends Service { + + public $outputDir; + public $varDir; + /** + * Reference to utility object + * + * @author KnowledgeTree Team + * @access public + * @param none + * @return string + */ + public $util; + + public function __construct() { + $this->util = new InstallUtil(); + $this->setSystemDirs(); + } + + function setSystemDirs() { + $conf = $this->util->getDataFromSession('configuration'); + $this->outputDir = $conf['paths']['logDirectory']['path'].DS; + $this->varDir = $conf['paths']['varDirectory']['path'].DS; + } + /** * Retrieve Service name * diff --git a/setup/wizard/lib/services/windowsLucene.php b/setup/wizard/lib/services/windowsLucene.php index 1b7e413..7eeda2a 100644 --- a/setup/wizard/lib/services/windowsLucene.php +++ b/setup/wizard/lib/services/windowsLucene.php @@ -121,6 +121,7 @@ class windowsLucene extends windowsService { */ private $luceneDir; + /** * Service name * @@ -140,7 +141,7 @@ class windowsLucene extends windowsService { * @return void */ public function load() { - $this->setSystemOutputDir(); + $this->setJavaBin(); $this->setLuceneDIR(SYSTEM_DIR."bin".DS."luceneserver"); $this->setLuceneExe("KTLuceneService.exe"); @@ -151,12 +152,6 @@ class windowsLucene extends windowsService { $this->setLuceneError("lucene-err.txt"); } - function setSystemOutputDir() { - $conf = $this->util->getDataFromSession('configuration'); - print_r($conf); - die; -// $conf['path']['']; - } /** * Retrieve Status Service @@ -195,8 +190,8 @@ class windowsLucene extends windowsService { } } // TODO: Will not detect, but a java pre-check is done in services, before this - if(file_exists(SYS_OUT_DIR.'outJVHome')) { - $this->javaBin = file_get_contents(SYS_OUT_DIR.'outJVHome'); + if(file_exists($this->varDir.'outJVHome')) { + $this->javaBin = file_get_contents($this->varDir.'outJVHome'); if($this->javaBin != '') return true; } @@ -326,7 +321,7 @@ class windowsLucene extends windowsService { * @return void */ private function setLuceneOut($luceneOut) { - $this->luceneOut = SYS_LOG_DIR.$luceneOut; + $this->luceneOut = $this->outputDir.$luceneOut; } /** @@ -350,7 +345,7 @@ class windowsLucene extends windowsService { * @return void */ private function setLuceneError($luceneError) { - $this->luceneError = SYS_LOG_DIR.$luceneError; + $this->luceneError = $this->outputDir.$luceneError; } /** diff --git a/setup/wizard/lib/services/windowsScheduler.php b/setup/wizard/lib/services/windowsScheduler.php index 897c612..d07e2ba 100644 --- a/setup/wizard/lib/services/windowsScheduler.php +++ b/setup/wizard/lib/services/windowsScheduler.php @@ -76,7 +76,7 @@ class windowsScheduler extends windowsService { * @return string */ public $name = "KTSchedulerTest"; - + /** * Load defaults needed by service * @@ -86,12 +86,14 @@ class windowsScheduler extends windowsService { * @return void */ function load() { - $this->setSchedulerDIR(SYS_OUT_DIR."bin"); + $this->setSchedulerDIR($this->varDir."bin"); $this->setSchedulerScriptPath("taskrunner.bat"); $this->setSchedulerSource("schedulerService.php"); } + + /** * Set Scheduler Directory path * @@ -101,6 +103,9 @@ class windowsScheduler extends windowsService { * @return string */ private function setSchedulerDIR($schedulerDIR) { + if(!file_exists($schedulerDIR)) { + @mkdir($schedulerDIR); + } $this->schedulerDir = $schedulerDIR; } @@ -243,10 +248,10 @@ class windowsScheduler extends windowsService { private function writeTaskRunner() { // Check if bin is readable and writable - if(is_readable(SYS_OUT_DIR."bin") && is_writable(SYS_OUT_DIR."bin")) { - if(DEBUG) { - echo "Create {$this->getSchedulerDir()}\\taskrunner.bat
"; - } + if(DEBUG) { + echo "Attempt to Create {$this->getSchedulerDir()}\\taskrunner.bat
"; + } + if(is_readable($this->varDir."bin") && is_writable($this->varDir."bin")) { $fp = fopen($this->getSchedulerDir().""."\\taskrunner.bat", "w+"); $content = "@echo off \n"; $content .= "\"".PHP_DIR."php.exe\" "."\"{$this->getSchedulerSource()}\""; diff --git a/setup/wizard/lib/services/windowsService.php b/setup/wizard/lib/services/windowsService.php index fcde6bd..fb2121a 100644 --- a/setup/wizard/lib/services/windowsService.php +++ b/setup/wizard/lib/services/windowsService.php @@ -59,11 +59,21 @@ class windowsService extends Service { * @param none * @return string */ - public $util; + public $outputDir; + + public $varDir; + public function __construct() { $this->util = new InstallUtil(); + $this->setSystemDirs(); + } + + function setSystemDirs() { + $conf = $this->util->getDataFromSession('configuration'); + $this->outputDir = $conf['paths']['logDirectory']['path'].DS; + $this->varDir = $conf['paths']['varDirectory']['path'].DS; } /** diff --git a/setup/wizard/path.php b/setup/wizard/path.php index 3a13595..b0699c1 100644 --- a/setup/wizard/path.php +++ b/setup/wizard/path.php @@ -70,6 +70,9 @@ define('SERVICE_LIB', WIZARD_LIB."services".DS); define('CONF_DIR', WIZARD_DIR."config".DS); define('RES_DIR', WIZARD_DIR."resources".DS); + define('JS_DIR', RES_DIR."js".DS); + define('CSS_DIR', RES_DIR."css".DS); + define('IMG_DIR', RES_DIR."graphics".DS); define('STEP_DIR', WIZARD_DIR."steps".DS); define('TEMP_DIR', WIZARD_DIR."templates".DS); define('SHELL_DIR', WIZARD_DIR."shells".DS); diff --git a/setup/wizard/resources/css/wizard.css b/setup/wizard/resources/css/wizard.css new file mode 100644 index 0000000..86a0162 --- /dev/null +++ b/setup/wizard/resources/css/wizard.css @@ -0,0 +1,547 @@ +* { margin: 0; padding: 0; } + +body { + background-attachment:scroll; + background-color:transparent; + background-image:url("../graphics/dame/loginbg.png"); + background-position:0 0; + background-repeat:repeat-x; + font-family:sans-serif; + color:grey; +} + +h1 { + font-size:165%; + margin-bottom:5px; + margin-top:0; +} + +h2 { + font-size: 1.5em; + font-weight: normal; + padding: 10px 0; + color: #555; +} + +h3 { + font-size: 1.2em; + font-weight: normal; + padding: 10px 0; + color: #555; +} + + +p { + padding-bottom: 10px; + word-wrap: break-word; +} + +p.title { + font-size: 165%; + margin-bottom: 5px; + margin-top: 0px; +} + +a { + color: #EC7725; +} + +th { + font-weight: bold; + text-align: left; + padding: 5px 5px; +} + +td { + padding: 2px 5px; +} + +select { + width: 320px; +} + +/* *** Layout Styles *** */ + +#outer-wrapper { + border:1px solid #B7B7B7; + left:215px; + position:relative; + top:20px; + width:1024px; +} + +#header { + background: transparent url("../graphics/dame/installer_head.png") repeat scroll 0% 0%; + text-align: right; + font-size: 100%; + color: rgb(167, 167, 167); + font-family: sans-serif; + height: 71px; + font-family:sans-serif; + padding-right:15px; +} + +#wrapper { + /*background: white url("../graphics/background.gif") repeat-y left;*/ +} + +#container { + width: 100%; + background: white url("../graphics/background.gif") repeat-y left; + float: right; +} + +#content { + margin-left: 220px; + height:515px; +} + +#content_container { + padding:20px; + vertical-align: middle; + font-size: 10pt; +} + +#step_content { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + overflow: auto; + height: 400px; +} + +#step_content_dependencies { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + min-height:265px; +} + +#step_content_configuration { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + min-height:290px; +} + +#step_content_registration { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + height:295px; +} + +#step_content_registration_confirm { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + height:400px; +} + +#step_content_install { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + height:290px; +} + +#step_content_database { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + min-height:355px; +} + +#step_content_database_confirm { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + height:375px; +} + +#step_content_complete { + border: 1px solid rgb(207, 207, 207); + padding: 5px; + min-height:355px; +} + +#sidebar { + /*background: rgb(239, 239, 239) none repeat scroll 0% 0%;*/ + font-size: 90%; + color: grey; + font-family: sans-serif; + margin-top: 0px; + /*width: 235px;*/ + float: left; + padding-top: 20px; + padding-bottom: 20px; + /*height:475px;*/ + /*color:#616161;*/ + line-height:3; + padding-left:20px; + text-align:left; +} + +#footer { + background-image:url("../graphics/dame/navbar.png"); + height:35px; +} + +.clearing { + height: 0; + clear: both; +} + +/* Content Styles */ + +.logo { + background: url("../graphics/logo.png") no-repeat; + background-position: top left; + height: 50px; + width: 200px; + margin-left: 10px; +} + +#logo { + position:relative; + right:760px; + top:20px; +} + +#install_details { + bottom:20px; + position:relative; + right:10px; +} + +.indicator a { + background:url("../graphics/dame/tick1.png") no-repeat left; + padding-top:15px; + padding-bottom:10px; + padding-left:30px; + color: #1c9e00; +} + +.active { + background:url("../graphics/dame/tick1.png") no-repeat left; + padding-top:15px; + padding-bottom:10px; + padding-left:30px; + color: #1c9e00; +} + +.inactive { + background:url("../graphics/dame/tick2.png") no-repeat left; + padding-top:15px; + padding-bottom:10px; + padding-left:30px; + color:#a7a7a7; +} + +.current { + background:url("../graphics/dame/dot.png") no-repeat left; + padding-top:15px; + padding-bottom:10px; + padding-left:30px; + color: #f36a00; +} + +.tick { + background: url("../graphics/tick.png") no-repeat; + height: 16px; + width: 16px; +} + +.cross { + background: url("../graphics/cross.png") no-repeat; + height: 16px; + width: 16px; + color:#A30000; +} + +.cross_orange { + background: url("../graphics/cross_orange.png") no-repeat; + height: 16px; + width: 16px; + color:#EC7725; +} + +.green { + color: green; + align: center; +} + +.orange { + color: orange; + align: center; +} + +.error { + font-weight: bold; + color: red; +} + +.conf_paths { + width:755px; +} + +.errors { + color: #9F0000; +} + +.buttons { + bottom: 40px; + right:20px; + position: absolute; + width:120px; +} + +.back { + background-image: url("../graphics/dame/kt_gradient.jpg"); + background-repeat:repeat-x; + border:1px solid #CECECE; + float:left; + font-size:13px; + font-weight:bold; + margin-left:0; + margin-top:10px; +} + +.textinput { + margin-top:0px; + float:left; +} + +.step input { + background-image: url("../graphics/dame/kt_gradient.jpg"); + background-repeat:repeat-x; + border:1px solid #CECECE; + float:right; + font-size:13px; + font-weight:bold; + margin-left:5px; + /*margin-top:10px;*/ +} + +.step .radio { + float:none; +} + +.button_next { + float:right; + margin-left:5px; + margin-top:10px; +} + +.button_previous { + float:left; + margin-left:0px; + margin-top:10px; +} + +.buttons a { + background: #DDDDDD; + border: solid 1px #888; + padding: 2px 8px 2px 5px; + text-decoration: none; + color: #EC7725; +} + +.powered-by { + background: url("../graphics/powered-by-kt.png") no-repeat; + background-position: center left; + height: 50px; + width: 140px; + margin-left: 10px; +} + +.adv_options { + +} + +.onclick { + cursor: pointer; + color: #EC7725; + width: 130px; +} + +.description { + color:#898989; + line-height:150%; + /*margin-bottom:0.75em;*/ + font-size:90%; +} + +.disclaimer { + border: solid 1px #EFBE87; + margin: 0 20px; + padding: 5px; + font-size: 85%; +} + +.top { + font-size: 2em; + font-weight: normal; + padding: 10px 0; + color: #444; +} + +.right_top { + height:45px; +} + +#dbconf { + width:755px; +} + +table#dbconf tr td { + width:50%; +} + +table#dbconf tr td input{ + +} + +.options { + width:15%; +} + +.adv_options { + padding: 5px 8px; +} + +#section { + +} + +.php_ext_details table { + width:745px; +} + +.php_ext_details table tr { + +} + +td.ext_indicator { + width:10px; +} + +td.ext_name { + width:110p; +} + +td.ext_description { + width:360px; +} + +td.ext_error { + width:350px; +} + +td.ext_refresh { + width:10px; +} + +td.dir_name { + width:200px; +} + +td.dir_description { + width:200px; +} + +.php_con_details table { + width:745px; + /*border:1px solid;*/ +} + +.error_message { + border:none; + color:#A30000; + padding:0px; + color:red; + font-size:90%; + margin-bottom:0.75em; + font-weight:bold; +} + +.warning_message{ + border:none; + color:#A30000; + padding:0px; + color:#EC7725; + font-size:90%; + margin-bottom:0.75em; + font-weight:bold; +} + +.continue_message { + border:none; + width:550px; + padding:0px; + color:#898989; + font-size:90%; + margin-bottom:0.75em; + height:16px; +} + +.big_ok { + background: url("../graphics/big-ok.png") no-repeat; + padding:4px; + /*width:16px; + height:16px; + padding-bottom:1px;*/ +} + +.license_agreement { + overflow: scroll; + height: 255px; + width:765px; + height:370px; + overflow-x:hidden; + border:1px solid #CFCFCF; +} + +.db_adv_options { + height:200px; + width:720px; +} + +.adv_option { + height:65px; + width:720px; +} + +#tooltips { + background: url("../graphics/question.gif") no-repeat; + width:16px; + height:16px; + cursor:pointer; +} + +.empty_space { + font-size:12pt; +} + +.demo { + left:75px; + position:relative; + width:600px +} + +.text_message { + +} + +.description_click { + line-height:150%; + font-size:90%; +} + +.specify { + background: #DDDDDD; + border: solid 1px #888; + padding: 2px 8px 2px 5px; + text-decoration: none; + color: #EC7725; +} + +#loading { + bottom:250px; + left:500px; + position:relative; + height:0px; + width:0px; +} \ No newline at end of file diff --git a/setup/wizard/resources/form.js b/setup/wizard/resources/form.js deleted file mode 100644 index b88c521..0000000 --- a/setup/wizard/resources/form.js +++ /dev/null @@ -1,12 +0,0 @@ -$(document).ready(function() { - var options = {target: '#content_container', beforeSubmit: w.showRequest, success: w.showResponse}; - $.blockUI.defaults.css = {}; - var override = $('form').attr('onsubmit'); - if(override == undefined) { - $('form').ajaxForm(options); - w.adjustMenu($('form').attr('id')); - } else { - var options = {target: '#content_container', beforeSubmit: w.validateRegistration, success: w.adjustMenu($('form').attr('id'))}; - $('form').ajaxForm(options); - } -}); \ No newline at end of file diff --git a/setup/wizard/resources/jquery.blockUI.js b/setup/wizard/resources/jquery.blockUI.js deleted file mode 100644 index 3a50783..0000000 --- a/setup/wizard/resources/jquery.blockUI.js +++ /dev/null @@ -1,463 +0,0 @@ -/*! - * jQuery blockUI plugin - * Version 2.26 (09-SEP-2009) - * @requires jQuery v1.2.3 or later - * - * Examples at: http://malsup.com/jquery/block/ - * Copyright (c) 2007-2008 M. Alsup - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Thanks to Amir-Hossein Sobhi for some excellent contributions! - */ - -;(function($) { - -if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) { - alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery); - return; -} - -$.fn._fadeIn = $.fn.fadeIn; - -// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle -// retarded userAgent strings on Vista) -var mode = document.documentMode || 0; -var setExpr = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8); -var ie6 = $.browser.msie && /MSIE 6.0/.test(navigator.userAgent) && !mode; - -// global $ methods for blocking/unblocking the entire page -$.blockUI = function(opts) { install(window, opts); }; -$.unblockUI = function(opts) { remove(window, opts); }; - -// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl) -$.growlUI = function(title, message, timeout, onClose) { - var $m = $('
'); - if (title) $m.append('

'+title+'

'); - if (message) $m.append('

'+message+'

'); - if (timeout == undefined) timeout = 3000; - $.blockUI({ - message: $m, fadeIn: 700, fadeOut: 1000, centerY: false, - timeout: timeout, showOverlay: false, - onUnblock: onClose, - css: $.blockUI.defaults.growlCSS - }); -}; - -// plugin method for blocking element content -$.fn.block = function(opts) { - return this.unblock({ fadeOut: 0 }).each(function() { - if ($.css(this,'position') == 'static') - this.style.position = 'relative'; - if ($.browser.msie) - this.style.zoom = 1; // force 'hasLayout' - install(this, opts); - }); -}; - -// plugin method for unblocking element content -$.fn.unblock = function(opts) { - return this.each(function() { - remove(this, opts); - }); -}; - -$.blockUI.version = 2.26; // 2nd generation blocking at no extra cost! - -// override these in your code to change the default behavior and style -$.blockUI.defaults = { - // message displayed when blocking (use null for no message) - message: '

Please wait...

', - - title: null, // title string; only used when theme == true - draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded) - - theme: false, // set to true to use with jQuery UI themes - - // styles for the message when blocking; if you wish to disable - // these and use an external stylesheet then do this in your code: - // $.blockUI.defaults.css = {}; - css: { - padding: 0, - margin: 0, - width: '30%', - top: '40%', - left: '35%', - textAlign: 'center', - color: '#000', - border: '3px solid #aaa', - backgroundColor:'#fff', - cursor: 'wait' - }, - - // minimal style set used when themes are used - themedCSS: { - width: '30%', - top: '40%', - left: '35%' - }, - - // styles for the overlay - overlayCSS: { - backgroundColor: '#000', - opacity: 0.6, - cursor: 'wait' - }, - - // styles applied when using $.growlUI - growlCSS: { - width: '350px', - top: '10px', - left: '', - right: '10px', - border: 'none', - padding: '5px', - opacity: 0.6, - cursor: 'default', - color: '#fff', - backgroundColor: '#000', - '-webkit-border-radius': '10px', - '-moz-border-radius': '10px' - }, - - // IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w - // (hat tip to Jorge H. N. de Vasconcelos) - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank', - - // force usage of iframe in non-IE browsers (handy for blocking applets) - forceIframe: false, - - // z-index for the blocking overlay - baseZ: 1000, - - // set these to true to have the message automatically centered - centerX: true, // <-- only effects element blocking (page block controlled via css above) - centerY: true, - - // allow body element to be stetched in ie6; this makes blocking look better - // on "short" pages. disable if you wish to prevent changes to the body height - allowBodyStretch: true, - - // enable if you want key and mouse events to be disabled for content that is blocked - bindEvents: true, - - // be default blockUI will supress tab navigation from leaving blocking content - // (if bindEvents is true) - constrainTabKey: true, - - // fadeIn time in millis; set to 0 to disable fadeIn on block - fadeIn: 200, - - // fadeOut time in millis; set to 0 to disable fadeOut on unblock - fadeOut: 400, - - // time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock - timeout: 0, - - // disable if you don't want to show the overlay - showOverlay: true, - - // if true, focus will be placed in the first available input field when - // page blocking - focusInput: true, - - // suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity) - applyPlatformOpacityRules: true, - - // callback method invoked when unblocking has completed; the callback is - // passed the element that has been unblocked (which is the window object for page - // blocks) and the options that were passed to the unblock call: - // onUnblock(element, options) - onUnblock: null, - - // don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493 - quirksmodeOffsetHack: 4 -}; - -// private data and functions follow... - -var pageBlock = null; -var pageBlockEls = []; - -function install(el, opts) { - var full = (el == window); - var msg = opts && opts.message !== undefined ? opts.message : undefined; - opts = $.extend({}, $.blockUI.defaults, opts || {}); - opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {}); - var css = $.extend({}, $.blockUI.defaults.css, opts.css || {}); - var themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {}); - msg = msg === undefined ? opts.message : msg; - - // remove the current block (if there is one) - if (full && pageBlock) - remove(window, {fadeOut:0}); - - // if an existing element is being used as the blocking content then we capture - // its current place in the DOM (and current display style) so we can restore - // it when we unblock - if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) { - var node = msg.jquery ? msg[0] : msg; - var data = {}; - $(el).data('blockUI.history', data); - data.el = node; - data.parent = node.parentNode; - data.display = node.style.display; - data.position = node.style.position; - if (data.parent) - data.parent.removeChild(node); - } - - var z = opts.baseZ; - - // blockUI uses 3 layers for blocking, for simplicity they are all used on every platform; - // layer1 is the iframe layer which is used to supress bleed through of underlying content - // layer2 is the overlay layer which has opacity and a wait cursor (by default) - // layer3 is the message content that is displayed while blocking - - var lyr1 = ($.browser.msie || opts.forceIframe) - ? $('') - : $(''); - var lyr2 = $(''); - - var lyr3; - if (opts.theme && full) { - var s = ''; - lyr3 = $(s); - } - else { - lyr3 = full ? $('') - : $(''); - } - - // if we have a message, style it - if (msg) { - if (opts.theme) { - lyr3.css(themedCSS); - lyr3.addClass('ui-widget-content'); - } - else - lyr3.css(css); - } - - // style the overlay - if (!opts.applyPlatformOpacityRules || !($.browser.mozilla && /Linux/.test(navigator.platform))) - lyr2.css(opts.overlayCSS); - lyr2.css('position', full ? 'fixed' : 'absolute'); - - // make iframe layer transparent in IE - if ($.browser.msie || opts.forceIframe) - lyr1.css('opacity',0.0); - - $([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el); - - if (opts.theme && opts.draggable && $.fn.draggable) { - lyr3.draggable({ - handle: '.ui-dialog-titlebar', - cancel: 'li' - }); - } - - // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling) - var expr = setExpr && (!$.boxModel || $('object,embed', full ? null : el).length > 0); - if (ie6 || expr) { - // give body 100% height - if (full && opts.allowBodyStretch && $.boxModel) - $('html,body').css('height','100%'); - - // fix ie6 issue when blocked element has a border width - if ((ie6 || !$.boxModel) && !full) { - var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth'); - var fixT = t ? '(0 - '+t+')' : 0; - var fixL = l ? '(0 - '+l+')' : 0; - } - - // simulate fixed position - $.each([lyr1,lyr2,lyr3], function(i,o) { - var s = o[0].style; - s.position = 'absolute'; - if (i < 2) { - full ? s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"') - : s.setExpression('height','this.parentNode.offsetHeight + "px"'); - full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"') - : s.setExpression('width','this.parentNode.offsetWidth + "px"'); - if (fixL) s.setExpression('left', fixL); - if (fixT) s.setExpression('top', fixT); - } - else if (opts.centerY) { - if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'); - s.marginTop = 0; - } - else if (!opts.centerY && full) { - var top = (opts.css && opts.css.top) ? parseInt(opts.css.top) : 0; - var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"'; - s.setExpression('top',expression); - } - }); - } - - // show the message - if (msg) { - if (opts.theme) - lyr3.find('.ui-widget-content').append(msg); - else - lyr3.append(msg); - if (msg.jquery || msg.nodeType) - $(msg).show(); - } - - if (($.browser.msie || opts.forceIframe) && opts.showOverlay) - lyr1.show(); // opacity is zero - if (opts.fadeIn) { - if (opts.showOverlay) - lyr2._fadeIn(opts.fadeIn); - if (msg) - lyr3.fadeIn(opts.fadeIn); - } - else { - if (opts.showOverlay) - lyr2.show(); - if (msg) - lyr3.show(); - } - - // bind key and mouse events - bind(1, el, opts); - - if (full) { - pageBlock = lyr3[0]; - pageBlockEls = $(':input:enabled:visible',pageBlock); - if (opts.focusInput) - setTimeout(focus, 20); - } - else - center(lyr3[0], opts.centerX, opts.centerY); - - if (opts.timeout) { - // auto-unblock - var to = setTimeout(function() { - full ? $.unblockUI(opts) : $(el).unblock(opts); - }, opts.timeout); - $(el).data('blockUI.timeout', to); - } -}; - -// remove the block -function remove(el, opts) { - var full = (el == window); - var $el = $(el); - var data = $el.data('blockUI.history'); - var to = $el.data('blockUI.timeout'); - if (to) { - clearTimeout(to); - $el.removeData('blockUI.timeout'); - } - opts = $.extend({}, $.blockUI.defaults, opts || {}); - bind(0, el, opts); // unbind events - - var els; - if (full) // crazy selector to handle odd field errors in ie6/7 - els = $('body').children().filter('.blockUI').add('body > .blockUI'); - else - els = $('.blockUI', el); - - if (full) - pageBlock = pageBlockEls = null; - - if (opts.fadeOut) { - els.fadeOut(opts.fadeOut); - setTimeout(function() { reset(els,data,opts,el); }, opts.fadeOut); - } - else - reset(els, data, opts, el); -}; - -// move blocking element back into the DOM where it started -function reset(els,data,opts,el) { - els.each(function(i,o) { - // remove via DOM calls so we don't lose event handlers - if (this.parentNode) - this.parentNode.removeChild(this); - }); - - if (data && data.el) { - data.el.style.display = data.display; - data.el.style.position = data.position; - if (data.parent) - data.parent.appendChild(data.el); - $(data.el).removeData('blockUI.history'); - } - - if (typeof opts.onUnblock == 'function') - opts.onUnblock(el,opts); -}; - -// bind/unbind the handler -function bind(b, el, opts) { - var full = el == window, $el = $(el); - - // don't bother unbinding if there is nothing to unbind - if (!b && (full && !pageBlock || !full && !$el.data('blockUI.isBlocked'))) - return; - if (!full) - $el.data('blockUI.isBlocked', b); - - // don't bind events when overlay is not in use or if bindEvents is false - if (!opts.bindEvents || (b && !opts.showOverlay)) - return; - - // bind anchors and inputs for mouse and key events - var events = 'mousedown mouseup keydown keypress'; - b ? $(document).bind(events, opts, handler) : $(document).unbind(events, handler); - -// former impl... -// var $e = $('a,:input'); -// b ? $e.bind(events, opts, handler) : $e.unbind(events, handler); -}; - -// event handler to suppress keyboard/mouse events when blocking -function handler(e) { - // allow tab navigation (conditionally) - if (e.keyCode && e.keyCode == 9) { - if (pageBlock && e.data.constrainTabKey) { - var els = pageBlockEls; - var fwd = !e.shiftKey && e.target == els[els.length-1]; - var back = e.shiftKey && e.target == els[0]; - if (fwd || back) { - setTimeout(function(){focus(back)},10); - return false; - } - } - } - // allow events within the message content - if ($(e.target).parents('div.blockMsg').length > 0) - return true; - - // allow events for content that is not being blocked - return $(e.target).parents().children().filter('div.blockUI').length == 0; -}; - -function focus(back) { - if (!pageBlockEls) - return; - var e = pageBlockEls[back===true ? pageBlockEls.length-1 : 0]; - if (e) - e.focus(); -}; - -function center(el, x, y) { - var p = el.parentNode, s = el.style; - var l = ((p.offsetWidth - el.offsetWidth)/2) - sz(p,'borderLeftWidth'); - var t = ((p.offsetHeight - el.offsetHeight)/2) - sz(p,'borderTopWidth'); - if (x) s.left = l > 0 ? (l+'px') : '0'; - if (y) s.top = t > 0 ? (t+'px') : '0'; -}; - -function sz(el, p) { - return parseInt($.css(el,p))||0; -}; - -})(jQuery); diff --git a/setup/wizard/resources/jquery.form.js b/setup/wizard/resources/jquery.form.js deleted file mode 100644 index 51225ea..0000000 --- a/setup/wizard/resources/jquery.form.js +++ /dev/null @@ -1,13 +0,0 @@ -// $Id: jquery.form.js,v 1.2 2007/11/19 10:05:48 goba Exp $ - -/* - * jQuery Form Plugin - * version: 2.01 (10/31/2007) - * @requires jQuery v1.1 or later - * - * Examples at: http://malsup.com/jquery/form/ - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){$.7.1j=5(o){2(P o==\'5\')o={L:o};o=$.2h({1h:4.X(\'2i\')||1E.2u.3D(),I:4.X(\'2g\')||\'29\'},o||{});3 p={};$.M.N(\'R.2P.2L\',[4,o,p]);2(p.1Q)6 4;3 a=4.1z(o.2r);2(o.V){H(3 n 3u o.V)a.C({z:n,A:o.V[n]})}2(o.28&&o.28(a,4,o)===E)6 4;$.M.N(\'R.K.36\',[a,4,o,p]);2(p.1Q)6 4;3 q=$.1x(a);2(o.I.31()==\'29\'){o.1h+=(o.1h.2Z(\'?\')>=0?\'&\':\'?\')+q;o.V=B}8 o.V=q;3 r=4,U=[];2(o.1r)U.C(5(){r.1r()});2(o.1o)U.C(5(){r.1o()});2(!o.18&&o.14){3 u=o.L||5(){};U.C(5(a){2(4.1N)$(o.14).X("1M",a).1N().D(u,1L);8 $(o.14).2t(a).D(u,1L)})}8 2(o.L)U.C(o.L);o.L=5(a,b){H(3 i=0,F=U.G;i\');3 j=i[0];3 k=$.1i.20&&1E.20.30()<9;2($.1i.1X||k)j.2Y=\'2W:E;1w.2U("");\';i.2S({2R:\'2Q\',23:\'-24\',1R:\'-24\'});3 l={Z:B,1b:B,2K:0,2J:\'n/a\',2H:5(){},2F:5(){},2E:5(){}};3 g=f.2B;2(g&&!$.1O++)$.M.N("2x");2(g)$.M.N("2w",[l,f]);3 m=0;3 n=0;1f(5(){i.2v(\'1n\');j.1K?j.1K(\'1J\',12):j.2s(\'1I\',12,E);3 a=d.1H?\'1H\':\'2q\';3 t=r.X(\'14\');r.X({14:h,2g:\'3C\',2i:f.1h});d[a]=\'3B/R-V\';2(f.1G)1f(5(){n=T;12()},f.1G);d.K();r.X(\'14\',t)},10);5 12(){2(m++)6;j.2o?j.2o(\'1J\',12):j.3A(\'1I\',12,E);3 a=T;3z{2(n)3x\'1G\';3 b,O;O=j.2n?j.2n.1w:j.2l?j.2l:j.1w;l.Z=O.1n?O.1n.1M:B;l.1b=O.2k?O.2k:O;2(f.18==\'2j\'||f.18==\'3s\'){3 c=O.1D(\'1C\')[0];b=c?c.A:l.Z;2(f.18==\'2j\')3r("V = "+b);8 $.3q(b)}8 2(f.18==\'2m\'){b=l.1b;2(!b&&l.Z!=B)b=2d(l.Z)}8{b=l.Z}}3p(e){a=E;$.3n(f,l,\'2b\',e)}2(a){f.L(b,\'L\');2(g)$.M.N("3m",[l,f])}2(g)$.M.N("3k",[l,f]);2(g&&!--$.1O)$.M.N("3j");2(f.27)f.27(l,a?\'L\':\'2b\');1f(5(){i.3i();l.1b=B},3g)};5 2d(s,a){2(1E.26){a=25 26(\'3d.3c\');a.3b=\'E\';a.3a(s)}8 a=(25 38()).37(s,\'1A/2m\');6(a&&a.22&&a.22.1e!=\'34\')?a:B}}};$.7.1j.1a=0;$.7.W=5(a){6 4.21().K(1m).D(5(){4.1u=$.7.W.1a++;$.7.W.1t[4.1u]=a;$(":K,19:Y",4).1Z(1s)})};$.7.W.1a=1;$.7.W.1t={};5 1s(e){3 a=4.R;a.Q=4;2(4.I==\'Y\'){2(e.1Y!=S){a.11=e.1Y;a.16=e.2X}8 2(P $.7.1U==\'5\'){3 b=$(4).1U();a.11=e.1V-b.1R;a.16=e.1W-b.23}8{a.11=e.1V-4.2V;a.16=e.1W-4.32}}1f(5(){a.Q=a.11=a.16=B},10)};5 1m(){3 a=4.1u;3 b=$.7.W.1t[a];$(4).1j(b);6 E};$.7.21=5(){4.1T(\'K\',1m);6 4.D(5(){$(":K,19:Y",4).1T(\'1Z\',1s)})};$.7.1z=5(b){3 a=[];2(4.G==0)6 a;3 c=4[0];3 d=b?c.1D(\'*\'):c.2T;2(!d)6 a;H(3 i=0,F=d.G;i)[^>]*$|^#([\w-]+)$/, - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/; - -jQuery.fn = jQuery.prototype = { - init: function( selector, context ) { - // Make sure that a selection was provided - selector = selector || document; - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this[0] = selector; - this.length = 1; - this.context = selector; - return this; - } - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - var match = quickExpr.exec( selector ); - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) - selector = jQuery.clean( [ match[1] ], context ); - - // HANDLE: $("#id") - else { - var elem = document.getElementById( match[3] ); - - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem && elem.id != match[3] ) - return jQuery().find( selector ); - - // Otherwise, we inject the element directly into the jQuery object - var ret = jQuery( elem || [] ); - ret.context = document; - ret.selector = selector; - return ret; - } - - // HANDLE: $(expr, [context]) - // (which is just equivalent to: $(content).find(expr) - } else - return jQuery( context ).find( selector ); - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) - return jQuery( document ).ready( selector ); - - // Make sure that old selector state is passed along - if ( selector.selector && selector.context ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return this.setArray(jQuery.isArray( selector ) ? - selector : - jQuery.makeArray(selector)); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.3.2", - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num === undefined ? - - // Return a 'clean' array - Array.prototype.slice.call( this ) : - - // Return just the object - this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = jQuery( elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) - ret.selector = this.selector + (this.selector ? " " : "") + selector; - else if ( name ) - ret.selector = this.selector + "." + name + "(" + selector + ")"; - - // Return the newly-formed element set - return ret; - }, - - // Force the current matched set of elements to become - // the specified array of elements (destroying the stack in the process) - // You should use pushStack() in order to do this, but maintain the stack - setArray: function( elems ) { - // Resetting the length to 0, then using the native Array push - // is a super-fast way to populate an object with array-like properties - this.length = 0; - Array.prototype.push.apply( this, elems ); - - return this; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem && elem.jquery ? elem[0] : elem - , this ); - }, - - attr: function( name, value, type ) { - var options = name; - - // Look for the case where we're accessing a style value - if ( typeof name === "string" ) - if ( value === undefined ) - return this[0] && jQuery[ type || "attr" ]( this[0], name ); - - else { - options = {}; - options[ name ] = value; - } - - // Check to see if we're setting style values - return this.each(function(i){ - // Set all the styles - for ( name in options ) - jQuery.attr( - type ? - this.style : - this, - name, jQuery.prop( this, options[ name ], type, i, name ) - ); - }); - }, - - css: function( key, value ) { - // ignore negative width and height values - if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) - value = undefined; - return this.attr( key, value, "curCSS" ); - }, - - text: function( text ) { - if ( typeof text !== "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); - - var ret = ""; - - jQuery.each( text || this, function(){ - jQuery.each( this.childNodes, function(){ - if ( this.nodeType != 8 ) - ret += this.nodeType != 1 ? - this.nodeValue : - jQuery.fn.text( [ this ] ); - }); - }); - - return ret; - }, - - wrapAll: function( html ) { - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).clone(); - - if ( this[0].parentNode ) - wrap.insertBefore( this[0] ); - - wrap.map(function(){ - var elem = this; - - while ( elem.firstChild ) - elem = elem.firstChild; - - return elem; - }).append(this); - } - - return this; - }, - - wrapInner: function( html ) { - return this.each(function(){ - jQuery( this ).contents().wrapAll( html ); - }); - }, - - wrap: function( html ) { - return this.each(function(){ - jQuery( this ).wrapAll( html ); - }); - }, - - append: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.appendChild( elem ); - }); - }, - - prepend: function() { - return this.domManip(arguments, true, function(elem){ - if (this.nodeType == 1) - this.insertBefore( elem, this.firstChild ); - }); - }, - - before: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this ); - }); - }, - - after: function() { - return this.domManip(arguments, false, function(elem){ - this.parentNode.insertBefore( elem, this.nextSibling ); - }); - }, - - end: function() { - return this.prevObject || jQuery( [] ); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: [].push, - sort: [].sort, - splice: [].splice, - - find: function( selector ) { - if ( this.length === 1 ) { - var ret = this.pushStack( [], "find", selector ); - ret.length = 0; - jQuery.find( selector, this[0], ret ); - return ret; - } else { - return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ - return jQuery.find( selector, elem ); - })), "find", selector ); - } - }, - - clone: function( events ) { - // Do the clone - var ret = this.map(function(){ - if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { - // IE copies events bound via attachEvent when - // using cloneNode. Calling detachEvent on the - // clone will also remove the events from the orignal - // In order to get around this, we use innerHTML. - // Unfortunately, this means some modifications to - // attributes in IE that are actually only stored - // as properties will not be copied (such as the - // the name attribute on an input). - var html = this.outerHTML; - if ( !html ) { - var div = this.ownerDocument.createElement("div"); - div.appendChild( this.cloneNode(true) ); - html = div.innerHTML; - } - - return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; - } else - return this.cloneNode(true); - }); - - // Copy the events from the original to the clone - if ( events === true ) { - var orig = this.find("*").andSelf(), i = 0; - - ret.find("*").andSelf().each(function(){ - if ( this.nodeName !== orig[i].nodeName ) - return; - - var events = jQuery.data( orig[i], "events" ); - - for ( var type in events ) { - for ( var handler in events[ type ] ) { - jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); - } - } - - i++; - }); - } - - // Return the cloned set - return ret; - }, - - filter: function( selector ) { - return this.pushStack( - jQuery.isFunction( selector ) && - jQuery.grep(this, function(elem, i){ - return selector.call( elem, i ); - }) || - - jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ - return elem.nodeType === 1; - }) ), "filter", selector ); - }, - - closest: function( selector ) { - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, - closer = 0; - - return this.map(function(){ - var cur = this; - while ( cur && cur.ownerDocument ) { - if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { - jQuery.data(cur, "closest", closer); - return cur; - } - cur = cur.parentNode; - closer++; - } - }); - }, - - not: function( selector ) { - if ( typeof selector === "string" ) - // test special case where just one selector is passed in - if ( isSimple.test( selector ) ) - return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); - else - selector = jQuery.multiFilter( selector, this ); - - var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; - return this.filter(function() { - return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; - }); - }, - - add: function( selector ) { - return this.pushStack( jQuery.unique( jQuery.merge( - this.get(), - typeof selector === "string" ? - jQuery( selector ) : - jQuery.makeArray( selector ) - ))); - }, - - is: function( selector ) { - return !!selector && jQuery.multiFilter( selector, this ).length > 0; - }, - - hasClass: function( selector ) { - return !!selector && this.is( "." + selector ); - }, - - val: function( value ) { - if ( value === undefined ) { - var elem = this[0]; - - if ( elem ) { - if( jQuery.nodeName( elem, 'option' ) ) - return (elem.attributes.value || {}).specified ? elem.value : elem.text; - - // We need to handle select boxes special - if ( jQuery.nodeName( elem, "select" ) ) { - var index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type == "select-one"; - - // Nothing was selected - if ( index < 0 ) - return null; - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - if ( option.selected ) { - // Get the specifc value for the option - value = jQuery(option).val(); - - // We don't need an array for one selects - if ( one ) - return value; - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - } - - // Everything else, we just grab the value - return (elem.value || "").replace(/\r/g, ""); - - } - - return undefined; - } - - if ( typeof value === "number" ) - value += ''; - - return this.each(function(){ - if ( this.nodeType != 1 ) - return; - - if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) - this.checked = (jQuery.inArray(this.value, value) >= 0 || - jQuery.inArray(this.name, value) >= 0); - - else if ( jQuery.nodeName( this, "select" ) ) { - var values = jQuery.makeArray(value); - - jQuery( "option", this ).each(function(){ - this.selected = (jQuery.inArray( this.value, values ) >= 0 || - jQuery.inArray( this.text, values ) >= 0); - }); - - if ( !values.length ) - this.selectedIndex = -1; - - } else - this.value = value; - }); - }, - - html: function( value ) { - return value === undefined ? - (this[0] ? - this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : - null) : - this.empty().append( value ); - }, - - replaceWith: function( value ) { - return this.after( value ).remove(); - }, - - eq: function( i ) { - return this.slice( i, +i + 1 ); - }, - - slice: function() { - return this.pushStack( Array.prototype.slice.apply( this, arguments ), - "slice", Array.prototype.slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function(elem, i){ - return callback.call( elem, i, elem ); - })); - }, - - andSelf: function() { - return this.add( this.prevObject ); - }, - - domManip: function( args, table, callback ) { - if ( this[0] ) { - var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), - scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), - first = fragment.firstChild; - - if ( first ) - for ( var i = 0, l = this.length; i < l; i++ ) - callback.call( root(this[i], first), this.length > 1 || i > 0 ? - fragment.cloneNode(true) : fragment ); - - if ( scripts ) - jQuery.each( scripts, evalScript ); - } - - return this; - - function root( elem, cur ) { - return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? - (elem.getElementsByTagName("tbody")[0] || - elem.appendChild(elem.ownerDocument.createElement("tbody"))) : - elem; - } - } -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -function evalScript( i, elem ) { - if ( elem.src ) - jQuery.ajax({ - url: elem.src, - async: false, - dataType: "script" - }); - - else - jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); - - if ( elem.parentNode ) - elem.parentNode.removeChild( elem ); -} - -function now(){ - return +new Date; -} - -jQuery.extend = jQuery.fn.extend = function() { - // copy reference to target object - var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) - target = {}; - - // extend jQuery itself if only one argument is passed - if ( length == i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) - // Extend the base object - for ( var name in options ) { - var src = target[ name ], copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) - continue; - - // Recurse if we're merging object values - if ( deep && copy && typeof copy === "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, - // Never move original objects, clone them - src || ( copy.length != null ? [ ] : { } ) - , copy ); - - // Don't bring in undefined values - else if ( copy !== undefined ) - target[ name ] = copy; - - } - - // Return the modified object - return target; -}; - -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}, - toString = Object.prototype.toString; - -jQuery.extend({ - noConflict: function( deep ) { - window.$ = _$; - - if ( deep ) - window.jQuery = _jQuery; - - return jQuery; - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return toString.call(obj) === "[object Function]"; - }, - - isArray: function( obj ) { - return toString.call(obj) === "[object Array]"; - }, - - // check if an element is in a (or is an) XML document - isXMLDoc: function( elem ) { - return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || - !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); - }, - - // Evalulates a script in a global context - globalEval: function( data ) { - if ( data && /\S/.test(data) ) { - // Inspired by code by Andrea Giammarchi - // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html - var head = document.getElementsByTagName("head")[0] || document.documentElement, - script = document.createElement("script"); - - script.type = "text/javascript"; - if ( jQuery.support.scriptEval ) - script.appendChild( document.createTextNode( data ) ); - else - script.text = data; - - // Use insertBefore instead of appendChild to circumvent an IE6 bug. - // This arises when a base node is used (#2709). - head.insertBefore( script, head.firstChild ); - head.removeChild( script ); - } - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, length = object.length; - - if ( args ) { - if ( length === undefined ) { - for ( name in object ) - if ( callback.apply( object[ name ], args ) === false ) - break; - } else - for ( ; i < length; ) - if ( callback.apply( object[ i++ ], args ) === false ) - break; - - // A special, fast, case for the most common use of each - } else { - if ( length === undefined ) { - for ( name in object ) - if ( callback.call( object[ name ], name, object[ name ] ) === false ) - break; - } else - for ( var value = object[0]; - i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} - } - - return object; - }, - - prop: function( elem, value, type, i, name ) { - // Handle executable functions - if ( jQuery.isFunction( value ) ) - value = value.call( elem, i ); - - // Handle passing in a number to a CSS property - return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? - value + "px" : - value; - }, - - className: { - // internal only, use addClass("class") - add: function( elem, classNames ) { - jQuery.each((classNames || "").split(/\s+/), function(i, className){ - if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) - elem.className += (elem.className ? " " : "") + className; - }); - }, - - // internal only, use removeClass("class") - remove: function( elem, classNames ) { - if (elem.nodeType == 1) - elem.className = classNames !== undefined ? - jQuery.grep(elem.className.split(/\s+/), function(className){ - return !jQuery.className.has( classNames, className ); - }).join(" ") : - ""; - }, - - // internal only, use hasClass("class") - has: function( elem, className ) { - return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; - } - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations - swap: function( elem, options, callback ) { - var old = {}; - // Remember the old values, and insert the new ones - for ( var name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - callback.call( elem ); - - // Revert the old values - for ( var name in options ) - elem.style[ name ] = old[ name ]; - }, - - css: function( elem, name, force, extra ) { - if ( name == "width" || name == "height" ) { - var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; - - function getWH() { - val = name == "width" ? elem.offsetWidth : elem.offsetHeight; - - if ( extra === "border" ) - return; - - jQuery.each( which, function() { - if ( !extra ) - val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; - if ( extra === "margin" ) - val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; - else - val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; - }); - } - - if ( elem.offsetWidth !== 0 ) - getWH(); - else - jQuery.swap( elem, props, getWH ); - - return Math.max(0, Math.round(val)); - } - - return jQuery.curCSS( elem, name, force ); - }, - - curCSS: function( elem, name, force ) { - var ret, style = elem.style; - - // We need to handle opacity special in IE - if ( name == "opacity" && !jQuery.support.opacity ) { - ret = jQuery.attr( style, "opacity" ); - - return ret == "" ? - "1" : - ret; - } - - // Make sure we're using the right name for getting the float value - if ( name.match( /float/i ) ) - name = styleFloat; - - if ( !force && style && style[ name ] ) - ret = style[ name ]; - - else if ( defaultView.getComputedStyle ) { - - // Only "float" is needed here - if ( name.match( /float/i ) ) - name = "float"; - - name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); - - var computedStyle = defaultView.getComputedStyle( elem, null ); - - if ( computedStyle ) - ret = computedStyle.getPropertyValue( name ); - - // We should always get a number back from opacity - if ( name == "opacity" && ret == "" ) - ret = "1"; - - } else if ( elem.currentStyle ) { - var camelCase = name.replace(/\-(\w)/g, function(all, letter){ - return letter.toUpperCase(); - }); - - ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { - // Remember the original values - var left = style.left, rsLeft = elem.runtimeStyle.left; - - // Put in the new values to get a computed value out - elem.runtimeStyle.left = elem.currentStyle.left; - style.left = ret || 0; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - elem.runtimeStyle.left = rsLeft; - } - } - - return ret; - }, - - clean: function( elems, context, fragment ) { - context = context || document; - - // !context.createElement fails in IE with an error but returns typeof 'object' - if ( typeof context.createElement === "undefined" ) - context = context.ownerDocument || context[0] && context[0].ownerDocument || document; - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { - var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); - if ( match ) - return [ context.createElement( match[1] ) ]; - } - - var ret = [], scripts = [], div = context.createElement("div"); - - jQuery.each(elems, function(i, elem){ - if ( typeof elem === "number" ) - elem += ''; - - if ( !elem ) - return; - - // Convert html string into DOM nodes - if ( typeof elem === "string" ) { - // Fix "XHTML"-style tags in all browsers - elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ - return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? - all : - front + ">"; - }); - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); - - var wrap = - // option or optgroup - !tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && - [ 1, "", "
" ] || - - !tags.indexOf("", "" ] || - - // matched above - (!tags.indexOf("", "" ] || - - !tags.indexOf("", "" ] || - - // IE can't serialize and \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/configuration.tpl b/setup/wizard/templates/configuration.tpl index 233879f..9bb3a7c 100644 --- a/setup/wizard/templates/configuration.tpl +++ b/setup/wizard/templates/configuration.tpl @@ -118,4 +118,4 @@ - +js('form.js'); } ?> diff --git a/setup/wizard/templates/configuration_confirm.tpl b/setup/wizard/templates/configuration_confirm.tpl index 346835a..8592e74 100644 --- a/setup/wizard/templates/configuration_confirm.tpl +++ b/setup/wizard/templates/configuration_confirm.tpl @@ -94,4 +94,4 @@ - +js('form.js'); } ?> diff --git a/setup/wizard/templates/database.tpl b/setup/wizard/templates/database.tpl index eff52c4..266e3b4 100644 --- a/setup/wizard/templates/database.tpl +++ b/setup/wizard/templates/database.tpl @@ -142,7 +142,7 @@ An second user is required for normal database interaction, the reading and writ - +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/database_confirm.tpl b/setup/wizard/templates/database_confirm.tpl index 671e2be..1fc2b2c 100644 --- a/setup/wizard/templates/database_confirm.tpl +++ b/setup/wizard/templates/database_confirm.tpl @@ -101,4 +101,4 @@ - \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/dependencies.tpl b/setup/wizard/templates/dependencies.tpl index 1643336..2fbb949 100644 --- a/setup/wizard/templates/dependencies.tpl +++ b/setup/wizard/templates/dependencies.tpl @@ -151,4 +151,4 @@ - \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/error.tpl b/setup/wizard/templates/error.tpl index 2c1a7cb..f49bfc5 100644 --- a/setup/wizard/templates/error.tpl +++ b/setup/wizard/templates/error.tpl @@ -2,9 +2,9 @@ KnowledgeTree Installer - - - + + + diff --git a/setup/wizard/templates/install.tpl b/setup/wizard/templates/install.tpl index 79fcc39..d5d22e4 100644 --- a/setup/wizard/templates/install.tpl +++ b/setup/wizard/templates/install.tpl @@ -7,9 +7,9 @@

The wizard will now complete the installation and run a final check on the system.

-
+
image('dame/kt_browse.png'); ?>
- \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/license.tpl b/setup/wizard/templates/license.tpl index 165546e..b4bdf55 100644 --- a/setup/wizard/templates/license.tpl +++ b/setup/wizard/templates/license.tpl @@ -334,7 +334,7 @@ govern. + - - \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/registration.tpl b/setup/wizard/templates/registration.tpl index b2f098b..d790250 100644 --- a/setup/wizard/templates/registration.tpl +++ b/setup/wizard/templates/registration.tpl @@ -29,7 +29,7 @@     - + image('dropbox.png'); ?> @@ -107,7 +107,7 @@ - +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/registration_confirm.tpl b/setup/wizard/templates/registration_confirm.tpl index 6b1affb..6a9cb7f 100644 --- a/setup/wizard/templates/registration_confirm.tpl +++ b/setup/wizard/templates/registration_confirm.tpl @@ -6,9 +6,9 @@

Thank you for signing up. You'll receive an email from us shortly with download instructions for the KnowledgeTree Drop Box software.

-
+
image('kt_browse.png'); ?>
- \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/services.tpl b/setup/wizard/templates/services.tpl index a5463d1..d34ac82 100644 --- a/setup/wizard/templates/services.tpl +++ b/setup/wizard/templates/services.tpl @@ -196,4 +196,4 @@ - \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/welcome.tpl b/setup/wizard/templates/welcome.tpl index 79b208c..ef18fa2 100644 --- a/setup/wizard/templates/welcome.tpl +++ b/setup/wizard/templates/welcome.tpl @@ -4,9 +4,9 @@

This wizard will lead you through the steps needed to install and configure KnowledgeTree on your server.

-
+
image('kt_browse.png'); ?>
- \ No newline at end of file +js('form.js'); } ?> \ No newline at end of file diff --git a/setup/wizard/templates/wizard.tpl b/setup/wizard/templates/wizard.tpl index 1246b13..b367a29 100644 --- a/setup/wizard/templates/wizard.tpl +++ b/setup/wizard/templates/wizard.tpl @@ -2,16 +2,17 @@ KnowledgeTree Installer - - - - - + js('jquery.js'); ?> + js('jquery.form.js'); ?> + js('jquery.blockUI.js'); ?> + js('jquery.hotkeys.js'); ?> + js('wizard.js'); ?> + css('wizard.css'); ?>
- +
 
-- libgit2 0.21.4