diff --git a/cfg/.gitignore b/cfg/.gitignore
new file mode 100644
index 0000000000..00853a568b
--- /dev/null
+++ b/cfg/.gitignore
@@ -0,0 +1 @@
+custom*.inc.php
diff --git a/cfg/const.inc.php b/cfg/const.inc.php
index 6e6394c36f..483bf79cf1 100644
--- a/cfg/const.inc.php
+++ b/cfg/const.inc.php
@@ -15,21 +15,23 @@
/* [GLOBAL SETTINGS] */
-
define('TL_SMARTY_VERSION',3); // @since 1.9.8
+define('TL_JQUERY','third_party/jquery/jquery-3.4.1.min.js');
+
/** TestLink Release version (MUST BE changed before the release day) */
-define('TL_VERSION_NUMBER', '1.9.20');
+define('TL_VERSION_NUMBER', '2.0.0');
define('TL_VERSION', TL_VERSION_NUMBER . ' [DEV] ');
-define('TL_FACE_DIR', 'prague');
+define('TL_FACE_DIR', 'buenosaires');
/** Latest Database version that is used to give users feedback
* about necesssary upgrades
* if you set this parameter also upgrade
* lib/functions/configCheck.php - checkSchemaVersion() */
-define('TL_LATEST_DB_VERSION', 'DB ' . '1.9.20');
+define('TL_LATEST_DB_VERSION', 'DB ' . '2.0.0');
-// needed to avoid problems in install scripts that do not include config.inc.php
+// needed to avoid problems in install scripts
+// that do not include config.inc.php
// want to point to root install dir, need to remove fixed part
if (!defined('TL_ABS_PATH')) {
define('TL_ABS_PATH', str_replace('cfg','',dirname(__FILE__)));
@@ -60,7 +62,7 @@
}
-// --------------------------------------------------------------------------------
+// -----------------------------------------------------------------
/* [GENERAL MAGIC NUMBERS] */
/** PHPMAILER */
@@ -81,15 +83,9 @@
define('ERROR', 0 );
/** More Descriptive constant names */
-define('HIGH', 3 );
-define('MEDIUM', 2 );
-define('LOW', 1 );
-
-/** user for notes - see BUGID 0002469: $tlCfg->exec_cfg->expand_collapse
- very important do not change values, logic depends on values*/
-define('LAST_USER_CHOICE',2);
-define('COLLAPSE', 0);
-define('EXPAND',1 );
+define('HIGH', 3);
+define('MEDIUM', 2);
+define('LOW',1);
// used in several functions instead of MAGIC NUMBERS - Don't change
define('ALL_PRODUCTS', 0);
@@ -962,6 +958,4 @@
define('USE_LATEST_EXEC_ON_CONTEX_FOR_COUNTERS', 1);
define('USE_LATEST_EXEC_ON_TESTPLAN_FOR_COUNTERS',2);
define('USE_LATEST_EXEC_ON_TESTPLAN_PLAT_FOR_COUNTERS',3);
-
-
// END
diff --git a/custom_config.inc.php.example b/cfg/samples/custom_config.inc.php.example
similarity index 100%
rename from custom_config.inc.php.example
rename to cfg/samples/custom_config.inc.php.example
diff --git a/custom_config.inc.php.example.github_oauth b/cfg/samples/custom_config.inc.php.example.github_oauth
similarity index 100%
rename from custom_config.inc.php.example.github_oauth
rename to cfg/samples/custom_config.inc.php.example.github_oauth
diff --git a/custom_config.inc.php.github.testlinkOauthProvider b/cfg/samples/custom_config.inc.php.github.testlinkOauthProvider
similarity index 100%
rename from custom_config.inc.php.github.testlinkOauthProvider
rename to cfg/samples/custom_config.inc.php.github.testlinkOauthProvider
diff --git a/custom_config.inc.php.google_oauth b/cfg/samples/custom_config.inc.php.google_oauth
similarity index 100%
rename from custom_config.inc.php.google_oauth
rename to cfg/samples/custom_config.inc.php.google_oauth
diff --git a/cfg/custom_reports.cfg.php.example b/cfg/samples/custom_reports.cfg.php.example
similarity index 100%
rename from cfg/custom_reports.cfg.php.example
rename to cfg/samples/custom_reports.cfg.php.example
diff --git a/config.inc.php b/config.inc.php
index 30ea042637..16a6730c13 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -123,10 +123,11 @@
/** Include constants and magic numbers (users should not change it)*/
-require_once(TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR . 'const.inc.php');
+$cfgPath = TL_ABS_PATH . 'cfg' . DIRECTORY_SEPARATOR;
+require_once($cfgPath . 'const.inc.php');
-// ----------------------------------------------------------------------------
+// --------------------------------------------------------------
/** @var string used to have (when needed) a possibility to identify different TL instances
@since 1.9.4 used on mail subject when mail logger is used
*/
@@ -148,7 +149,7 @@
* @see $tlCfg->cookie->path
* @global string $tlCfg->cookie->prefix
*/
-$tlCfg->cookie->prefix = 'TESTLINK1920';
+$tlCfg->cookie->prefix = 'TESTLINK200';
/**
* @link http://php.net/function.setcookie
@@ -1138,15 +1139,23 @@
// 'latest' => latest execution notes.
$tlCfg->exec_cfg->steps_exec_status_default = 'empty';
-// Parameters to show notes/details when entering test execution feature
-// EXPAND: show expanded/open
-// COLLAPSE: show collapsed/closede
-// LAST_USER_CHOICE: get status from cookie that holds last user choice.[STANDARD BEHAVIOUR]
+// Parameters to show notes/details
+// when entering test execution feature
+// 'EXPAND': show expanded/open
+// 'COLLAPSE': show collapsed/closed
+// 'LAST_USER_CHOICE':
+// get status from cookie that holds
+// latest user choice.
+// This is the [STANDARD BEHAVIOUR]
$tlCfg->exec_cfg->expand_collapse = new stdClass();
-$tlCfg->exec_cfg->expand_collapse->testplan_notes = LAST_USER_CHOICE;
-$tlCfg->exec_cfg->expand_collapse->platform_description = LAST_USER_CHOICE;
-$tlCfg->exec_cfg->expand_collapse->build_description = LAST_USER_CHOICE;
-$tlCfg->exec_cfg->expand_collapse->testsuite_details = LAST_USER_CHOICE;
+$tlCfg->exec_cfg->expand_collapse
+ ->testplan_notes = 'LAST_USER_CHOICE';
+$tlCfg->exec_cfg->expand_collapse
+ ->platform_description = 'LAST_USER_CHOICE';
+$tlCfg->exec_cfg->expand_collapse
+ ->build_description = 'LAST_USER_CHOICE';
+$tlCfg->exec_cfg->expand_collapse
+ ->testsuite_details = 'LAST_USER_CHOICE';
@@ -2045,7 +2054,7 @@
-// ----------------------------------------------------------------------------
+// -------------------------------------------------------------
/* [PROXY] */
/* Used only */
/* mantissoapInterface.class.php */
@@ -2060,22 +2069,23 @@
/** Plugins feature */
define('TL_PLUGIN_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR);
-// ----- End of Config ------------------------------------------------------------------
-// --------------------------------------------------------------------------------------
+// ----- End of Config ----------------------------------------
+
+// ------------------------------------------------------------
// DO NOT DO CHANGES BELOW
-// --------------------------------------------------------------------------------------
+// ------------------------------------------------------------
/** Functions for check request status */
require_once('configCheck.php');
-
-if( !defined('TL_JQUERY') )
-{
- define('TL_JQUERY','jquery-2.2.4.min.js' );
+/**
+ * @see also cfg/const.inc.php
+ */
+if (!defined('TL_JQUERY')) {
+ define('TL_JQUERY','third_party/jquery/jquery-3.4.1.min.js');
}
-if( !defined('TL_DATATABLES_DIR') )
-{
+if (!defined('TL_DATATABLES_DIR')) {
define('TL_DATATABLES_DIR','DataTables-1.10.4' );
}
@@ -2085,9 +2095,8 @@
define('TL_BASE_HREF', get_home_url(array('force_https' => $tlCfg->force_https)));
clearstatcache();
-if ( file_exists( TL_ABS_PATH . 'custom_config.inc.php' ) )
-{
- require_once( TL_ABS_PATH . 'custom_config.inc.php' );
+if ( file_exists( $cfgPath . 'custom_config.inc.php' ) ) {
+ require_once( $cfgPath . 'custom_config.inc.php' );
}
diff --git a/error.php b/error.php
index 4a93506362..ae17c98847 100644
--- a/error.php
+++ b/error.php
@@ -6,53 +6,41 @@
* General purpose error page.
*
* @package TestLink
- * @copyright 2012,2019 TestLink community
+ * @copyright 2012 TestLink community
*
* @internal revisions
- * @used by: kinow - TICKET 4977 - CSRF - Advisory ID: HTB23088
+ * @since 1.9.4
+ * 20120703 - kinow - TICKET 4977 - CSRF - Advisory ID: HTB23088
*
**/
require_once('config.inc.php');
require_once('common.php');
-/**
- *
- */
-function init_args() {
-
- $args = new stdClass();
- $args->message = 'Rocket Raccoon is watching You';
- $code = isset($_REQUEST['code']) ? $_REQUEST['code'] : 0;
-
- switch($code) {
- case 1:
- $args->message = 'No CSRFName found, probable invalid request.';
- break;
-
- case 2:
- $args->message = 'Invalid CSRF token';
- break;
-
- default:
- break;
- }
-
- return $args;
+function init_args()
+{
+ $iParams = array(
+ 'message' => array(tlInputParameter::STRING_N,0,255)
+ );
+ $pParams = R_PARAMS($iParams);
+ $args = new stdClass();
+ if(isset($pParams['message'])) {
+ $args->message = $pParams['message'];
+ }
+ return $args;
}
-/**
- *
- */
-function init_gui($args) {
- $gui = new stdClass();
- $gui->message = '';
-
- if(isset($args->message) {
- $gui->message = $args->message;
- }
-
- return $gui;
+function init_gui($args)
+{
+ $gui = new stdClass();
+ if(isset($args->message))
+ {
+ $gui->message = $args->message;
+ } else {
+ $gui->message = '';
+ }
+
+ return $gui;
}
$templateCfg = templateConfiguration();
@@ -61,4 +49,6 @@ function init_gui($args) {
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
-$smarty->display($templateCfg->default_template);
\ No newline at end of file
+$smarty->display($templateCfg->default_template);
+
+?>
diff --git a/firstLogin.php b/firstLogin.php
index a7febf3842..b0053fe74d 100644
--- a/firstLogin.php
+++ b/firstLogin.php
@@ -5,9 +5,10 @@
*
* @filesource firstLogin.php
* @package TestLink
- * @copyright 2004-2019, TestLink community
+ * @copyright 2004-2016, TestLink community
* @link http://www.testlink.org
*
+ *
*/
require_once('config.inc.php');
require_once('common.php');
@@ -20,7 +21,8 @@
$args = init_args();
$gui = $args;
-if (!config_get('user_self_signup')) {
+if (!config_get('user_self_signup'))
+{
$smarty = new TLSmarty();
$smarty->assign('title', lang_get('fatal_page_title'));
$smarty->assign('content', lang_get('error_self_signup_disabled'));
@@ -32,15 +34,21 @@
doDBConnect($db,database::ONERROREXIT);
$message = ''; //lang_get('your_info_please');
-if( !is_null($args->doEditUser) ) {
- if(strcmp($args->password,$args->password2)) {
+if( !is_null($args->doEditUser) )
+{
+ if(strcmp($args->password,$args->password2))
+ {
$message = lang_get('passwd_dont_match');
- } else {
+ }
+ else
+ {
$user = new tlUser();
$rx = $user->checkPasswordQuality($args->password);
- if( $rx['status_ok'] >= tl::OK ) {
+ if( $rx['status_ok'] >= tl::OK )
+ {
$result = $user->setPassword($args->password);
- if ($result >= tl::OK) {
+ if ($result >= tl::OK)
+ {
$user->login = $args->login;
$user->emailAddress = $args->email;
$user->firstName = $args->firstName;
@@ -48,7 +56,8 @@
$result = $user->writeToDB($db);
$cfg = config_get('notifications');
- if($cfg->userSignUp->enabled) {
+ if($cfg->userSignUp->enabled)
+ {
notifyGlobalAdmins($db,$user);
}
logAuditEvent(TLS("audit_users_self_signup",$args->login),"CREATE",$user->dbID,"users");
@@ -56,10 +65,14 @@
$url2go = "login.php?viewer={$gui->viewer}¬e=first";
redirect(TL_BASE_HREF . $url2go);
exit();
- } else {
+ }
+ else
+ {
$message = getUserErrorMessage($result);
}
- } else {
+ }
+ else
+ {
$message = $rx['msg'];
}
}
@@ -72,11 +85,11 @@
$gui->message = $message;
$smarty->assign('gui',$gui);
-$tpl = str_replace('.php','.tpl',basename($_SERVER['SCRIPT_NAME']));
+// $tpl = str_replace('.php','.tpl',basename($_SERVER['SCRIPT_NAME']));
if( $args->viewer == 'new' ) {
- $tpl='firstLogin-model-marcobiedermann.tpl';
+ $tpl='login/firstLogin-model-marcobiedermann.tpl';
}
-$tpl = 'login/' . $tpl;
+
$smarty->display($tpl);
diff --git a/gui/drag_and_drop/css/context-menu.css b/gui/drag_and_drop/css/context-menu.css
deleted file mode 100644
index 160c2a11ac..0000000000
--- a/gui/drag_and_drop/css/context-menu.css
+++ /dev/null
@@ -1,57 +0,0 @@
-/************************************************************************************************************
-
- DHTML Suite for Applications
- (C) www.dhtmlgoodies.com, August 2006
-
- CSS for the context menu class.
-
- Terms of use:
- Look at the terms of use at http://www.dhtmlgoodies.com/index.html?page=termsOfUse
-
- Thank you!
-
- www.dhtmlgoodies.com
- Alf Magne Kalleland
-
-************************************************************************************************************/
-
-.DHTMLSuite_contextMenu{ /* The bar that is parent of the menu strip */
- position:absolute;
- background-color:#FFF;
- border:1px solid #000;
- padding:1px;
-}
-
-.DHTMLSuite_contextMenu li{
- list-style-type:none;
- padding:1px; /* Equal to border + padding of .DHTMLSuite_item_mouseover */
- border:0px;
- cursor: pointer;
- background-repeat:no-repeat;
- background-position:left center;
-}
-.DHTMLSuite_contextMenu .DHTMLSuite_item_mouseover{
- border:1px solid #000;
- background-color:#EEE;
- padding:0px; /* Padding + border of this element should be equal to padding of li element (see above ) */
-}
-.DHTMLSuite_contextMenu ul{
- margin:0px;
- padding:0px;
-}
-
-.DHTMLSuite_contextMenu a{
- text-decoration:none;
- color:#000;
- padding-left:25px;
-}
-
-.DHTMLSuite_contextMenu div.DHTMLSuite_contextMenu_separator{ /* Css for the separator line */
- height:1px;
- line-height:1px;
- padding:0px;
- background-color: #AAA;
- overflow:hidden;
- margin-top:1px;
- margin-bottom:1px;
-}
diff --git a/gui/drag_and_drop/css/drag-drop-folder-tree.css b/gui/drag_and_drop/css/drag-drop-folder-tree.css
deleted file mode 100644
index 64d68628dd..0000000000
--- a/gui/drag_and_drop/css/drag-drop-folder-tree.css
+++ /dev/null
@@ -1,56 +0,0 @@
- p{
- font-family:arial;
-
- }
- a{
- color:#000;
- font-family:arial;
- font-size:0.8em;
- }
-
- .dhtmlgoodies_tree,#floatingContainer{
- margin:0px;
- padding:0px;
- }
- .dhtmlgoodies_tree ul{ /* Sub menu groups */
- margin-left:20px; /* Left spacing */
- padding-left:0px;
- display:none; /* Initially hide sub nodes */
- }
-
- #floatingContainer ul{
- margin-left:20px; /* Left spacing */
- padding-left:0px;
- }
- .dhtmlgoodies_tree li,#floatingContainer li{ /* Nodes */
- list-style-type:none;
- vertical-align:middle;
-
- }
- .dhtmlgoodies_tree li a,#floatingContainer li a{ /* Node links */
- color:#000;
- text-decoration:none;
- font-family:arial;
- font-size:0.8em;
- padding-left:1px;
- line-height:13px;
- margin-left:2px;
-
- }
- .dhtmlgoodies_tree li a.highlightedNodeItem{
- color:#FFF;
- background-color:#009;
- }
-
-
- body{
- margin:0px;
- padding:0px;
- }
-
- .dhtmlgoodies_tree input.folderTreeTextBox{ /* Css for the text input - rename item */
- font-size:10px;
- margin:0px;
- padding:0px;
- height:12px;
- }
\ No newline at end of file
diff --git a/gui/drag_and_drop/images/context-menu-gradient.gif b/gui/drag_and_drop/images/context-menu-gradient.gif
deleted file mode 100644
index fe9681ae46..0000000000
Binary files a/gui/drag_and_drop/images/context-menu-gradient.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/dhtmlgoodies_folder.gif b/gui/drag_and_drop/images/dhtmlgoodies_folder.gif
deleted file mode 100644
index d953eda310..0000000000
Binary files a/gui/drag_and_drop/images/dhtmlgoodies_folder.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/dhtmlgoodies_minus.gif b/gui/drag_and_drop/images/dhtmlgoodies_minus.gif
deleted file mode 100644
index bd770fab5d..0000000000
Binary files a/gui/drag_and_drop/images/dhtmlgoodies_minus.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/dhtmlgoodies_plus.gif b/gui/drag_and_drop/images/dhtmlgoodies_plus.gif
deleted file mode 100644
index 112cd60059..0000000000
Binary files a/gui/drag_and_drop/images/dhtmlgoodies_plus.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/dhtmlgoodies_sheet.gif b/gui/drag_and_drop/images/dhtmlgoodies_sheet.gif
deleted file mode 100644
index b938d1329d..0000000000
Binary files a/gui/drag_and_drop/images/dhtmlgoodies_sheet.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/dragDrop_ind1.gif b/gui/drag_and_drop/images/dragDrop_ind1.gif
deleted file mode 100644
index 2f9bf5a658..0000000000
Binary files a/gui/drag_and_drop/images/dragDrop_ind1.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/dragDrop_ind2.gif b/gui/drag_and_drop/images/dragDrop_ind2.gif
deleted file mode 100644
index a1da63108a..0000000000
Binary files a/gui/drag_and_drop/images/dragDrop_ind2.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/folder_close.gif b/gui/drag_and_drop/images/folder_close.gif
deleted file mode 100644
index bba11d3901..0000000000
Binary files a/gui/drag_and_drop/images/folder_close.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/folder_dots.gif b/gui/drag_and_drop/images/folder_dots.gif
deleted file mode 100644
index db93fd9279..0000000000
Binary files a/gui/drag_and_drop/images/folder_dots.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/folder_folder.gif b/gui/drag_and_drop/images/folder_folder.gif
deleted file mode 100644
index ef555b7aee..0000000000
Binary files a/gui/drag_and_drop/images/folder_folder.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/folder_lastsub.gif b/gui/drag_and_drop/images/folder_lastsub.gif
deleted file mode 100644
index 6e12244578..0000000000
Binary files a/gui/drag_and_drop/images/folder_lastsub.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/folder_open.gif b/gui/drag_and_drop/images/folder_open.gif
deleted file mode 100644
index b6d60b84b2..0000000000
Binary files a/gui/drag_and_drop/images/folder_open.gif and /dev/null differ
diff --git a/gui/drag_and_drop/images/folder_sub.gif b/gui/drag_and_drop/images/folder_sub.gif
deleted file mode 100644
index e3c8e44ec1..0000000000
Binary files a/gui/drag_and_drop/images/folder_sub.gif and /dev/null differ
diff --git a/gui/drag_and_drop/js/ajax.js b/gui/drag_and_drop/js/ajax.js
deleted file mode 100644
index f93f2a429c..0000000000
--- a/gui/drag_and_drop/js/ajax.js
+++ /dev/null
@@ -1,193 +0,0 @@
-/* Simple AJAX Code-Kit (SACK) v1.6.1 */
-/* ©2005 Gregory Wild-Smith */
-/* www.twilightuniverse.com */
-/* Software licenced under a modified X11 licence,
- see documentation or authors website for more details */
-
-function sack(file) {
- this.xmlhttp = null;
-
- this.resetData = function() {
- this.method = "POST";
- this.queryStringSeparator = "?";
- this.argumentSeparator = "&";
- this.URLString = "";
- this.encodeURIString = true;
- this.execute = false;
- this.element = null;
- this.elementObj = null;
- this.requestFile = file;
- this.vars = new Object();
- this.responseStatus = new Array(2);
- };
-
- this.resetFunctions = function() {
- this.onLoading = function() { };
- this.onLoaded = function() { };
- this.onInteractive = function() { };
- this.onCompletion = function() { };
- this.onError = function() { };
- this.onFail = function() { };
- };
-
- this.reset = function() {
- this.resetFunctions();
- this.resetData();
- };
-
- this.createAJAX = function() {
- try {
- this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
- } catch (e1) {
- try {
- this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
- } catch (e2) {
- this.xmlhttp = null;
- }
- }
-
- if (! this.xmlhttp) {
- if (typeof XMLHttpRequest != "undefined") {
- this.xmlhttp = new XMLHttpRequest();
- } else {
- this.failed = true;
- }
- }
- };
-
- this.setVar = function(name, value){
- this.vars[name] = Array(value, false);
- };
-
- this.encVar = function(name, value, returnvars) {
- if (true == returnvars) {
- return Array(encodeURIComponent(name), encodeURIComponent(value));
- } else {
- this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);
- }
- }
-
- this.processURLString = function(string, encode) {
- encoded = encodeURIComponent(this.argumentSeparator);
- regexp = new RegExp(this.argumentSeparator + "|" + encoded);
- varArray = string.split(regexp);
- for (i = 0; i < varArray.length; i++){
- urlVars = varArray[i].split("=");
- if (true == encode){
- this.encVar(urlVars[0], urlVars[1]);
- } else {
- this.setVar(urlVars[0], urlVars[1]);
- }
- }
- }
-
- this.createURLString = function(urlstring) {
- if (this.encodeURIString && this.URLString.length) {
- this.processURLString(this.URLString, true);
- }
-
- if (urlstring) {
- if (this.URLString.length) {
- this.URLString += this.argumentSeparator + urlstring;
- } else {
- this.URLString = urlstring;
- }
- }
-
- // prevents caching of URLString
- this.setVar("rndval", new Date().getTime());
-
- urlstringtemp = new Array();
- for (key in this.vars) {
- if (false == this.vars[key][1] && true == this.encodeURIString) {
- encoded = this.encVar(key, this.vars[key][0], true);
- delete this.vars[key];
- this.vars[encoded[0]] = Array(encoded[1], true);
- key = encoded[0];
- }
-
- urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];
- }
- if (urlstring){
- this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);
- } else {
- this.URLString += urlstringtemp.join(this.argumentSeparator);
- }
- }
-
- this.runResponse = function() {
- eval(this.response);
- }
-
- this.runAJAX = function(urlstring) {
- if (this.failed) {
- this.onFail();
- } else {
- this.createURLString(urlstring);
- if (this.element) {
- this.elementObj = document.getElementById(this.element);
- }
- if (this.xmlhttp) {
- var self = this;
- if (this.method == "GET") {
- totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
- this.xmlhttp.open(this.method, totalurlstring, true);
- } else {
- this.xmlhttp.open(this.method, this.requestFile, true);
- try {
- this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
- } catch (e) { }
- }
-
- this.xmlhttp.onreadystatechange = function() {
- switch (self.xmlhttp.readyState) {
- case 1:
- self.onLoading();
- break;
- case 2:
- self.onLoaded();
- break;
- case 3:
- self.onInteractive();
- break;
- case 4:
- self.response = self.xmlhttp.responseText;
- self.responseXML = self.xmlhttp.responseXML;
- self.responseStatus[0] = self.xmlhttp.status;
- self.responseStatus[1] = self.xmlhttp.statusText;
-
- if (self.execute) {
- self.runResponse();
- }
-
- if (self.elementObj) {
- elemNodeName = self.elementObj.nodeName;
- elemNodeName.toLowerCase();
- if (elemNodeName == "input"
- || elemNodeName == "select"
- || elemNodeName == "option"
- || elemNodeName == "textarea") {
- self.elementObj.value = self.response;
- } else {
- self.elementObj.innerHTML = self.response;
- }
- }
- if (self.responseStatus[0] == "200") {
- self.onCompletion();
- } else {
- self.onError();
- }
-
- self.URLString = "";
- break;
- }
- };
-
- this.xmlhttp.send(this.URLString);
- }
- }
- };
-
- this.reset();
- this.createAJAX();
-}
diff --git a/gui/drag_and_drop/js/context-menu.js b/gui/drag_and_drop/js/context-menu.js
deleted file mode 100644
index 8bcbb84cc4..0000000000
--- a/gui/drag_and_drop/js/context-menu.js
+++ /dev/null
@@ -1,419 +0,0 @@
-DHTMLGoodies_menuModel = function()
-{
- var menuItems;
- this.menuItems = new Array();
-
-
-}
-
-/************************************************************************************************************
-* DHTML menu model class
-*
-* Created: October, 30th, 2006
-* @class Purpose of class: Saves menu item data
-*
-*
-* Demos of this class: demo-menu-strip.html
-*
-* Update log:
-*
-************************************************************************************************************/
-
-
-/**
-* @constructor
-* @class Purpose of class: Organize menu items for different menu widgets. demos of menus: (Demo)
-* @version 1.0
-* @author Alf Magne Kalleland(www.dhtmlgoodies.com)
-*/
-
-
-DHTMLGoodies_menuModel.prototype = {
- // {{{ addItem()
- /**
- * Add separator (special type of menu item)
- *
- * @param int id of menu item
- * @param string itemText = text of menu item
- * @param string itemIcon = file name of menu icon(in front of menu text. Path will be imagePath for the DHTMLSuite + file name)
- * @param string url = Url of menu item
- * @param int parent id of menu item
- * @param String jsFunction Name of javascript function to execute. It will replace the url param. The function with this name will be called and the element triggering the action will be
- * sent as argument. Name of the element which triggered the menu action may also be sent as a second argument. That depends on the widget. The context menu is an example where
- * the element triggering the context menu is sent as second argument to this function.
- *
- * @public
- */
- addItem : function(id,itemText,itemIcon,url,parentId,jsFunction)
- {
- this.menuItems[id] = new Array();
- this.menuItems[id]['id'] = id;
- this.menuItems[id]['itemText'] = itemText;
- this.menuItems[id]['itemIcon'] = itemIcon;
- this.menuItems[id]['url'] = url;
- this.menuItems[id]['parentId'] = parentId;
- this.menuItems[id]['separator'] = false;
- this.menuItems[id]['jsFunction'] = jsFunction;
-
- }
- ,
- // {{{ addSeparator()
- /**
- * Add separator (special type of menu item)
- *
- * @param int id of menu item
- * @param int parent id of menu item
- * @public
- */
- addSeparator : function(id,parentId)
- {
- this.menuItems[id] = new Array();
- this.menuItems[id]['parentId'] = parentId;
- this.menuItems[id]['separator'] = true;
- }
- ,
- // {{{ init()
- /**
- * Initilizes the menu model. This method should be called when all items has been added to the model.
- *
- *
- * @public
- */
- init : function()
- {
- this.__getDepths();
-
- }
- // }}}
- ,
- // {{{ __getDepths()
- /**
- * Create variable for the depth of each menu item.
- *
- *
- * @private
- */
- getItems : function()
- {
- return this.menuItems;
- }
-
- ,
- // {{{ __getDepths()
- /**
- * Create variable for the depth of each menu item.
- *
- *
- * @private
- */
- __getDepths : function()
- {
- for(var no in this.menuItems){
- this.menuItems[no]['depth'] = 1;
- if(this.menuItems[no]['parentId']){
- this.menuItems[no]['depth'] = this.menuItems[this.menuItems[no]['parentId']]['depth']+1;
- }
- }
- }
- ,
- // {{{ __hasSubs()
- /**
- * Does a menu item have sub elements ?
- *
- *
- * @private
- */
- // }}}
- __hasSubs : function(id)
- {
- for(var no in this.menuItems){ // Looping through menu items
- if(this.menuItems[no]['parentId']==id)return true;
- }
- return false;
- }
-
-
-}
-
-
-
-var referenceToDHTMLSuiteContextMenu;
-
-
-DHTMLGoodies_contextMenu = function()
-{
- var menuModels;
- var menuItems;
- var menuObject; // Reference to context menu div
- var layoutCSS;
- var menuUls; // Array of
elements
- var width; // Width of context menu
- var srcElement; // Reference to the element which triggered the context menu, i.e. the element which caused the context menu to be displayed.
- var indexCurrentlyDisplayedMenuModel; // Index of currently displayed menu model.
- var imagePath;
-
- this.menuModels = new Array();
- this.menuObject = false;
- this.menuUls = new Array();
- this.width = 100;
- this.srcElement = false;
- this.indexCurrentlyDisplayedMenuModel = false;
- this.imagePath = '../../gui/drag_and_drop/images/';
-
-
-}
-
-DHTMLGoodies_contextMenu.prototype =
-{
-
- setWidth : function(newWidth)
- {
- this.width = newWidth;
- }
- // }}}
- ,
- // {{{ setLayoutCss()
- /**
- * Add menu items
- *
- * @param String cssFileName Name of css file
- *
- * @public
- */
- setLayoutCss : function(cssFileName)
- {
- this.layoutCSS = cssFileName;
- }
- // }}}
- ,
- // {{{ attachToElement()
- /**
- * Add menu items
- *
- * @param Object HTML Element = Reference to html element
- * @param String elementId = String id of element(optional). An alternative to HTML Element
- *
- * @public
- */
- attachToElement : function(element,elementId,menuModel)
- {
- window.refToThisContextMenu = this;
- if(!element && elementId)element = document.getElementById(elementId);
- if(!element.id){
- element.id = 'context_menu' + Math.random();
- element.id = element.id.replace('.','');
- }
- this.menuModels[element.id] = menuModel;
- element.oncontextmenu = this.__displayContextMenu;
- //element.onmousedown = function() { window.refToThisContextMenu.__setReference(window.refToThisContextMenu); };
- document.documentElement.onclick = this.__hideContextMenu;
-
- }
- // }}}
- ,
- // {{{ __setReference()
- /**
- * Creates a reference to current context menu object. (Note: This method should be deprecated as only one context menu object is needed)
- *
- * @param Object context menu object = Reference to context menu object
- *
- * @private
- */
- __setReference : function(obj)
- {
- referenceToDHTMLSuiteContextMenu = obj;
- }
- ,
- // {{{ __displayContextMenu()
- /**
- * Displays the context menu
- *
- * @param Event e
- *
- * @private
- */
- __displayContextMenu : function(e)
- {
- if(document.all)e = event;
- var ref = referenceToDHTMLSuiteContextMenu;
- ref.srcElement = ref.getSrcElement(e);
-
- if(!ref.indexCurrentlyDisplayedMenuModel || ref.indexCurrentlyDisplayedMenuModel!=this.id){
-
- if(ref.indexCurrentlyDisplayedMenuModel){
- ref.menuObject.innerHTML = '';
- }else{
- ref.__createDivs();
- }
- ref.menuItems = ref.menuModels[this.id].getItems();
- ref.__createMenuItems();
- }
- ref.indexCurrentlyDisplayedMenuModel=this.id;
-
- ref.menuObject.style.left = (e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft)) + 'px';
- ref.menuObject.style.top = (e.clientY + Math.max(document.body.scrollTop,document.documentElement.scrollTop)) + 'px';
- ref.menuObject.style.display='block';
- return false;
-
- }
- // }}}
- ,
- // {{{ __displayContextMenu()
- /**
- * Add menu items
- *
- * @param Event e
- *
- * @private
- */
- __hideContextMenu : function()
- {
- var ref = referenceToDHTMLSuiteContextMenu;
- if(ref.menuObject)ref.menuObject.style.display = 'none';
-
-
- }
- // }}}
- ,
- // {{{ __createDivs()
- /**
- * Creates general divs for the menu
- *
- *
- * @private
- */
- __createDivs : function()
- {
- this.menuObject = document.createElement('DIV');
- this.menuObject.className = 'DHTMLSuite_contextMenu';
- this.menuObject.style.backgroundImage = 'url(\'' + this.imagePath + 'context-menu-gradient.gif' + '\')';
- this.menuObject.style.backgroundRepeat = 'repeat-y';
- if(this.width)this.menuObject.style.width = this.width + 'px';
- document.body.appendChild(this.menuObject);
- }
- // }}}
- ,
-
- // {{{ __mouseOver()
- /**
- * Display mouse over effect when moving the mouse over a menu item
- *
- *
- * @private
- */
- __mouseOver : function()
- {
- this.className = 'DHTMLSuite_item_mouseover';
- if(!document.all){
- this.style.backgroundPosition = 'left center';
- }
-
- }
- // }}}
- ,
- // {{{ __mouseOut()
- /**
- * Remove mouse over effect when moving the mouse away from a menu item
- *
- *
- * @private
- */
- __mouseOut : function()
- {
- this.className = '';
- if(!document.all){
- this.style.backgroundPosition = '1px center';
- }
- }
- // }}}
- ,
- // {{{ __createMenuItems()
- /**
- * Create menu items
- *
- *
- * @private
- */
- __evalUrl : function()
- {
- var js = this.getAttribute('jsFunction');
- if(!js)js = this.jsFunction;
- if(js)eval(js);
-
- }
- // }}}
- ,
- // {{{ __createMenuItems()
- /**
- * Create menu items
- *
- *
- * @private
- */
- __createMenuItems : function()
- {
- window.refToContextMenu = this; // Reference to menu strip object
- this.menuUls = new Array();
- for(var no in this.menuItems){ // Looping through menu items
- if(!this.menuUls[0]){ // Create main ul element
- this.menuUls[0] = document.createElement('UL');
- this.menuObject.appendChild(this.menuUls[0]);
- }
-
- if(this.menuItems[no]['depth']==1){
-
- if(this.menuItems[no]['separator']){
- var li = document.createElement('DIV');
- li.className = 'DHTMLSuite_contextMenu_separator';
- }else{
- var li = document.createElement('LI');
- if(this.menuItems[no]['jsFunction']){
- this.menuItems[no]['url'] = this.menuItems[no]['jsFunction'] + '(this,referenceToDHTMLSuiteContextMenu.srcElement)';
- }
- if(this.menuItems[no]['itemIcon']){
- li.style.backgroundImage = 'url(\'' + this.menuItems[no]['itemIcon'] + '\')';
- if(!document.all)li.style.backgroundPosition = '1px center';
-
- }
-
- if(this.menuItems[no]['url']){
- var url = this.menuItems[no]['url'] + '';
- var tmpUrl = url + '';
- li.setAttribute('jsFunction',url);
- li.jsFunction = url;
- li.onclick = this.__evalUrl;
-
- }
-
- li.innerHTML = '' + this.menuItems[no]['itemText'] + '';
- li.onmouseover = this.__mouseOver;
- li.onmouseout = this.__mouseOut;
- }
- this.menuUls[0].appendChild(li);
- }
- }
- }
-
- ,
-
- // {{{ getSrcElement()
- /**
- *
- * Returns a reference to the element which triggered an event.
- * @param Event e = Event object
- *
- *
- * @private
- */
- getSrcElement : function(e)
- {
- var el;
- // Dropped on which element
- if (e.target) el = e.target;
- else if (e.srcElement) el = e.srcElement;
- if (el.nodeType == 3) // defeat Safari bug
- el = el.parentNode;
- return el;
- }
-
-}
\ No newline at end of file
diff --git a/gui/drag_and_drop/js/drag-drop-folder-tree.js b/gui/drag_and_drop/js/drag-drop-folder-tree.js
deleted file mode 100644
index dda94af2ed..0000000000
--- a/gui/drag_and_drop/js/drag-drop-folder-tree.js
+++ /dev/null
@@ -1,843 +0,0 @@
- /************************************************************************************************************
- (C) www.dhtmlgoodies.com, July 2006
-
- Update log:
- August, 8th, 2006: Replaced getLeftPos and getTopPos methods.
-
- This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
-
- Terms of use:
- You are free to use this script as long as the copyright message is kept intact. However, you may not
- redistribute, sell or repost it without our permission.
-
- Thank you!
-
- www.dhtmlgoodies.com
- Alf Magne Kalleland
-
- rev :
- 20070321 - franciscom - added basehref to constructor, to build absolute URL to images.
- I've had same problems with relative URL (may be generated in wrong way).
-
- 20070318 - franciscom - added new attribute isLeaf, to change image for leaf nodes.
- Used this method instead of the implemented one based on using a different
- CSS class to change image.
- ************************************************************************************************************/
-
- var JSTreeObj;
- var treeUlCounter = 0;
- var nodeId = 1;
-
- /* Constructor */
- function JSDragDropTree(basehref)
- {
- var idOfTree;
- var imageFolder;
- var folderImage;
- var plusImage;
- var minusImage;
- var maximumDepth;
- var dragNode_source;
- var dragNode_parent;
- var dragNode_sourceNextSib;
- var dragNode_noSiblings;
- var ajaxObjects;
-
- var dragNode_destination;
- var floatingContainer;
- var dragDropTimer;
- var dropTargetIndicator;
- var insertAsSub;
- var indicator_offsetX;
- var indicator_offsetX_sub;
- var indicator_offsetY;
-
- this.imageFolder = basehref+'gui/drag_and_drop/images/';
- this.folderImage = 'dhtmlgoodies_folder.gif';
- this.plusImage = 'dhtmlgoodies_plus.gif';
- this.minusImage = 'dhtmlgoodies_minus.gif';
- this.leafImage = 'dhtmlgoodies_sheet.gif';
-
- this.maximumDepth = 6;
- var messageMaximumDepthReached;
- var filePathRenameItem;
- var filePathDeleteItem;
-
- var renameAllowed;
- var deleteAllowed;
- var currentlyActiveItem;
- var contextMenu;
- var currentItemToEdit; // Reference to item currently being edited(example: renamed)
- var helpObj;
-
- this.contextMenu = false;
- this.floatingContainer = document.createElement('UL');
- this.floatingContainer.style.position = 'absolute';
- this.floatingContainer.style.display='none';
- this.floatingContainer.id = 'floatingContainer';
- this.insertAsSub = false;
- document.body.appendChild(this.floatingContainer);
- this.dragDropTimer = -1;
- this.dragNode_noSiblings = false;
- this.currentItemToEdit = false;
-
- if(document.all){
- this.indicator_offsetX = 2; // Offset position of small black lines indicating where nodes would be dropped.
- this.indicator_offsetX_sub = 4;
- this.indicator_offsetY = 2;
- }else{
- this.indicator_offsetX = 1; // Offset position of small black lines indicating where nodes would be dropped.
- this.indicator_offsetX_sub = 3;
- this.indicator_offsetY = 4; // Changes for Test Link with firefox 1.5.0.11, Original value 2
- }
- if(navigator.userAgent.indexOf('Opera')>=0){
- this.indicator_offsetX = 2; // Offset position of small black lines indicating where nodes would be dropped.
- this.indicator_offsetX_sub = 3;
- this.indicator_offsetY = -7;
- }
-
- this.messageMaximumDepthReached = ''; // Use '' if you don't want to display a message
-
- this.renameAllowed = true;
- this.deleteAllowed = true;
- this.currentlyActiveItem = false;
- this.filePathRenameItem = 'folderTree_updateItem.php';
- this.filePathDeleteItem = 'folderTree_updateItem.php';
- this.ajaxObjects = new Array();
- this.helpObj = false;
-
- }
-
-
- /* JSDragDropTree class */
- JSDragDropTree.prototype = {
- // {{{ addEvent()
- /**
- *
- * This function adds an event listener to an element on the page.
- *
- * @param Object whichObject = Reference to HTML element(Which object to assigne the event)
- * @param String eventType = Which type of event, example "mousemove" or "mouseup"
- * @param functionName = Name of function to execute.
- *
- * @public
- */
- addEvent : function(whichObject,eventType,functionName)
- {
- if(whichObject.attachEvent){
- whichObject['e'+eventType+functionName] = functionName;
- whichObject[eventType+functionName] = function(){whichObject['e'+eventType+functionName]( window.event );}
- whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName] );
- } else
- whichObject.addEventListener(eventType,functionName,false);
- }
- // }}}
- ,
- // {{{ removeEvent()
- /**
- *
- * This function removes an event listener from an element on the page.
- *
- * @param Object whichObject = Reference to HTML element(Which object to assigne the event)
- * @param String eventType = Which type of event, example "mousemove" or "mouseup"
- * @param functionName = Name of function to execute.
- *
- * @public
- */
- removeEvent : function(whichObject,eventType,functionName)
- {
- if(whichObject.detachEvent){
- whichObject.detachEvent('on'+eventType, whichObject[eventType+functionName]);
- whichObject[eventType+functionName] = null;
- } else
- whichObject.removeEventListener(eventType,functionName,false);
- }
- ,
- Get_Cookie : function(name) {
- var start = document.cookie.indexOf(name+"=");
- var len = start+name.length+1;
- if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
- if (start == -1) return null;
- var end = document.cookie.indexOf(";",len);
- if (end == -1) end = document.cookie.length;
- return unescape(document.cookie.substring(len,end));
- }
- ,
- // This function has been slightly modified
- Set_Cookie : function(name,value,expires,path,domain,secure) {
- expires = expires * 60*60*24*1000;
- var today = new Date();
- var expires_date = new Date( today.getTime() + (expires) );
- var cookieString = name + "=" +escape(value) +
- ( (expires) ? ";expires=" + expires_date.toGMTString() : "") +
- ( (path) ? ";path=" + path : "") +
- ( (domain) ? ";domain=" + domain : "") +
- ( (secure) ? ";secure" : "");
- document.cookie = cookieString;
- }
- ,
- setFileNameRename : function(newFileName)
- {
- this.filePathRenameItem = newFileName;
- }
- ,
- setFileNameDelete : function(newFileName)
- {
- this.filePathDeleteItem = newFileName;
- }
- ,setRenameAllowed : function(renameAllowed)
- {
- this.renameAllowed = renameAllowed;
- }
- ,
- setDeleteAllowed : function(deleteAllowed)
- {
- this.deleteAllowed = deleteAllowed;
- }
- ,setMaximumDepth : function(maxDepth)
- {
- this.maximumDepth = maxDepth;
- }
- ,setMessageMaximumDepthReached : function(newMessage)
- {
- this.messageMaximumDepthReached = newMessage;
- }
- ,
- setImageFolder : function(path)
- {
- this.imageFolder = path;
- }
- ,
- setFolderImage : function(imagePath)
- {
- this.folderImage = imagePath;
- }
- ,
- setPlusImage : function(imagePath)
- {
- this.plusImage = imagePath;
- }
- ,
- setMinusImage : function(imagePath)
- {
- this.minusImage = imagePath;
- }
- ,
- setLeafImage : function(imagePath)
- {
- this.leafImage = imagePath;
- }
- ,
- setTreeId : function(idOfTree)
- {
- this.idOfTree = idOfTree;
- }
- ,
- expandAll : function()
- {
- var menuItems = document.getElementById(this.idOfTree).getElementsByTagName('LI');
- for(var no=0;no0 && subItems[0].style.display!='block'){
- JSTreeObj.showHideNode(false,menuItems[no].id);
- }
- }
- }
- ,
- collapseAll : function()
- {
- var menuItems = document.getElementById(this.idOfTree).getElementsByTagName('LI');
- for(var no=0;no0 && subItems[0].style.display=='block'){
- JSTreeObj.showHideNode(false,menuItems[no].id);
- }
- }
- }
- ,
- /*
- Find top pos of a tree node
- */
- getTopPos : function(obj){
- var top = obj.offsetTop/1;
- while((obj = obj.offsetParent) != null){
- if(obj.tagName!='HTML')top += obj.offsetTop;
- }
- if(document.all)top = top/1 + 13; else top = top/1 + 4;
- return top;
- }
- ,
- /*
- Find left pos of a tree node
- */
- getLeftPos : function(obj){
- var left = obj.offsetLeft/1 + 1;
- while((obj = obj.offsetParent) != null){
- if(obj.tagName!='HTML')left += obj.offsetLeft;
- }
-
- if(document.all)left = left/1 - 2;
- return left;
- }
-
- ,
- showHideNode : function(e,inputId)
- {
- if(inputId){
- if(!document.getElementById(inputId))return;
- thisNode = document.getElementById(inputId).getElementsByTagName('IMG')[0];
- }else {
- thisNode = this;
- if(this.tagName=='A')thisNode = this.parentNode.getElementsByTagName('IMG')[0];
-
- }
- if(thisNode.style.visibility=='hidden')return;
- var parentNode = thisNode.parentNode;
- inputId = parentNode.id.replace(/[^0-9]/g,'');
- if(thisNode.src.indexOf(JSTreeObj.plusImage)>=0){
- thisNode.src = thisNode.src.replace(JSTreeObj.plusImage,JSTreeObj.minusImage);
- var ul = parentNode.getElementsByTagName('UL')[0];
- ul.style.display='block';
- if(!initExpandedNodes)initExpandedNodes = ',';
- if(initExpandedNodes.indexOf(',' + inputId + ',')<0) initExpandedNodes = initExpandedNodes + inputId + ',';
- }else{
- thisNode.src = thisNode.src.replace(JSTreeObj.minusImage,JSTreeObj.plusImage);
- parentNode.getElementsByTagName('UL')[0].style.display='none';
- initExpandedNodes = initExpandedNodes.replace(',' + inputId,'');
- }
- JSTreeObj.Set_Cookie('dhtmlgoodies_expandedNodes',initExpandedNodes,500);
- return false;
- }
- ,
- /* Initialize drag */
- initDrag : function(e)
- {
- if(document.all)e = event;
-
- var subs = JSTreeObj.floatingContainer.getElementsByTagName('LI');
- if(subs.length>0){
- if(JSTreeObj.dragNode_sourceNextSib){
- JSTreeObj.dragNode_parent.insertBefore(JSTreeObj.dragNode_source,JSTreeObj.dragNode_sourceNextSib);
- }else{
- JSTreeObj.dragNode_parent.appendChild(JSTreeObj.dragNode_source);
- }
- }
-
- JSTreeObj.dragNode_source = this.parentNode;
- JSTreeObj.dragNode_parent = this.parentNode.parentNode;
- JSTreeObj.dragNode_sourceNextSib = false;
-
-
- if(JSTreeObj.dragNode_source.nextSibling)JSTreeObj.dragNode_sourceNextSib = JSTreeObj.dragNode_source.nextSibling;
- JSTreeObj.dragNode_destination = false;
- JSTreeObj.dragDropTimer = 0;
- JSTreeObj.timerDrag();
- return false;
- }
- ,
- timerDrag : function()
- {
- if(this.dragDropTimer>=0 && this.dragDropTimer<10){
- this.dragDropTimer = this.dragDropTimer + 1;
- setTimeout('JSTreeObj.timerDrag()',20);
- return;
- }
- if(this.dragDropTimer==10)
- {
- JSTreeObj.floatingContainer.style.display='block';
- JSTreeObj.floatingContainer.appendChild(JSTreeObj.dragNode_source);
- }
- }
- ,
- moveDragableNodes : function(e)
- {
- if(JSTreeObj.dragDropTimer<10)return;
- if(document.all)e = event;
- dragDrop_x = e.clientX/1 + 5 + document.body.scrollLeft;
- dragDrop_y = e.clientY/1 + 5 + document.documentElement.scrollTop;
-
- JSTreeObj.floatingContainer.style.left = dragDrop_x + 'px';
- JSTreeObj.floatingContainer.style.top = dragDrop_y + 'px';
-
- var thisObj = this;
- if(thisObj.tagName=='A' || thisObj.tagName=='IMG')thisObj = thisObj.parentNode;
-
- JSTreeObj.dragNode_noSiblings = false;
- var tmpVar = thisObj.getAttribute('noSiblings');
- if(!tmpVar)tmpVar = thisObj.noSiblings;
- if(tmpVar=='true')JSTreeObj.dragNode_noSiblings=true;
-
- if(thisObj && thisObj.id)
- {
- JSTreeObj.dragNode_destination = thisObj;
- var img = thisObj.getElementsByTagName('IMG')[1];
- var tmpObj= JSTreeObj.dropTargetIndicator;
- tmpObj.style.display='block';
-
- var eventSourceObj = this;
- if(JSTreeObj.dragNode_noSiblings && eventSourceObj.tagName=='IMG')eventSourceObj = eventSourceObj.nextSibling;
-
- var tmpImg = tmpObj.getElementsByTagName('IMG')[0];
- if(this.tagName=='A' || JSTreeObj.dragNode_noSiblings){
- tmpImg.src = tmpImg.src.replace('ind1','ind2');
- JSTreeObj.insertAsSub = true;
- tmpObj.style.left = (JSTreeObj.getLeftPos(eventSourceObj) + JSTreeObj.indicator_offsetX_sub) + 'px';
- }else{
- tmpImg.src = tmpImg.src.replace('ind2','ind1');
- JSTreeObj.insertAsSub = false;
- tmpObj.style.left = (JSTreeObj.getLeftPos(eventSourceObj) + JSTreeObj.indicator_offsetX) + 'px';
- }
-
-
- tmpObj.style.top = (JSTreeObj.getTopPos(thisObj) + JSTreeObj.indicator_offsetY) + 'px';
- }
-
- return false;
-
- }
- ,
- dropDragableNodes:function()
- {
- if(JSTreeObj.dragDropTimer<10){
- JSTreeObj.dragDropTimer = -1;
- return;
- }
- var showMessage = false;
- if(JSTreeObj.dragNode_destination){ // Check depth
- var countUp = JSTreeObj.dragDropCountLevels(JSTreeObj.dragNode_destination,'up');
- var countDown = JSTreeObj.dragDropCountLevels(JSTreeObj.dragNode_source,'down');
- var countLevels = countUp/1 + countDown/1 + (JSTreeObj.insertAsSub?1:0);
-
- if(countLevels>JSTreeObj.maximumDepth){
- JSTreeObj.dragNode_destination = false;
- showMessage = true; // Used later down in this function
- }
- }
-
-
- if(JSTreeObj.dragNode_destination){
- if(JSTreeObj.insertAsSub){
- var uls = JSTreeObj.dragNode_destination.getElementsByTagName('UL');
- if(uls.length>0){
- ul = uls[0];
- ul.style.display='block';
-
- var lis = ul.getElementsByTagName('LI');
-
- if(lis.length>0){ // Sub elements exists - drop dragable node before the first one
- ul.insertBefore(JSTreeObj.dragNode_source,lis[0]);
- }else { // No sub exists - use the appendChild method - This line should not be executed unless there's something wrong in the HTML, i.e empty
- ul.appendChild(JSTreeObj.dragNode_source);
- }
- }else{
- var ul = document.createElement('UL');
- ul.style.display='block';
- JSTreeObj.dragNode_destination.appendChild(ul);
- ul.appendChild(JSTreeObj.dragNode_source);
- }
- var img = JSTreeObj.dragNode_destination.getElementsByTagName('IMG')[0];
- img.style.visibility='visible';
- img.src = img.src.replace(JSTreeObj.plusImage,JSTreeObj.minusImage);
-
-
- }else{
- if(JSTreeObj.dragNode_destination.nextSibling){
- var nextSib = JSTreeObj.dragNode_destination.nextSibling;
- nextSib.parentNode.insertBefore(JSTreeObj.dragNode_source,nextSib);
- }else{
- JSTreeObj.dragNode_destination.parentNode.appendChild(JSTreeObj.dragNode_source);
- }
- }
- /* Clear parent object */
- var tmpObj = JSTreeObj.dragNode_parent;
- var lis = tmpObj.getElementsByTagName('LI');
- if(lis.length==0){
- var img = tmpObj.parentNode.getElementsByTagName('IMG')[0];
- img.style.visibility='hidden'; // Hide [+],[-] icon
- tmpObj.parentNode.removeChild(tmpObj);
- }
-
- }else{
- // Putting the item back to it's original location
-
- if(JSTreeObj.dragNode_sourceNextSib){
- JSTreeObj.dragNode_parent.insertBefore(JSTreeObj.dragNode_source,JSTreeObj.dragNode_sourceNextSib);
- }else{
- JSTreeObj.dragNode_parent.appendChild(JSTreeObj.dragNode_source);
- }
-
- }
- JSTreeObj.dropTargetIndicator.style.display='none';
- JSTreeObj.dragDropTimer = -1;
- if(showMessage && JSTreeObj.messageMaximumDepthReached)alert(JSTreeObj.messageMaximumDepthReached);
- }
- ,
- createDropIndicator : function()
- {
- this.dropTargetIndicator = document.createElement('DIV');
- this.dropTargetIndicator.style.position = 'absolute';
- this.dropTargetIndicator.style.display='none';
- var img = document.createElement('IMG');
- img.src = this.imageFolder + 'dragDrop_ind1.gif';
- img.id = 'dragDropIndicatorImage';
- this.dropTargetIndicator.appendChild(img);
- document.body.appendChild(this.dropTargetIndicator);
-
- }
- ,
- dragDropCountLevels : function(obj,direction,stopAtObject){
- var countLevels = 0;
- if(direction=='up'){
- while(obj.parentNode && obj.parentNode!=stopAtObject){
- obj = obj.parentNode;
- if(obj.tagName=='UL')countLevels = countLevels/1 +1;
- }
- return countLevels;
- }
-
- if(direction=='down'){
- var subObjects = obj.getElementsByTagName('LI');
- for(var no=0;no0){
- var li = lis[0];
- while(li){
- if(li.id){
- if(saveString.length>0)saveString = saveString + ',';
- var numericID = li.id.replace(/[^0-9]/gi,'');
- if(numericID.length==0)numericID='A';
- var numericParentID = li.parentNode.parentNode.id.replace(/[^0-9]/gi,'');
- if(numericID!='0'){
- saveString = saveString + numericID;
- saveString = saveString + '-';
-
-
- if(li.parentNode.id!=this.idOfTree)saveString = saveString + numericParentID; else saveString = saveString + '0';
- }
- var ul = li.getElementsByTagName('UL');
- if(ul.length>0){
- saveString = this.getNodeOrders(ul[0],saveString);
- }
- }
- li = li.nextSibling;
- }
- }
-
- if(initObj.id == this.idOfTree){
- return saveString;
-
- }
- return saveString;
- }
- ,highlightItem : function(inputObj,e)
- {
- if(JSTreeObj.currentlyActiveItem)JSTreeObj.currentlyActiveItem.className = '';
- this.className = 'highlightedNodeItem';
- JSTreeObj.currentlyActiveItem = this;
- }
- ,
- removeHighlight : function()
- {
- if(JSTreeObj.currentlyActiveItem)JSTreeObj.currentlyActiveItem.className = '';
- JSTreeObj.currentlyActiveItem = false;
- }
- ,
- hasSubNodes : function(obj)
- {
- var subs = obj.getElementsByTagName('LI');
- if(subs.length>0)return true;
- return false;
- }
- ,
- deleteItem : function(obj1,obj2)
- {
- var message = 'Click OK to delete item ' + obj2.innerHTML;
- if(this.hasSubNodes(obj2.parentNode)) message = message + ' and it\'s sub nodes';
- if(confirm(message)){
- this.__deleteItem_step2(obj2.parentNode); // Sending - tag to the __deleteItem_step2 method
- }
-
- }
- ,
- __refreshDisplay : function(obj)
- {
- if(this.hasSubNodes(obj))return;
-
- var img = obj.getElementsByTagName('IMG')[0];
- img.style.visibility = 'hidden';
- }
- ,
- __deleteItem_step2 : function(obj)
- {
-
- var saveString = obj.id.replace(/[^0-9]/gi,'');
-
- var lis = obj.getElementsByTagName('LI');
- for(var no=0;no0){
- inputObj.nextSibling.innerHTML = inputObj.value;
- // Send changes to the server.
- var ajaxIndex = JSTreeObj.ajaxObjects.length;
- JSTreeObj.ajaxObjects[ajaxIndex] = new sack();
- var url = JSTreeObj.filePathRenameItem + '?renameId=' + inputObj.parentNode.id.replace(/[^0-9]/gi,'') + '&newName=' + inputObj.value;
- JSTreeObj.ajaxObjects[ajaxIndex].requestFile = url; // Specifying which file to get
- JSTreeObj.ajaxObjects[ajaxIndex].onCompletion = function() { JSTreeObj.__renameComplete(ajaxIndex); } ; // Specify function that will be executed after file has been found
- JSTreeObj.ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function
-
-
-
- }
- }
- ,
- __cancelRename : function(e,inputObj)
- {
- if(!inputObj && this)inputObj = this;
- inputObj.value = JSTreeObj.helpObj.innerHTML;
- inputObj.nextSibling.innerHTML = JSTreeObj.helpObj.innerHTML;
- inputObj.style.display = 'none';
- inputObj.nextSibling.style.visibility = 'visible';
- }
- ,
- __renameCheckKeyCode : function(e)
- {
- if(document.all)e = event;
- if(e.keyCode==13){ // Enter pressed
- JSTreeObj.__saveTextBoxChanges(false,this);
- }
- if(e.keyCode==27){ // ESC pressed
- JSTreeObj.__cancelRename(false,this);
- }
- }
- ,
- __createTextBox : function(obj)
- {
- var textBox = document.createElement('INPUT');
- textBox.className = 'folderTreeTextBox';
- textBox.value = obj.innerHTML;
- obj.parentNode.insertBefore(textBox,obj);
- textBox.id = 'textBox' + obj.parentNode.id.replace(/[^0-9]/gi,'');
- textBox.onblur = this.__saveTextBoxChanges;
- textBox.onkeydown = this.__renameCheckKeyCode;
- this.__renameEnableTextBox(obj);
- }
- ,
- __renameEnableTextBox : function(obj)
- {
- obj.style.visibility = 'hidden';
- obj.previousSibling.value = obj.innerHTML;
- obj.previousSibling.style.display = 'inline';
- obj.previousSibling.select();
- }
- ,
- renameItem : function(obj1,obj2)
- {
- currentItemToEdit = obj2.parentNode; // Reference to the
- tag.
- if(!obj2.previousSibling || obj2.previousSibling.tagName.toLowerCase()!='input'){
- this.__createTextBox(obj2);
- }else{
- this.__renameEnableTextBox(obj2);
- }
- this.helpObj.innerHTML = obj2.innerHTML;
-
- }
- ,
- initTree : function()
- {
- JSTreeObj = this;
- JSTreeObj.createDropIndicator();
- document.documentElement.onselectstart = JSTreeObj.cancelSelectionEvent;
- document.documentElement.ondragstart = JSTreeObj.cancelEvent;
- document.documentElement.onmousedown = JSTreeObj.removeHighlight;
-
- /* Creating help object for storage of values */
- this.helpObj = document.createElement('DIV');
- this.helpObj.style.display = 'none';
- document.body.appendChild(this.helpObj);
-
- /* Create context menu */
- if(this.deleteAllowed || this.renameAllowed){
- try{
- /* Creating menu model for the context menu, i.e. the datasource */
- var menuModel = new DHTMLGoodies_menuModel();
- if(this.deleteAllowed)menuModel.addItem(1,'Delete','','',false,'JSTreeObj.deleteItem');
- if(this.renameAllowed)menuModel.addItem(2,'Rename','','',false,'JSTreeObj.renameItem');
- menuModel.init();
-
- var menuModelRenameOnly = new DHTMLGoodies_menuModel();
- if(this.renameAllowed)menuModelRenameOnly.addItem(3,'Rename','','',false,'JSTreeObj.renameItem');
- menuModelRenameOnly.init();
-
- var menuModelDeleteOnly = new DHTMLGoodies_menuModel();
- if(this.deleteAllowed)menuModelDeleteOnly.addItem(4,'Delete','','',false,'JSTreeObj.deleteItem');
- menuModelDeleteOnly.init();
-
- window.refToDragDropTree = this;
-
- this.contextMenu = new DHTMLGoodies_contextMenu();
- this.contextMenu.setWidth(120);
- referenceToDHTMLSuiteContextMenu = this.contextMenu;
- }catch(e){
-
- }
- }
-
-
- var nodeId = 0;
- var dhtmlgoodies_tree = document.getElementById(this.idOfTree);
- var menuItems = dhtmlgoodies_tree.getElementsByTagName('LI'); // Get an array of all menu items
- for(var no=0;no archiveData.php
-
+function ETS(tproj_id,id) {
+ // menuUrl => archiveData.php
+ // menuUrl => lib/plan/planAddTC.php
+
// get checkboxes status
var _FUNCTION_NAME_="ETS";
var pParams = tree_getPrintPreferences();
var action_url=fRoot+menuUrl+"?print_scope=test_specification" +
- "&edit=testsuite&level=testsuite&" +
- "containerType=testsuite&id="+id+args+"&"+pParams;
+ "&edit=testsuite&level=testsuite" +
+ "&caller=ETS"+
+ "&containerType=testsuite&id=" + id +
+ "&tproject_id=" + tproj_id + args+"&"+pParams;
- // alert(_FUNCTION_NAME_ + " " +action_url);
+ //alert(_FUNCTION_NAME_ + " " +action_url);
+ console.log(_FUNCTION_NAME_ + " " +action_url);
parent.workframe.location = action_url;
-
}
/*
@@ -225,11 +234,17 @@ function ETS(id) {
returns:
*/
-function ET(id,v)
+function ET(tproj_id,id,v)
{
// get checkboxes status
var _FUNCTION_NAME_="ET";
- var my_location = fRoot+menuUrl+"?version_id="+v+"&edit=testcase&id="+id+args;
+ if(v == undefined) {
+ v = -1;
+ }
+ var my_location = fRoot + menuUrl +
+ "?version_id="+v+"&edit=testcase&id=" + id +
+ "&caller=ET"+
+ "&tproject_id=" + tproj_id + args;
// alert(_FUNCTION_NAME_ + " " +my_location);
parent.workframe.location = my_location;
}
@@ -260,15 +275,19 @@ function TPROJECT_PTC(id)
function TPROJECT_PTP_RS(id)
{
var pParams = tree_getPrintPreferences();
- parent.workframe.location = fRoot+menuUrl+"?type=reqspec&level=testproject&id="+id+args+"&"+pParams;
+ parent.workframe.location = fRoot+menuUrl+
+ "?type=reqspec&level=testproject&id="+id+
+ "&tproject_id="+id+args+"&"+pParams;
}
/* Generate doc: one Req Spec (with children) */
-function TPROJECT_PRS(id)
+function TPROJECT_PRS(tproject_id,id)
{
var pParams = tree_getPrintPreferences();
- parent.workframe.location = fRoot+menuUrl+"?type=reqspec&level=reqspec&id="+id+args+"&"+pParams;
+ parent.workframe.location = fRoot+menuUrl+
+ "?type=reqspec&level=reqspec&id="+id+
+ "&tproject_id="+tproject_id+args+"&"+pParams;
}
@@ -849,7 +868,8 @@ function openAssignmentOverviewWindow(user_id, build_id, tplan_id) {
* @param tc_id
*/
function openTCEditWindow(tcase_id,tcversion_id) {
- var url = "lib/testcases/archiveData.php?edit=testcase&id=" + tcase_id + "&tcversion_id=" + tcversion_id;
+ var url = "lib/testcases/archiveData.php?edit=testcase&id=" +
+ tcase_id + "&tcversion_id=" + tcversion_id;
var width = getCookie("TCEditPopupWidth");
var height = getCookie("TCEditPopupHeight");
@@ -938,8 +958,9 @@ function open_help_window(help_page,locale)
*/
function openTCaseWindow(tcase_id,tcversion_id,show_mode) {
var feature_url = "lib/testcases/archiveData.php";
- feature_url +="?allow_edit=0&show_mode="+show_mode+"&edit=testcase&id="+
- tcase_id+"&tcversion_id="+tcversion_id;
+ feature_url +="?allow_edit=0&show_mode="+show_mode+
+ "&edit=testcase&id="+tcase_id+
+ "&tcversion_id="+tcversion_id+args;;
var width = getCookie("TCEditPopupWidth");
var height = getCookie("TCEditPopupHeight");
@@ -1098,12 +1119,8 @@ function openLinkedReqSpecWindow(reqspec_id, anchor)
/*
function: TPROJECT_REQ_SPEC_MGMT
- launcher for Testproject REQuirement SPECifications ManaGeMenT
-
- args:
-
- returns:
-
+ launcher for Testproject REQuirement
+ SPECifications ManaGeMenT
*/
function TPROJECT_REQ_SPEC_MGMT(id)
{
@@ -1126,13 +1143,15 @@ function TPROJECT_REQ_SPEC_MGMT(id)
returns:
*/
-function REQ_SPEC_MGMT(id)
+function REQ_SPEC_MGMT(tproj_id,id)
{
var _FUNCTION_NAME_="REQ_SPEC_MGMT";
var pParams = tree_getPrintPreferences();
- var action_url = fRoot+req_spec_manager_url+"?item=req_spec&req_spec_id="+id+args+"&"+pParams;
+ var action_url = fRoot+req_spec_manager_url+
+ "?item=req_spec&tproject_id="+tproj_id+
+ "&req_spec_id="+id+args+"&"+pParams;
- // alert(_FUNCTION_NAME_ + " " +action_url);
+ //alert(_FUNCTION_NAME_ + " " +action_url);
parent.workframe.location = action_url;
}
@@ -1145,11 +1164,13 @@ function REQ_SPEC_MGMT(id)
returns:
*/
-function REQ_MGMT(id)
+function REQ_MGMT(tproj_id,id)
{
var _FUNCTION_NAME_="REQ_MGMT";
var pParams = tree_getPrintPreferences();
- var action_url = fRoot+req_manager_url+"?item=requirement&requirement_id="+id+args+"&"+pParams;
+ var action_url = fRoot+req_manager_url+
+ "?item=requirement&tproject_id="+tproj_id+
+ "&requirement_id="+id+args+"&"+pParams;
//alert(_FUNCTION_NAME_ + " " +action_url);
parent.workframe.location = action_url;
@@ -1606,11 +1627,21 @@ function openPrintPreview(type, id, child_id, revision, print_action) {
switch(type) {
case 'req':
- feature_url += "?req_id=" + id + "&req_version_id=" + child_id + "&req_revision=" + revision;
+ if( feature_url.indexOf('?') > 0 ) {
+ feature_url += "&";
+ } else {
+ feature_url += "?";
+ }
+ feature_url += "req_id=" + id + "&req_version_id=" + child_id + "&req_revision=" + revision;
break;
case 'reqSpec':
- feature_url += "?reqspec_id=" + id + "&reqspec_revision_id=" + child_id;
+ if( feature_url.indexOf('?') > 0 ) {
+ feature_url += "&";
+ } else {
+ feature_url += "?";
+ }
+ feature_url += "reqspec_id=" + id + "&reqspec_revision_id=" + child_id;
break;
case 'tc':
diff --git a/gui/niftycube/niftyCorners.css b/gui/niftycube/niftyCorners.css
deleted file mode 100644
index 55523a4994..0000000000
--- a/gui/niftycube/niftyCorners.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/*Nifty Corners Cube CSS by Alessandro Fulciniti
-The following classes are added dinamically by javascript,
-and their use should be avoided in the markup */
-
-b.niftycorners,b.niftyfill{display:block}
-b.niftycorners *{display:block;height: 1px;line-height:1px;font-size: 1px;
- overflow:hidden;border-style:solid;border-width: 0 1px}
-/*normal*/
-b.r1{margin: 0 3px;border-width: 0 2px}
-b.r2{margin: 0 2px}
-b.r3{margin: 0 1px}
-b.r4{height: 2px}
-b.rb1{margin: 0 8px;border-width:0 2px}
-b.rb2{margin: 0 6px;border-width:0 2px}
-b.rb3{margin: 0 5px}
-b.rb4{margin: 0 4px}
-b.rb5{margin: 0 3px}
-b.rb6{margin: 0 2px}
-b.rb7{margin: 0 1px;height:2px}
-b.rb8{margin: 0;height:2px}
-b.rs1{margin: 0 1px}
-/*transparent inside*/
-b.t1{border-width: 0 5px}
-b.t2{border-width: 0 3px}
-b.t3{border-width: 0 2px}
-b.t4{height: 2px}
-b.tb1{border-width: 0 10px}
-b.tb2{border-width: 0 8px}
-b.tb3{border-width: 0 6px}
-b.tb4{border-width: 0 5px}
-b.tb5{border-width: 0 4px}
-b.tb6{border-width: 0 3px}
-b.tb7{border-width: 0 2px;height:2px}
-b.tb8{border-width: 0 1px;height:2px}
-b.ts1{border-width: 0 2px}
\ No newline at end of file
diff --git a/gui/niftycube/niftycube.js b/gui/niftycube/niftycube.js
deleted file mode 100644
index b2ea7cdb2f..0000000000
--- a/gui/niftycube/niftycube.js
+++ /dev/null
@@ -1,330 +0,0 @@
-/* Nifty Corners Cube - rounded corners with CSS and Javascript
-Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-/*
- Using fix for IE 8 provided by : Written by Ken Kinder on October 26, 2009
- http://kenkinder.com/2009/10/26/how-to-fix-niftycube-ie-8-width-problem/
-*/
-var niftyOk=(document.getElementById && document.createElement && Array.prototype.push);
-var niftyCss=false;
-
-String.prototype.find=function(what){
-return(this.indexOf(what)>=0 ? true : false);
-}
-
-var oldonload=window.onload;
-if(typeof(NiftyLoad)!='function') NiftyLoad=function(){};
-if(typeof(oldonload)=='function')
- window.onload=function(){oldonload();AddCss();NiftyLoad()};
-else window.onload=function(){AddCss();NiftyLoad()};
-
-function AddCss(){
-niftyCss=true;
-var l=CreateEl("link");
-l.setAttribute("type","text/css");
-l.setAttribute("rel","stylesheet");
-l.setAttribute("href","gui/niftycube/niftyCorners.css");
-l.setAttribute("media","screen");
-document.getElementsByTagName("head")[0].appendChild(l);
-}
-
-function Nifty(selector,options){
-if(niftyOk==false) return;
-if(niftyCss==false) AddCss();
-var i,v=selector.split(","),h=0;
-if(options==null) options="";
-if(options.find("fixed-height"))
- h=getElementsBySelector(v[0])[0].offsetHeight;
-for(i=0;i0;i--)
- d.appendChild(CreateStrip(i,side,color,border,btype));
-el.style.paddingBottom=0;
-el.appendChild(d);
-}
-
-function CreateStrip(index,side,color,border,btype){
-var x=CreateEl("b");
-x.className=btype+index;
-x.style.backgroundColor=color;
-x.style.borderColor=border;
-if(side=="left"){
- x.style.borderRightWidth="0";
- x.style.marginRight="0";
- }
-else if(side=="right"){
- x.style.borderLeftWidth="0";
- x.style.marginLeft="0";
- }
-return(x);
-}
-
-function CreateEl(x){
-return(document.createElement(x));
-}
-
-/**
- * fixed by Ken Kinder on October 26, 2009
- * http://kenkinder.com/2009/10/26/how-to-fix-niftycube-ie-8-width-problem/
- *
- */
-function FixIE(el){
-if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
-
- var ver = getIeVersion();
- if (ver < 8) {
- el.style.display="inline-block";
- }
-}
-
-
-
-function SameHeight(selector,maxh){
-var i,v=selector.split(","),t,j,els=[],gap;
-for(i=0;imaxh) maxh=els[i].offsetHeight;
- els[i].style.height="auto";
- }
-for(i=0;i0){
- t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";
- nc=els[i].lastChild;
- if(nc.className=="niftycorners")
- els[i].insertBefore(t,nc);
- else els[i].appendChild(t);
- }
- }
-}
-
-function getElementsBySelector(selector){
-var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;
-if(selector.find("#")){ //id selector like "tag#id"
- if(selector.find(" ")){ //descendant selector like "tag#id tag"
- s=selector.split(" ");
- var fs=s[0].split("#");
- if(fs.length==1) return(objlist);
- f=document.getElementById(fs[1]);
- if(f){
- v=f.getElementsByTagName(s[1]);
- for(i=0;i
+
+ {if $edit_enabled && $steps != '' && !is_null($steps) && $args_frozen_version=="no"}
+
+
+ {/if}
+ {$inc_steps_labels.step_number}
+ |
+ {$inc_steps_labels.step_actions}
+ |
+ {$inc_steps_labels.expected_results} |
+ {if $edit_enabled}
+ |
+ |
+ {/if}
+
+ {if $inExec}
+ {if $tlCfg->exec_cfg->steps_exec_notes_default == 'latest'}{$inc_steps_labels.latest_exec_notes}
+ {else}{$inc_steps_labels.step_exec_notes}{/if}
+ |
+
+ {$inc_steps_labels.step_exec_status}
+ |
+ {/if}
+
+
+
+
+ {$rowCount=$steps|@count}
+ {$row=0}
+
+ {$att_ena = $inExec &&
+ $tlCfg->exec_cfg->steps_exec_attachments}
+
+ {foreach from=$steps item=step_info}
+
+
+
+ {if $edit_enabled && $args_frozen_version=="no"}
+
+ {include file="error_icon.tpl" field="step_number"}
+ {/if}
+
+ {$step_info.step_number}
+ |
+ {if $gui->stepDesignEditorType == 'none'}{$step_info.actions|nl2br}{else}{$step_info.actions}{/if}
+ |
+ {if $gui->stepDesignEditorType == 'none'}{$step_info.expected_results|nl2br}{else}{$step_info.expected_results}{/if} |
+
+ {if $edit_enabled && $args_frozen_version=="no"}
+
+
+ |
+
+
+
+ |
+
+ {/if}
+
+ {if $inExec}
+
+
+ |
+
+
+
+
+ {if $gui->tlCanCreateIssue}
+ {include file="execute/add_issue_on_step.inc.tpl"
+ args_labels=$labels
+ args_step_id=$step_info.id}
+ {/if}
+ |
+
+ {/if}
+
+
+ {if $inExec && $gui->tlCanCreateIssue}
+
+
+ {include file="execute/issue_inputs_on_step.inc.tpl"
+ args_labels=$labels
+ args_step_id=$step_info.id}
+ |
+
+ {/if}
+
+ {if $gui->allowStepAttachments && $att_ena}
+
+
+ {include file="attachments_simple.inc.tpl" attach_id=$step_info.id}
+ |
+
+ {/if}
+
+ {if $ghost_control}
+ | {$step_info.ghost_action} | {$step_info.ghost_result} |
+ {/if}
+
+ {$rCount=$row+$step_info.step_number}
+ {if ($rCount < $rowCount) && ($rowCount>=1)}
+
+
+
+ |
+
+ {/if}
+
+ {/foreach}
\ No newline at end of file
diff --git a/gui/templates/custom/testcases/tcStepEdit-custom.tpl b/gui/templates/custom/testcases/tcStepEdit-custom.tpl
new file mode 100644
index 0000000000..b1a76a593f
--- /dev/null
+++ b/gui/templates/custom/testcases/tcStepEdit-custom.tpl
@@ -0,0 +1,314 @@
+{*
+TestLink Open Source Project - http://testlink.sourceforge.net/
+@filesource tcStepEdit.tpl
+Purpose: create/edit test case step
+*}
+
+{$cfg_section=$smarty.template|basename|replace:".tpl":""}
+{config_load file="input_dimensions.conf" section=$cfg_section}
+
+{$module='lib/testcases/'}
+{$tcase_id=$gui->tcase_id}
+{$tcversion_id=$gui->tcversion_id}
+
+{* Used on several operations to implement goback *}
+{$showMode=$gui->show_mode}
+
+{$tcViewAction="lib/testcases/archiveData.php?tcase_id=$tcase_id&show_mode=$showMode"}
+{$goBackAction="$basehref$tcViewAction"}
+{$goBackActionURLencoded=$goBackAction|escape:'url'}
+{$url_args="tcEdit.php?doAction=editStep&testcase_id=$tcase_id&tcversion_id=$tcversion_id"}
+{$url_args="$url_args&goback_url=$goBackActionURLencoded&step_id="}
+{$hrefEditStep="$basehref$module$url_args"}
+
+{lang_get var="labels"
+ s="warning_step_number_already_exists,warning,warning_step_number,btn_save_and_exit,btn_save_and_insert,
+ expected_results,step_actions,step_number_verbose,btn_cancel,btn_create_step,ghost,
+ show_ghost_string,display_author_updater,
+ btn_create,btn_cp,btn_copy_step,btn_save,cancel,warning_unsaved,step_number,execution_type_short_descr,
+ title_created,version,by,summary,preconditions,title_last_mod"}
+
+{include file="inc_head.tpl" openHead='yes' jsValidate="yes" editorType=$gui->editorType}
+{include file="inc_del_onclick.tpl"}
+
+
+
+
+{if $tlCfg->gui->checkNotSaved}
+
+
+{/if}
+
+
+{if $gui->action == 'createStep' || $gui->action == 'doCreateStep'}
+ {$scrollPosition='new_step'}
+{else}
+ {$stepToScrollTo=$gui->step_number}
+ {$scrollPosition="step_row_$stepToScrollTo"}
+{/if}
+
+
+{$gui->main_descr}
+
+
+
+{if $gui->user_feedback != ''}
+
+
{$gui->user_feedback}
+
+{/if}
+
+{if $gui->has_been_executed}
+ {lang_get s='warning_editing_executed_step' var="warning_edit_msg"}
+
{$warning_edit_msg}
+{/if}
+
+
+
+
+
+