Commit e7fecfdb6ecdd556bf267290dd06561fa9231dc3
1 parent
6df03d8e
PT:2492070 : Fist Login wizard added
Committed by: Jarrett Jordaan Reviewed by: Megan Watson
Showing
27 changed files
with
358 additions
and
47 deletions
setup/firstlogin/config/community_config.xml
| ... | ... | @@ -4,12 +4,12 @@ |
| 4 | 4 | Document : config.xml |
| 5 | 5 | Created on : 01 July 2009, 9:57 AM |
| 6 | 6 | Author : KnowledgeTree Team |
| 7 | - Description: First login steps | |
| 7 | + Description: Commercial steps | |
| 8 | 8 | --> |
| 9 | 9 | |
| 10 | -<migrate version="3.7" type="Commercial Edition"> | |
| 10 | +<firstlogin version="3.7" type="Commercial Edition"> | |
| 11 | 11 | <steps> |
| 12 | 12 | <step name="Apply Folder Template">templates</step> |
| 13 | 13 | <step name="Complete">complete</step> |
| 14 | 14 | </steps> |
| 15 | - </migrate> | |
| 16 | 15 | \ No newline at end of file |
| 16 | + </firstlogin> | |
| 17 | 17 | \ No newline at end of file | ... | ... |
setup/firstlogin/config/config.xml
| ... | ... | @@ -7,9 +7,9 @@ |
| 7 | 7 | Description: First login steps |
| 8 | 8 | --> |
| 9 | 9 | |
| 10 | -<migrate version="3.7" type="Commercial Edition"> | |
| 10 | +<firstlogin version="3.7" type="Commercial Edition"> | |
| 11 | 11 | <steps> |
| 12 | 12 | <step name="Apply Folder Template">templates</step> |
| 13 | 13 | <step name="Complete">complete</step> |
| 14 | 14 | </steps> |
| 15 | - </migrate> | |
| 16 | 15 | \ No newline at end of file |
| 16 | + </firstlogin> | |
| 17 | 17 | \ No newline at end of file | ... | ... |
setup/firstlogin/firstlogin.php
| ... | ... | @@ -489,11 +489,9 @@ class firstlogin { |
| 489 | 489 | |
| 490 | 490 | private function loadNeeded() { |
| 491 | 491 | $this->_readXml(); // Xml steps |
| 492 | - // Make sure session is cleared | |
| 493 | - $this->_resetSessions(); | |
| 492 | + $this->_resetSessions(); // Make sure session is cleared | |
| 494 | 493 | $this->_loadFromSessions(); |
| 495 | - if(isset($_POST['Next'])) { | |
| 496 | - $this->action = 'next'; | |
| 494 | + if(isset($_POST['Next'])) { $this->action = 'next'; | |
| 497 | 495 | $this->response = 'next'; |
| 498 | 496 | } elseif (isset($_POST['Previous'])) { |
| 499 | 497 | $this->action = 'previous'; |
| ... | ... | @@ -504,6 +502,9 @@ class firstlogin { |
| 504 | 502 | } elseif (isset($_POST['Edit'])) { |
| 505 | 503 | $this->action = 'edit'; |
| 506 | 504 | $this->response = 'next'; |
| 505 | + } elseif (isset($_POST['Skip'])) { | |
| 506 | + $this->action = 'next'; | |
| 507 | + $this->response = 'next'; | |
| 507 | 508 | } else { |
| 508 | 509 | $this->response = ''; |
| 509 | 510 | $this->action = ''; | ... | ... |
setup/firstlogin/firstloginWizard.php
| ... | ... | @@ -80,7 +80,7 @@ class firstloginWizard extends WizardBase { |
| 80 | 80 | $ins = new firstlogin(); // Instantiate |
| 81 | 81 | $ins->resolveErrors($response); // Run step |
| 82 | 82 | } else { |
| 83 | - $ins = new firstlogin(new Session()); // Instantiate and pass the session class | |
| 83 | + $ins = new firstlogin(new wSession()); // Instantiate and pass the session class | |
| 84 | 84 | $ins->step(); // Run step |
| 85 | 85 | } |
| 86 | 86 | } | ... | ... |
setup/firstlogin/steps/firstloginComplete.php
setup/firstlogin/steps/firstloginTemplates.php
| ... | ... | @@ -43,6 +43,11 @@ |
| 43 | 43 | * @version Version 0.1 |
| 44 | 44 | */ |
| 45 | 45 | |
| 46 | +// Load needed system files. | |
| 47 | +require_once(SYSTEM_DIR . "config/dmsDefaults.php"); | |
| 48 | +require_once(KT_LIB_DIR . '/plugins/plugin.inc.php'); | |
| 49 | +require_once(KT_LIB_DIR . '/plugins/pluginregistry.inc.php'); | |
| 50 | + | |
| 46 | 51 | class firstloginTemplates extends Step { |
| 47 | 52 | /** |
| 48 | 53 | * Flag if step needs to run silently |
| ... | ... | @@ -62,18 +67,61 @@ class firstloginTemplates extends Step { |
| 62 | 67 | */ |
| 63 | 68 | function doStep() { |
| 64 | 69 | $this->temp_variables = array( |
| 65 | - "step_name"=>"folderstructures", | |
| 70 | + "step_name"=>"templates", | |
| 66 | 71 | "silent"=>$this->silent); |
| 67 | - return $this->doRun(); | |
| 72 | + if(!$this->inStep("templates")) { // Landing | |
| 73 | + return 'landing'; | |
| 74 | + } | |
| 75 | + if($this->next()) { // Next click | |
| 76 | + $this->applyTemplates(); // Apply folder template structures | |
| 77 | + return 'next'; // And go to next step | |
| 78 | + } else if($this->skip()) { // Skip Step | |
| 79 | + return 'next'; | |
| 80 | + } | |
| 81 | + | |
| 82 | + $this->doRun(); // Set folder structure templates | |
| 83 | + return 'landing'; // Default to landing | |
| 68 | 84 | } |
| 69 | 85 | |
| 70 | 86 | function doRun() { |
| 71 | - | |
| 87 | + $this->temp_variables['aFolderTemplates'] = $this->getTemplates(); | |
| 72 | 88 | return 'landing'; |
| 73 | 89 | } |
| 74 | 90 | |
| 91 | + function applyTemplates() { | |
| 92 | + | |
| 93 | + } | |
| 94 | + | |
| 95 | + function getTemplates() { | |
| 96 | + if (KTPluginUtil::pluginIsActive('fs.FolderTemplatesPlugin.plugin')) { // Check if folder templates plugin is active | |
| 97 | + $oRegistry =& KTPluginRegistry::getSingleton(); | |
| 98 | + $oPlugin =& $oRegistry->getPlugin('fs.FolderTemplatesPlugin.plugin'); // Get a handle on the plugin | |
| 99 | + return $oPlugin->getFirstLoginTemplates(); | |
| 100 | + } | |
| 101 | + } | |
| 102 | + | |
| 103 | + function getTemplateNodes() { | |
| 104 | + if (KTPluginUtil::pluginIsActive('fs.FolderTemplatesPlugin.plugin')) { // Check if folder templates plugin is active | |
| 105 | + $oRegistry =& KTPluginRegistry::getSingleton(); | |
| 106 | + $oPlugin =& $oRegistry->getPlugin('fs.FolderTemplatesPlugin.plugin'); // Get a handle on the plugin | |
| 107 | + return $oPlugin->getFirstLoginTemplates(); | |
| 108 | + } | |
| 109 | + } | |
| 110 | + | |
| 75 | 111 | public function getErrors() { |
| 76 | 112 | return $this->error; |
| 77 | 113 | } |
| 114 | + | |
| 115 | + /** | |
| 116 | + * Stores varibles used by template | |
| 117 | + * | |
| 118 | + * @author KnowledgeTree Team | |
| 119 | + * @params none | |
| 120 | + * @access public | |
| 121 | + * @return array | |
| 122 | + */ | |
| 123 | + public function getStepVars() { | |
| 124 | + return $this->temp_variables; | |
| 125 | + } | |
| 78 | 126 | } |
| 79 | 127 | ?> |
| 80 | 128 | \ No newline at end of file | ... | ... |
setup/firstlogin/templates/complete.tpl
| 1 | -<form action="index.php?step_name=<?php echo $step_name; ?>" method="post" id="<?php echo $step_name; ?>"> | |
| 1 | +<form id="<?php echo $step_name; ?>"> | |
| 2 | 2 | <p class="title">Preferences Completed</p> |
| 3 | - | |
| 4 | - <p class="description">Your system preferences have been applied</p> | |
| 5 | 3 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 6 | - | |
| 7 | - <input class="button_next" type="submit" value="Next" name="Next"/> | |
| 4 | + <p class="description">Your system preferences have been applied</p> | |
| 5 | + </div> | |
| 6 | + <input type="submit" name="Next" value="Finish" class="button_next"/> | |
| 8 | 7 | </form> |
| 8 | +<script type="text/javascript"> | |
| 9 | + $("#duname").focus(); | |
| 10 | +</script> | |
| 9 | 11 | <?php if (AJAX) { echo $html->js('form.js'); } ?> |
| 10 | 12 | \ No newline at end of file | ... | ... |
setup/firstlogin/templates/error.tpl
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <span style="font-size:80%;"> <?php echo $fl_type; ?> </span> |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| 20 | - <div id="wrapper"> | |
| 20 | + <div id="wrapper" class="wizard"> | |
| 21 | 21 | <div id="container"> |
| 22 | 22 | <div id="sidebar"> |
| 23 | 23 | <span class="current">Welcome</span><br><span class="inactive">Current Installation</span><br><span class="inactive">Deactivate Services</span><br><span class="inactive">Database Migration</span><br><span class="inactive">Complete</span><br></div> | ... | ... |
setup/firstlogin/templates/templates.tpl
| 1 | 1 | <form id="<?php echo $step_name; ?>" action="index.php?step_name=<?php echo $step_name; ?>" method="post"> |
| 2 | - <p class="title">Apply A Folder Template to KnowledgeTree</p> | |
| 2 | + <p class="title">Apply Applying Templates</p> | |
| 3 | + <p class="description">You can select a base folder layout to apply to your root folder of KnowledgeTree.</p> | |
| 3 | 4 | <div id="step_content_<?php echo $step_name; ?>" class="step"> |
| 5 | + <div class="field "> | |
| 6 | + <p class="descriptiveText">Choose a template, if you would like to generate predefined folders.</p> | |
| 7 | + <p class="errorMessage"></p> | |
| 8 | + <select name="data[templateId]"> | |
| 9 | + <option selected="selected" value="">- No template -</option> | |
| 10 | + <?php | |
| 11 | + foreach ($aFolderTemplates as $oFolderTemplate) { | |
| 12 | + echo "<option onclick=\"javascript:{showFolderTemplateTree('{$oFolderTemplate->getId()}')}\" value=\"{$oFolderTemplate->getId()}\">".$oFolderTemplate->getName()."</option>"; | |
| 13 | + } | |
| 14 | + ?> | |
| 15 | + </select> | |
| 4 | 16 | </div> |
| 5 | - <input type="submit" name="Previous" value="Previous" class="button_previous"/> | |
| 17 | + <div id="templates_tree"> | |
| 18 | + <table cellspacing="0" class="tree_table"> | |
| 19 | + <?php | |
| 20 | + foreach ($aFolderTemplates as $oFolderTemplate) { | |
| 21 | + ?> | |
| 22 | + <tr style="display:none;" id="template_<?php echo $oFolderTemplate->getId(); ?>"> | |
| 23 | + <td> | |
| 24 | + <div class="tree_icon tree_folder closed"> </div> | |
| 25 | + </td> | |
| 26 | + <td> | |
| 27 | + <label> | |
| 28 | + <?php echo $oFolderTemplate->getName(); ?> | |
| 29 | + </label> | |
| 30 | + </td> | |
| 31 | + </tr> | |
| 32 | + <tr style="display:none;" id="templates_<?php echo $oFolderTemplate->getId(); ?>"> | |
| 33 | + <?php | |
| 34 | + } | |
| 35 | + ?> | |
| 36 | + </table> | |
| 37 | + </div> | |
| 38 | + </div> | |
| 39 | + <input type="submit" name="Skip" value="Skip" class="button_skip"/> | |
| 6 | 40 | <input type="submit" name="Next" value="Next" class="button_next"/> |
| 7 | 41 | </form> |
| 8 | 42 | <script type="text/javascript"> | ... | ... |
setup/firstlogin/templates/wizard.tpl
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <?php echo $html->js('jquery.form.js'); ?> |
| 8 | 8 | <?php echo $html->js('jquery.blockUI.js'); ?> |
| 9 | 9 | <?php echo $html->js('jquery.hotkeys.js'); ?> |
| 10 | - <?php echo $html->js('wizard.js'); ?> | |
| 10 | + <?php echo $html->js('firstlogin.js'); ?> | |
| 11 | 11 | <?php echo $html->css('wizard.css'); ?> |
| 12 | 12 | <?php echo $html->css('firstlogin.css'); ?> |
| 13 | 13 | <?php if(AGENT == "IE6") echo $html->css('ie6.css'); ?> |
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | <span style="font-size:120%;"> <?php if (isset($vars['fl_version'])) echo $vars['fl_type']; ?></span> |
| 27 | 27 | </div> |
| 28 | 28 | </div> |
| 29 | - <div id="wrapper"> | |
| 29 | + <div id="wrapper" class="wizard"> | |
| 30 | 30 | <div id="container"> |
| 31 | 31 | <div id="sidebar"> |
| 32 | 32 | <?php echo $vars['left']; ?> |
| ... | ... | @@ -49,5 +49,5 @@ |
| 49 | 49 | </body> |
| 50 | 50 | </html> |
| 51 | 51 | <script> |
| 52 | - var w = new wizard(); | |
| 52 | + var fl = new firstlogin(); | |
| 53 | 53 | </script> |
| 54 | 54 | \ No newline at end of file | ... | ... |
setup/firstlogin/wSession.php
0 → 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Session Controller. | |
| 4 | +* | |
| 5 | +* KnowledgeTree Community Edition | |
| 6 | +* Document Management Made Simple | |
| 7 | +* Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc. | |
| 8 | +* | |
| 9 | +* This program is free software; you can redistribute it and/or modify it under | |
| 10 | +* the terms of the GNU General Public License version 3 as published by the | |
| 11 | +* Free Software Foundation. | |
| 12 | +* | |
| 13 | +* This program is distributed in the hope that it will be useful, but WITHOUT | |
| 14 | +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 15 | +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
| 16 | +* details. | |
| 17 | +* | |
| 18 | +* You should have received a copy of the GNU General Public License | |
| 19 | +* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | +* | |
| 21 | +* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 22 | +* California 94120-7775, or email info@knowledgetree.com. | |
| 23 | +* | |
| 24 | +* The interactive user interfaces in modified source and object code versions | |
| 25 | +* of this program must display Appropriate Legal Notices, as required under | |
| 26 | +* Section 5 of the GNU General Public License version 3. | |
| 27 | +* | |
| 28 | +* In accordance with Section 7(b) of the GNU General Public License version 3, | |
| 29 | +* these Appropriate Legal Notices must retain the display of the "Powered by | |
| 30 | +* KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | +* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | |
| 32 | +* must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | +* copyright notice. | |
| 34 | +* Contributor( s): ______________________________________ | |
| 35 | +*/ | |
| 36 | + | |
| 37 | +/** | |
| 38 | +* | |
| 39 | +* @copyright 2008-2010, KnowledgeTree Inc. | |
| 40 | +* @license GNU General Public License version 3 | |
| 41 | +* @author KnowledgeTree Team | |
| 42 | +* @package First Login | |
| 43 | +* @version Version 0.1 | |
| 44 | +*/ | |
| 45 | +class wSession extends SessionBase | |
| 46 | +{ | |
| 47 | + public $salt = 'firstlogin'; | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * Constructs session object | |
| 51 | + * | |
| 52 | + * @author KnowledgeTree Team | |
| 53 | + * @access public | |
| 54 | + * @param none | |
| 55 | + */ | |
| 56 | + public function __construct() { | |
| 57 | + $this->setSalt($this->salt); | |
| 58 | + $this->startSession(); | |
| 59 | + } | |
| 60 | + | |
| 61 | +} | |
| 62 | +?> | |
| 0 | 63 | \ No newline at end of file | ... | ... |
setup/migrate/migrateWizard.php
| ... | ... | @@ -80,7 +80,7 @@ class MigrateWizard extends WizardBase { |
| 80 | 80 | $ins = new Migrater(); // Instantiate the migrater |
| 81 | 81 | $ins->resolveErrors($response); // Run step |
| 82 | 82 | } else { |
| 83 | - $ins = new Migrater(new Session()); // Instantiate the migrater and pass the session class | |
| 83 | + $ins = new Migrater(new wSession()); // Instantiate the migrater and pass the session class | |
| 84 | 84 | $ins->step(); // Run step |
| 85 | 85 | } |
| 86 | 86 | } | ... | ... |
setup/migrate/templates/error.tpl
| ... | ... | @@ -17,7 +17,7 @@ |
| 17 | 17 | <span style="font-size:80%;"> <?php echo $migrate_type; ?> </span> |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| 20 | - <div id="wrapper"> | |
| 20 | + <div id="wrapper" class="wizard"> | |
| 21 | 21 | <div id="container"> |
| 22 | 22 | <div id="sidebar"> |
| 23 | 23 | <span class="current">Welcome</span><br><span class="inactive">Current Installation</span><br><span class="inactive">Deactivate Services</span><br><span class="inactive">Database Migration</span><br><span class="inactive">Complete</span><br></div> | ... | ... |
setup/migrate/templates/wizard.tpl
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | <span style="font-size:120%;"> <?php if (isset($vars['migrate_version'])) echo $vars['migrate_type']; ?></span> |
| 27 | 27 | </div> |
| 28 | 28 | </div> |
| 29 | - <div id="wrapper"> | |
| 29 | + <div id="wrapper" class="wizard"> | |
| 30 | 30 | <div id="container"> |
| 31 | 31 | <div id="sidebar"> |
| 32 | 32 | <?php echo $vars['left']; ?> | ... | ... |
setup/migrate/wSession.php
0 → 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Session Controller. | |
| 4 | +* | |
| 5 | +* KnowledgeTree Community Edition | |
| 6 | +* Document Management Made Simple | |
| 7 | +* Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc. | |
| 8 | +* | |
| 9 | +* This program is free software; you can redistribute it and/or modify it under | |
| 10 | +* the terms of the GNU General Public License version 3 as published by the | |
| 11 | +* Free Software Foundation. | |
| 12 | +* | |
| 13 | +* This program is distributed in the hope that it will be useful, but WITHOUT | |
| 14 | +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 15 | +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
| 16 | +* details. | |
| 17 | +* | |
| 18 | +* You should have received a copy of the GNU General Public License | |
| 19 | +* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | +* | |
| 21 | +* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 22 | +* California 94120-7775, or email info@knowledgetree.com. | |
| 23 | +* | |
| 24 | +* The interactive user interfaces in modified source and object code versions | |
| 25 | +* of this program must display Appropriate Legal Notices, as required under | |
| 26 | +* Section 5 of the GNU General Public License version 3. | |
| 27 | +* | |
| 28 | +* In accordance with Section 7(b) of the GNU General Public License version 3, | |
| 29 | +* these Appropriate Legal Notices must retain the display of the "Powered by | |
| 30 | +* KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | +* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | |
| 32 | +* must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | +* copyright notice. | |
| 34 | +* Contributor( s): ______________________________________ | |
| 35 | +*/ | |
| 36 | + | |
| 37 | +/** | |
| 38 | +* | |
| 39 | +* @copyright 2008-2010, KnowledgeTree Inc. | |
| 40 | +* @license GNU General Public License version 3 | |
| 41 | +* @author KnowledgeTree Team | |
| 42 | +* @package Migrater | |
| 43 | +* @version Version 0.1 | |
| 44 | +*/ | |
| 45 | +class wSession extends SessionBase | |
| 46 | +{ | |
| 47 | + public $salt = 'migrate'; | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * Constructs session object | |
| 51 | + * | |
| 52 | + * @author KnowledgeTree Team | |
| 53 | + * @access public | |
| 54 | + * @param none | |
| 55 | + */ | |
| 56 | + public function __construct() { | |
| 57 | + $this->setSalt($this->salt); | |
| 58 | + $this->startSession(); | |
| 59 | + } | |
| 60 | + | |
| 61 | +} | |
| 62 | +?> | |
| 0 | 63 | \ No newline at end of file | ... | ... |
setup/upgrade/templates/error.tpl
setup/upgrade/templates/progress.tpl
setup/upgrade/templates/wizard.tpl
setup/wizard/installWizard.php
| ... | ... | @@ -67,7 +67,7 @@ class InstallWizard extends WizardBase { |
| 67 | 67 | $ins = new Installer(); // Instantiate the installer |
| 68 | 68 | $ins->resolveErrors($response); // Run step |
| 69 | 69 | } else { |
| 70 | - $ins = new Installer(new Session()); // Instantiate the installer and pass the session class | |
| 70 | + $ins = new Installer(new wSession()); // Instantiate the installer and pass the session class | |
| 71 | 71 | $ins->step(); // Run step |
| 72 | 72 | } |
| 73 | 73 | } | ... | ... |
setup/wizard/lib/helpers/htmlHelper.php
| ... | ... | @@ -103,7 +103,7 @@ class htmlHelper { |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | function tpjs($name) { |
| 106 | - return "<script type=\"text/javascript\" src=\"".WIZARD_ROOT."thirdpartyjs/jquery/$name\"></script>"; | |
| 106 | + return "<script type=\"text/javascript\" src=\"".WIZARD_ROOTURL."thirdpartyjs/jquery/$name\"></script>"; | |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | function js($name) { | ... | ... |
setup/wizard/path.php
| ... | ... | @@ -133,8 +133,8 @@ |
| 133 | 133 | } else { |
| 134 | 134 | define('INSTALL_TYPE', 'community'); |
| 135 | 135 | } |
| 136 | - define('WIZARD_ROOT',guessRootUrl().DS); | |
| 137 | - define('WIZARD_SETUP',WIZARD_ROOT . "setup"); | |
| 136 | + define('WIZARD_ROOTURL',guessRootUrl().DS); # Used by template resources | |
| 137 | + define('WIZARD_SETUP',WIZARD_ROOTURL . "setup"); | |
| 138 | 138 | |
| 139 | 139 | function guessRootUrl() { |
| 140 | 140 | $urlpath = $_SERVER['SCRIPT_NAME']; | ... | ... |
setup/wizard/resources/css/firstlogin.css
| 1 | -#step_content_folderstructures { | |
| 1 | +#step_content_templates { | |
| 2 | 2 | border: 1px solid rgb(207, 207, 207); |
| 3 | 3 | overflow: auto; |
| 4 | 4 | padding: 5px; |
| 5 | 5 | min-height:315px; |
| 6 | +} | |
| 7 | + | |
| 8 | +.button_skip { | |
| 9 | + float:right; | |
| 10 | + margin-left:5px; | |
| 11 | + margin-top:10px; | |
| 6 | 12 | } |
| 7 | 13 | \ No newline at end of file | ... | ... |
setup/wizard/resources/js/firstlogin.js
| 1 | +// Class Wizard | |
| 2 | +var ajaxOn; | |
| 3 | +var ktfolderAccess = "plugins/commercial/folder-templates/KTFolderTemplates.php?action="; | |
| 4 | +var ktmanageFolderAccess = "admin.php?kt_path_info=misc/adminfoldertemplatesmanagement&action="; | |
| 5 | +var actionForm = false; | |
| 6 | + | |
| 7 | +function firstlogin() { | |
| 8 | + this.ajaxOn = false; | |
| 9 | +} | |
| 10 | + | |
| 11 | +var showFolderTemplateTree = function(templateId) { | |
| 12 | + alert($('template_' + templateId).attr('style')); | |
| 13 | + $('template_' + templateId).attr('style', 'display:block'); // Show template | |
| 14 | +// var address = this.ktfolderAccess + "getTemplateNodes&templateId="+templateId; | |
| 15 | +// getUrl("templates_" + templateId, "template_" + templateId, address); | |
| 16 | +} | |
| 17 | + | |
| 1 | 18 | /* |
| 2 | -* Create the electronic signature dialog | |
| 19 | +* Create the dialog | |
| 3 | 20 | */ |
| 4 | -var showForm = function(){ | |
| 5 | - createForm(); | |
| 6 | - // create the window | |
| 7 | - this.win = new Ext.Window({ | |
| 21 | +var showForm = function() { | |
| 22 | + createForm(); // Populate the form | |
| 23 | + this.win = new Ext.Window({ // create the window | |
| 8 | 24 | applyTo : 'firstlogin', |
| 9 | 25 | layout : 'fit', |
| 10 | 26 | width : 800, |
| ... | ... | @@ -20,9 +36,9 @@ var showForm = function(){ |
| 20 | 36 | |
| 21 | 37 | var createForm = function() { |
| 22 | 38 | var holder = "<div id='firstlogin'></div>"; |
| 23 | - $("#wrapper").append(holder);// Append to current dashboard | |
| 39 | + $("#wrapper").append(holder); // Append to current dashboard | |
| 24 | 40 | var address = "setup/firstlogin/index.php"; |
| 25 | - getUrl(address, "firstlogin"); | |
| 41 | + getUrl(address, "firstlogin"); // Pull in existing wizard | |
| 26 | 42 | } |
| 27 | 43 | |
| 28 | 44 | // Send request and update a div |
| ... | ... | @@ -40,6 +56,6 @@ var getUrl = function (address, div) { |
| 40 | 56 | } |
| 41 | 57 | |
| 42 | 58 | $(function() { // Document is ready |
| 43 | - | |
| 44 | - showForm(); | |
| 59 | + if($("#wrapper").attr('class') != 'wizard') // Check if we in a wizard, or on the dashboard | |
| 60 | + showForm(); // Display first login wizard | |
| 45 | 61 | }); | ... | ... |
setup/wizard/share/stepBase.php
| ... | ... | @@ -246,6 +246,22 @@ class StepBase { |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /** |
| 249 | + * Checks if skip button has been clicked | |
| 250 | + * | |
| 251 | + * @author KnowledgeTree Team | |
| 252 | + * @param none | |
| 253 | + * @access public | |
| 254 | + * @return boolean | |
| 255 | + */ | |
| 256 | + public function skip() { | |
| 257 | + if(isset($_POST['Skip'])) { | |
| 258 | + return true; | |
| 259 | + } | |
| 260 | + | |
| 261 | + return false; | |
| 262 | + } | |
| 263 | + | |
| 264 | + /** | |
| 249 | 265 | * Checks if Confirm button has been clicked |
| 250 | 266 | * |
| 251 | 267 | * @author KnowledgeTree Team | ... | ... |
setup/wizard/templates/error.tpl
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | <span style="font-size:80%;"> <?php echo $install_type; ?> </span> |
| 20 | 20 | </div> |
| 21 | 21 | </div> |
| 22 | - <div id="wrapper"> | |
| 22 | + <div id="wrapper" class="wizard"> | |
| 23 | 23 | <div id="container"> |
| 24 | 24 | <div id="sidebar"> |
| 25 | 25 | <span id="welcome" class="current">Welcome</span><br><span id="license" class="inactive">License Agreement</span><br><span id="installtype" class="inactive">Install Type</span><br><span id="dependencies" class="inactive">PHP Dependencies</span><br><span id="configuration" class="inactive">System Configuration</span><br><span id="services" class="inactive">Service Dependency</span><br><span id="database" class="inactive">Database Configuration</span><br><span id="registration" class="inactive">Registration</span><br><span id="install" class="inactive">Install</span><br><span id="complete" class="inactive">Complete</span><br></div> | ... | ... |
setup/wizard/templates/wizard.tpl
setup/wizard/wSession.php
0 → 100644
| 1 | +<?php | |
| 2 | +/** | |
| 3 | +* Session Controller. | |
| 4 | +* | |
| 5 | +* KnowledgeTree Community Edition | |
| 6 | +* Document Management Made Simple | |
| 7 | +* Copyright (C) 2008, 2009, 2010 KnowledgeTree Inc. | |
| 8 | +* | |
| 9 | +* This program is free software; you can redistribute it and/or modify it under | |
| 10 | +* the terms of the GNU General Public License version 3 as published by the | |
| 11 | +* Free Software Foundation. | |
| 12 | +* | |
| 13 | +* This program is distributed in the hope that it will be useful, but WITHOUT | |
| 14 | +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 15 | +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
| 16 | +* details. | |
| 17 | +* | |
| 18 | +* You should have received a copy of the GNU General Public License | |
| 19 | +* along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 20 | +* | |
| 21 | +* You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, | |
| 22 | +* California 94120-7775, or email info@knowledgetree.com. | |
| 23 | +* | |
| 24 | +* The interactive user interfaces in modified source and object code versions | |
| 25 | +* of this program must display Appropriate Legal Notices, as required under | |
| 26 | +* Section 5 of the GNU General Public License version 3. | |
| 27 | +* | |
| 28 | +* In accordance with Section 7(b) of the GNU General Public License version 3, | |
| 29 | +* these Appropriate Legal Notices must retain the display of the "Powered by | |
| 30 | +* KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 31 | +* logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | |
| 32 | +* must display the words "Powered by KnowledgeTree" and retain the original | |
| 33 | +* copyright notice. | |
| 34 | +* Contributor( s): ______________________________________ | |
| 35 | +*/ | |
| 36 | + | |
| 37 | +/** | |
| 38 | +* | |
| 39 | +* @copyright 2008-2010, KnowledgeTree Inc. | |
| 40 | +* @license GNU General Public License version 3 | |
| 41 | +* @author KnowledgeTree Team | |
| 42 | +* @package Installer | |
| 43 | +* @version Version 0.1 | |
| 44 | +*/ | |
| 45 | +class wSession extends SessionBase | |
| 46 | +{ | |
| 47 | + | |
| 48 | + public $salt = 'installers'; | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * Constructs session object | |
| 52 | + * | |
| 53 | + * @author KnowledgeTree Team | |
| 54 | + * @access public | |
| 55 | + * @param none | |
| 56 | + */ | |
| 57 | + public function __construct() { | |
| 58 | + $this->setSalt($this->salt); | |
| 59 | + $this->startSession(); | |
| 60 | + } | |
| 61 | + | |
| 62 | + | |
| 63 | +} | |
| 64 | +?> | |
| 0 | 65 | \ No newline at end of file | ... | ... |