xcpweb

changeset 7:b9279d8aaa76

Some cleaning
author Nikola Nikov <nikolanikov@webconnect.bg>
date Tue Jun 15 00:58:46 2010 +0300 (2010-06-15)
parents fa572caf2edc
children dff069dff4b7
files interface/img/ico-arrow-right.png interface/img/tabs/active-gradient.jpg interface/img/tabs/border.png interface/img/tabs/ico-close.jpg interface/img/tabs/unactive-gradient-hover.jpg interface/img/tabs/unactive-gradient.jpg interface/menu.html interface/menu_tmpl.html interface/rightmenu.css interface/rightmenu.js interface/tabs.css interface/tabs.js interface/tabs_tmpl.html
line diff
     1.1 Binary file interface/img/ico-arrow-right.png has changed
     2.1 Binary file interface/img/tabs/active-gradient.jpg has changed
     3.1 Binary file interface/img/tabs/border.png has changed
     4.1 Binary file interface/img/tabs/ico-close.jpg has changed
     5.1 Binary file interface/img/tabs/unactive-gradient-hover.jpg has changed
     6.1 Binary file interface/img/tabs/unactive-gradient.jpg has changed
     7.1 --- a/interface/menu.html	Tue Jun 15 00:35:25 2010 +0300
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,35 +0,0 @@
     7.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     7.5 -<html xmlns="http://www.w3.org/1999/xhtml">
     7.6 -<head>
     7.7 -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     7.8 -<title>XCP web interface submenu test</title>
     7.9 -<link href="rightmenu.css" rel="stylesheet" type="text/css" />
    7.10 -<script type="Text/JavaScript" Language="JavaScript" src="rightmenu.js"></script>
    7.11 -<style media="all" type="text/css">
    7.12 -.more-info {display:none}
    7.13 -</style>
    7.14 -<script type="text/javascript" language="javascript">
    7.15 -var param;
    7.16 -function createMenu(param,e) {
    7.17 -	if (inboxmenu.getMenu(param)) { inboxmenu.dropMenu(param); }
    7.18 -	var currentMenu = inboxmenu.createMenu(param);
    7.19 -	if (typeof(currentMenu) == 'object') {
    7.20 -		inboxmenu.appendInMenu(currentMenu,'item1','Item 1',"alert('Item 1')",'/interface/img/ico-arrow-right.png');
    7.21 -		inboxmenu.appendInMenu(currentMenu,'item2','Item 2',"alert('Item 2');",'/interface/img/ico-arrow-right.png');
    7.22 -		var subcurrent = inboxmenu.appendSubInMenu(currentMenu,'sub1','Sub1','/interface/img/ico-arrow-right.png');
    7.23 -		if (typeof(subcurrent) == 'object') {
    7.24 -			inboxmenu.appendInMenu(subcurrent,'submenu1','Sub Menu 1',"alert('Sub Menu 1')",'/interface/img/ico-arrow-right.png');
    7.25 -		}
    7.26 -		inboxmenu.appendInMenu(currentMenu,'item3','Item 3',"alert('item3');",'/interface/img/ico-arrow-right.png');
    7.27 -		inboxmenu.appendInMenu(currentMenu,'item4','Item 4',"alert('item4')",'/interface/img/ico-arrow-right.png');
    7.28 -		inboxmenu.openRightMenu('menu_'+param,e);
    7.29 -	}
    7.30 -}
    7.31 -</script>
    7.32 -</head>
    7.33 -<body>
    7.34 -<a href="#" onclick="createMenu('current_prv',event);">teeeest menu</a>
    7.35 -<div id="otherPages"></div>
    7.36 -<div id="submenus"></div>
    7.37 -</body>
    7.38 -</html>
    7.39 \ No newline at end of file
     8.1 --- a/interface/menu_tmpl.html	Tue Jun 15 00:35:25 2010 +0300
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,35 +0,0 @@
     8.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     8.5 -<html xmlns="http://www.w3.org/1999/xhtml">
     8.6 -<head>
     8.7 -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     8.8 -<title>XCP web interface submenu test</title>
     8.9 -<link href="rightmenu.css" rel="stylesheet" type="text/css" />
    8.10 -<script type="Text/JavaScript" Language="JavaScript" src="rightmenu.js"></script>
    8.11 -<style media="all" type="text/css">
    8.12 -.more-info {display:none}
    8.13 -</style>
    8.14 -<script type="text/javascript" language="javascript">
    8.15 -var param;
    8.16 -function createMenu(param,e) {
    8.17 -	if (xcp_menu.getMenu(param)) { xcp_menu.dropMenu(param); }
    8.18 -	var currentMenu = xcp_menu.createMenu(param);
    8.19 -	if (typeof(currentMenu) == 'object') {
    8.20 -		xcp_menu.appendInMenu(currentMenu,'item1','Item 1',"alert('Item 1')",'/interface/img/ico-arrow-right.png');
    8.21 -		xcp_menu.appendInMenu(currentMenu,'item2','Item 2',"alert('Item 2');",'/interface/img/ico-arrow-right.png');
    8.22 -		var subcurrent = xcp_menu.appendSubInMenu(currentMenu,'sub1','Sub1','/interface/img/ico-arrow-right.png');
    8.23 -		if (typeof(subcurrent) == 'object') {
    8.24 -			xcp_menu.appendInMenu(subcurrent,'submenu1','Sub Menu 1',"alert('Sub Menu 1')",'/interface/img/ico-arrow-right.png');
    8.25 -		}
    8.26 -		xcp_menu.appendInMenu(currentMenu,'item3','Item 3',"alert('item3');",'/interface/img/ico-arrow-right.png');
    8.27 -		xcp_menu.appendInMenu(currentMenu,'item4','Item 4',"alert('item4')",'/interface/img/ico-arrow-right.png');
    8.28 -		xcp_menu.openRightMenu('menu_'+param,e);
    8.29 -	}
    8.30 -}
    8.31 -</script>
    8.32 -</head>
    8.33 -<body>
    8.34 -<a href="#" onclick="createMenu('current_prv',event);">test menu</a>
    8.35 -<div id="otherPages"></div>
    8.36 -<div id="submenus"></div>
    8.37 -</body>
    8.38 -</html>
    8.39 \ No newline at end of file
     9.1 --- a/interface/rightmenu.css	Tue Jun 15 00:35:25 2010 +0300
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,117 +0,0 @@
     9.4 -.rightmenu {
     9.5 -	margin: 0px;
     9.6 -	padding: 0px;
     9.7 -	background-color: #f2f2f2;
     9.8 -	font-size: 11px;
     9.9 -	width: 160px;
    9.10 -	font-family: Arial, Helvetica, sans-serif;
    9.11 -	border-top-width: 1px;
    9.12 -	border-right-width: 2px;
    9.13 -	border-bottom-width: 2px;
    9.14 -	border-left-width: 1px;
    9.15 -	border-top-style: solid;
    9.16 -	border-right-style: solid;
    9.17 -	border-bottom-style: solid;
    9.18 -	border-left-style: solid;
    9.19 -	border-top-color: #CCCCCC;
    9.20 -	border-right-color: #666666;
    9.21 -	border-bottom-color: #666666;
    9.22 -	border-left-color: #CCCCCC;
    9.23 -	position: fixed;
    9.24 -	_position:absolute;
    9.25 -	z-index: 30!important;
    9.26 -	z-index:30;
    9.27 -	left: 0px;
    9.28 -	top: 0px;
    9.29 -	display: none;
    9.30 -}
    9.31 -.rightmenu li.sub {
    9.32 -	background-color: #f2f2f2;
    9.33 -	background-image: url(ico-arrow-right.png);
    9.34 -	background-repeat: no-repeat;
    9.35 -	background-position: 145px center;
    9.36 -} 
    9.37 -
    9.38 -.rightmenu ul {
    9.39 -	width:160px;
    9.40 -	height:auto;
    9.41 -	overflow:visible;
    9.42 -	padding:0;
    9.43 -	margin:0;
    9.44 -}
    9.45 -.rightmenu ul li {
    9.46 -	list-style-image:none;
    9.47 -	list-style:none;
    9.48 -	list-style-type:none;
    9.49 -	width:160px;
    9.50 -	height:21px;
    9.51 -	text-align:left;
    9.52 -	margin:0;
    9.53 -	padding:0;
    9.54 -	margin-top:-1px;
    9.55 -	clear:both;
    9.56 -	overflow:visible;
    9.57 -	position:relative;
    9.58 -	padding-top:5px;
    9.59 -	border-top-width: 1px;
    9.60 -	border-top-style: solid;
    9.61 -	border-top-color: #CCCCCC;
    9.62 -	cursor:pointer;
    9.63 -}
    9.64 -.rightmenu ul li a {
    9.65 -	text-decoration:none;
    9.66 -	color:#000000;
    9.67 -}
    9.68 -.rightmenu ul li:hover {
    9.69 -	color:#000000;
    9.70 -	background-color: #9dd4fc;
    9.71 -}
    9.72 -.rightmenu ul li ul {
    9.73 -	position:absolute;
    9.74 -	top:-30px;
    9.75 -	left:145px;
    9.76 -	padding:30px 50px 40px 0px;
    9.77 -	display:none;
    9.78 -	z-index:30;
    9.79 -}
    9.80 -.rightmenu ul li ul li {
    9.81 -	border-top-width: 1px;
    9.82 -	border-right-width: 2px;
    9.83 -	border-bottom-width: 2px;
    9.84 -	border-left-width: 1px;
    9.85 -	border-top-style: solid;
    9.86 -	border-right-style: solid;
    9.87 -	border-bottom-style: solid;
    9.88 -	border-left-style: solid;
    9.89 -	border-top-color: #CCCCCC;
    9.90 -	border-right-color: #666666;
    9.91 -	border-bottom-color: #666666;
    9.92 -	border-left-color: #CCCCCC;
    9.93 -	background-color: #f2f2f2;
    9.94 -	margin-top:-2px;
    9.95 -}
    9.96 -.rightmenu ul li:hover > ul {
    9.97 -	display:block;
    9.98 -}
    9.99 -.menu-ico {
   9.100 -	padding:0;
   9.101 -	float: left;
   9.102 -	width: 16px;
   9.103 -	margin-right: 6px;
   9.104 -	padding-right:0;
   9.105 -	padding-left:6px;
   9.106 -	margin-top:-2px;
   9.107 -}
   9.108 -.menu-ico input {
   9.109 -	float:left;
   9.110 -	margin:0;
   9.111 -	margin-top:2px;
   9.112 -}
   9.113 -.menu-ico-sub {
   9.114 -	padding:0;
   9.115 -	float: left;
   9.116 -	width: 16px;
   9.117 -	margin-right: 3px;
   9.118 -	padding-right:3px;
   9.119 -	padding-left:6px;
   9.120 -}
    10.1 --- a/interface/rightmenu.js	Tue Jun 15 00:35:25 2010 +0300
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,458 +0,0 @@
    10.4 -function xcp_Menu() {
    10.5 -	var bw=document.getElementById&&!document.all;
    10.6 -	var winm;
    10.7 -	var prgm;
    10.8 -	var param;
    10.9 -	var attr;
   10.10 -	var oname;
   10.11 -	var fobj;
   10.12 -	var self = this;
   10.13 -	this.openedForFiles = new Array();
   10.14 -	this.openedForObjects = false;
   10.15 -	this.menuopen = new Array();
   10.16 -	this.menubeforeopen = new Array();
   10.17 -	this.winm = false;
   10.18 -	this.mousedown = function(e) {
   10.19 -		fobj = bw ? e.target : event.srcElement;
   10.20 -		self.checkforopenmenu(e,fobj);
   10.21 -	}
   10.22 -	this.checkforopenmenu = function(e,fobj) {
   10.23 -		if (self.winm && typeof(self.winm) == 'object') {
   10.24 -			if (!fobj.getAttribute('submenu')) {
   10.25 -				var menuid;
   10.26 -				if (menuid = self.getMainMenuId(fobj)) {
   10.27 -					self.dropMenu(menuid.substr(5));
   10.28 -				}
   10.29 -				else if (menuid = self.getMainMenuId(self.winm)) {
   10.30 -					self.dropMenu(menuid.substr(5));
   10.31 -				}
   10.32 -
   10.33 -			}
   10.34 -			else {
   10.35 -				var menuid = self.getMainMenuId(fobj);
   10.36 -				if (document.getElementById(menuid)) {
   10.37 -					var menuObj = document.getElementById(menuid);
   10.38 -					var menuObjLeft = tplf.findPosX(menuObj);
   10.39 -					if (menuObjLeft > menuObj.offsetWidth) {
   10.40 -						var mx = bw ? e.clientX : event.clientX;
   10.41 -						menuObj.style.left = (menuObjLeft-(menuObj.offsetWidth - 15))+'px';
   10.42 -					}
   10.43 -				}
   10.44 -			}
   10.45 -		}
   10.46 -		if (fobj.getAttribute('menuclick') && self.isEnabled(fobj)) {
   10.47 -			if (fobj.tagName == 'INPUT' && fobj.type == 'checkbox') {
   10.48 -				fobj.checked = !fobj.checked;
   10.49 -			}
   10.50 -			else {
   10.51 -				var obj = self.getMenuId(fobj);
   10.52 -				if (typeof(obj) == 'string' && document.getElementById(obj)) {
   10.53 -					self.changeCheckBox(obj);
   10.54 -				}
   10.55 -			}
   10.56 -			eval(fobj.getAttribute('menuclick'));
   10.57 -		}
   10.58 -	}
   10.59 -	this.openRightMenu = function(winm,e,param) {
   10.60 -		if (!document.getElementById(winm)) { return false; }
   10.61 -		var mx = bw ? e.clientX : event.clientX;
   10.62 -		var my = bw ? e.clientY : event.clientY;
   10.63 -		self.winm = document.getElementById(winm);
   10.64 -		if (!param) {
   10.65 -			self.winm.style.left=mx+"px";
   10.66 -			self.winm.style.top=my+"px";
   10.67 -		}
   10.68 -		self.winm.style.display="block";
   10.69 -		if (!param) {
   10.70 -			if (parseInt(navigator.appVersion)>3) {
   10.71 -				if (navigator.appName=="Netscape") {
   10.72 -					var winW = window.innerWidth;
   10.73 -					var winH = window.innerHeight;
   10.74 -				}
   10.75 -				if (navigator.appName.indexOf("Microsoft")!=-1) {
   10.76 -					var winW = document.body.scrollWidth;
   10.77 -					var winH = document.body.scrollHeight;
   10.78 -				}
   10.79 -			}
   10.80 -			if ((Number(self.winm.offsetLeft) + Number(self.winm.offsetWidth)) >= winW) {
   10.81 -				self.winm.style.left = Number(self.winm.offsetLeft) - Number(self.winm.offsetWidth)+'px';
   10.82 -			}
   10.83 -			if ((Number(self.winm.offsetTop) + Number(self.winm.offsetHeight)) >= winH) {
   10.84 -				self.winm.style.top = Number(winH) - Number(self.winm.offsetHeight)+'px';
   10.85 -			}
   10.86 -		}
   10.87 -	}
   10.88 -
   10.89 -	
   10.90 -	var menuobj;
   10.91 -	var menupos;
   10.92 -	var menuname;
   10.93 -	var menuclick;
   10.94 -	var menuicon;
   10.95 -	this.isMenu = function(param) {
   10.96 -		if (document.getElementById('menu_'+param)) { return true; }
   10.97 -		else { return false; }
   10.98 -	}
   10.99 -	this.getMenu = function(param) {
  10.100 -		if (self.isMenu(param)) { return document.getElementById('menu_'+param); }
  10.101 -		else { return false; }
  10.102 -	}
  10.103 -	this.isInMenu = function(menuobj,param) {
  10.104 -		if (!menuobj) { return false; }
  10.105 -		if (typeof(menuobj) == 'object') {
  10.106 -			var mname = self.getMainMenuId(menuobj);
  10.107 -			if (!mname) { return false; }
  10.108 -			if (document.getElementById(mname+'_'+param)) { return true; }
  10.109 -			else { return false; }
  10.110 -		}
  10.111 -		return false;
  10.112 -	}
  10.113 -	this.getInMenu = function(menuobj,param) {
  10.114 -		if (!menuobj) { return false; }
  10.115 -		if (typeof(menuobj) == 'object') {
  10.116 -			var mname = self.getMainMenuId(menuobj);
  10.117 -			if (!mname) { return false; }
  10.118 -			if ((menuobj.className && menuobj.className == 'sub') || menuobj.tagName == 'DIV') {
  10.119 -				menuobj = menuobj.getElementsByTagName('UL');
  10.120 -				if (menuobj.length) { menuobj = menuobj[0]; }
  10.121 -				else { return false; }
  10.122 -			}
  10.123 -			for (i=0;i<menuobj.childNodes.length;i++) {
  10.124 -				if (menuobj.childNodes[i].id && menuobj.childNodes[i].id == mname+'_'+param) {
  10.125 -					return menuobj.childNodes[i];
  10.126 -				}
  10.127 -			}
  10.128 -			return false;
  10.129 -		}
  10.130 -		else { return false; }
  10.131 -	}
  10.132 -	this.getMainMenuId = function(menuobj) {
  10.133 -		if (!menuobj) { return false; }
  10.134 -		if (menuobj.className && menuobj.className == 'rightmenu') { return menuobj.id; }
  10.135 -		while (menuobj.tagName != undefined && menuobj.tagName != 'HTML' && menuobj.tagName != 'HEAD' && menuobj.tagName != 'BODY' && menuobj.parentNode) {
  10.136 -			menuobj = menuobj.parentNode;
  10.137 -			if (menuobj.className && menuobj.className == 'rightmenu') { return menuobj.id; break; }
  10.138 -		}
  10.139 -		return false;
  10.140 -	}
  10.141 -	this.getMenuId = function(menuobj) {
  10.142 -		if (!menuobj) { return false; }
  10.143 -		if (menuobj.tagName && menuobj.tagName == 'LI') { return menuobj.id; }
  10.144 -		while (menuobj.tagName != undefined && menuobj.tagName != 'HTML' && menuobj.tagName != 'HEAD' && menuobj.tagName != 'BODY' && menuobj.parentNode) {
  10.145 -			menuobj = menuobj.parentNode;
  10.146 -			if (menuobj.tagName && menuobj.tagName == 'LI') { return menuobj.id; break; }
  10.147 -		}
  10.148 -		return false;
  10.149 -	}
  10.150 -	this.createMenu = function(param) {
  10.151 -		if (!self.isMenu(param)) {
  10.152 -			var divmenu = document.createElement('DIV');
  10.153 -			divmenu.className = 'rightmenu';
  10.154 -			divmenu.setAttribute('id','menu_'+param);
  10.155 -			var ulmenu = document.createElement('UL');
  10.156 -			ulmenu.setAttribute('id','ul_'+param);
  10.157 -			divmenu.appendChild(ulmenu);
  10.158 -			document.getElementById('submenus').appendChild(divmenu);
  10.159 -			return ulmenu;
  10.160 -		}
  10.161 -		else { return false; }
  10.162 -	}
  10.163 -	this.dropMenu = function(param) {
  10.164 -		if (self.isMenu(param)) {
  10.165 -			var obj = self.getMenu(param);
  10.166 -			obj.parentNode.removeChild(obj);
  10.167 -			obj = undefined;
  10.168 -			return true;
  10.169 -		}
  10.170 -		else { return false; }
  10.171 -	}
  10.172 -	this.appendInMenu = function(menuobj,param,menuname,menuclick,menuicon,menupos) {
  10.173 -		if (typeof(menuobj) != 'object') { return false; }
  10.174 -		if (self.isInMenu(menuobj,param)) { return true; }
  10.175 -		if ((menuobj.className && menuobj.className == 'sub') || menuobj.tagName == 'DIV') {
  10.176 -			menuobj = menuobj.getElementsByTagName('UL');
  10.177 -			if (menuobj.length) { menuobj = menuobj[0]; }
  10.178 -			else { return false; }
  10.179 -		}
  10.180 -		var mname = self.getMainMenuId(menuobj);
  10.181 -		if (!mname) { return false; }
  10.182 -		var newmenu = document.createElement('li');
  10.183 -		newmenu.setAttribute('id',mname+'_'+param);
  10.184 -		newmenu.setAttribute('main','yes');
  10.185 -		if (menuclick) { newmenu.setAttribute('menuclick',menuclick); }
  10.186 -		var mico = document.createElement('span');
  10.187 -		mico.className = 'menu-ico';
  10.188 -		if (menuicon) {
  10.189 -			if (menuicon != 'checkbox' && menuicon != 'null') {
  10.190 -				var icoimg = document.createElement('IMG');
  10.191 -				icoimg.setAttribute('src',menuicon);
  10.192 -				icoimg.setAttribute('border','0');
  10.193 -				var ailink = document.createElement('A');
  10.194 -				ailink.style.cursor = 'pointer';
  10.195 -				ailink.setAttribute('id',mname+'_'+param);
  10.196 -				ailink.className = 'right-menu-'+param;
  10.197 -				if (menuclick) { mico.setAttribute('menuclick',menuclick); icoimg.setAttribute('menuclick',menuclick); ailink.setAttribute('menuclick',menuclick); }
  10.198 -				ailink.appendChild(icoimg);
  10.199 -				mico.appendChild(ailink);
  10.200 -			}
  10.201 -			else {
  10.202 -				if (menuicon == 'checkbox') {
  10.203 -					var icoimg = document.createElement('INPUT');
  10.204 -					icoimg.setAttribute('type',menuicon);
  10.205 -					icoimg.checked = true;
  10.206 -					icoimg.setAttribute('classname',menuicon);
  10.207 -					icoimg.setAttribute('id','checkbox_'+mname+'_'+param);
  10.208 -					if (menuclick) { mico.setAttribute('menuclick',menuclick); icoimg.setAttribute('menuclick',menuclick); }
  10.209 -					mico.appendChild(icoimg);
  10.210 -				}
  10.211 -				if (menuicon == 'null') {
  10.212 -					mico.innerHTML = '&nbsp';
  10.213 -				}
  10.214 -			}
  10.215 -		}
  10.216 -		newmenu.appendChild(mico);
  10.217 -		var alink = document.createElement('A');
  10.218 -		if (menuclick) { alink.setAttribute('menuclick',menuclick); }
  10.219 -		alink.style.cursor = 'pointer';
  10.220 -		alink.setAttribute('id',mname+'_'+param);
  10.221 -		alink.className = 'right-menu-'+param;
  10.222 -		alink.innerHTML = menuname;
  10.223 -		newmenu.appendChild(alink);
  10.224 -		if (menupos && menupos <= menuobj.childNodes.length) {
  10.225 -			menuobj.insertBefore(newmenu,menuobj.childNodes[menupos - 1]);
  10.226 -		}
  10.227 -		else { menuobj.appendChild(newmenu); }
  10.228 -		return newmenu;
  10.229 -	}
  10.230 -
  10.231 -	this.appendSubInMenu = function(menuobj,param,menuname,menuicon,menupos) {
  10.232 -		if (typeof(menuobj) != 'object') { return false; }
  10.233 -		if (self.isInMenu(menuobj,param)) { return true; }
  10.234 -		if ((menuobj.className && menuobj.className == 'sub') || menuobj.tagName == 'DIV') {
  10.235 -			menuobj = menuobj.getElementsByTagName('UL');
  10.236 -			if (menuobj.length) { menuobj = menuobj[0]; }
  10.237 -			else { return false; }
  10.238 -		}
  10.239 -		var mname = self.getMainMenuId(menuobj);
  10.240 -		if (!mname) { return false; }
  10.241 -		var newmenu = document.createElement('li');
  10.242 -		newmenu.setAttribute('id',mname+'_'+param);
  10.243 -		newmenu.setAttribute('main','yes');
  10.244 -		newmenu.className = 'sub';
  10.245 -		var mico = document.createElement('span');
  10.246 -		mico.className = 'menu-ico-sub';
  10.247 -		if (menuicon) {
  10.248 -			if (menuicon == 'null') {
  10.249 -				mico.innerHTML = '&nbsp';
  10.250 -			}
  10.251 -			else {
  10.252 -				var icoimg = document.createElement('IMG');
  10.253 -				icoimg.setAttribute('src',menuicon);
  10.254 -				icoimg.setAttribute('border','0');
  10.255 -				icoimg.setAttribute('submenu','yes');
  10.256 -				mico.appendChild(icoimg);
  10.257 -			}
  10.258 -		}
  10.259 -		mico.setAttribute('submenu','yes');
  10.260 -		newmenu.appendChild(mico);
  10.261 -
  10.262 -		var alink = document.createElement('A');
  10.263 -		alink.style.cursor = 'pointer';
  10.264 -		alink.setAttribute('submenu','yes');
  10.265 -		alink.innerHTML = menuname;
  10.266 -		newmenu.appendChild(alink);
  10.267 -		var subul = document.createElement('UL');
  10.268 -		newmenu.appendChild(subul);
  10.269 -		newmenu.setAttribute('submenu','yes');
  10.270 -		if (menupos && menupos <= menuobj.childNodes.length) {
  10.271 -			menuobj.insertBefore(newmenu,menuobj.childNodes[menupos - 1]);
  10.272 -		}
  10.273 -		else { menuobj.appendChild(newmenu); }
  10.274 -		return subul;
  10.275 -	}
  10.276 -	this.dropInMenu = function(menuobj,param) {
  10.277 -		if (typeof(menuobj) != 'object') { return false; }
  10.278 -		if (!self.isInMenu(menuobj,param)) { return true; }
  10.279 -		if ((menuobj.className && menuobj.className == 'sub') || menuobj.tagName == 'DIV') {
  10.280 -			menuobj = menuobj.getElementsByTagName('UL');
  10.281 -			if (menuobj.length) { menuobj = menuobj[0]; }
  10.282 -			else { return false; }
  10.283 -		}
  10.284 -		var mname = self.getMainMenuId(menuobj);
  10.285 -		if (!mname) { return false; }
  10.286 -		for (i = 0;i<menuobj.childNodes.length;i++) {
  10.287 -			if (menuobj.childNodes[i].tagName == 'LI' && menuobj.childNodes[i].id == mname+'_'+param) {
  10.288 -				menuobj.removeChild(menuobj.childNodes[i]);
  10.289 -				return true;
  10.290 -				break;
  10.291 -			}
  10.292 -		}
  10.293 -		return false;
  10.294 -	}
  10.295 -	this.isEnabled = function(menuobj) {
  10.296 -		if (typeof(menuobj) == 'object' && menuobj.getAttribute('menuclick')) {
  10.297 -			while(!menuobj.getAttribute('main')) {
  10.298 -				menuobj = menuobj.parentNode;
  10.299 -			}
  10.300 -			if (menuobj.getAttribute('disabled')) { return false; }
  10.301 -			return true;
  10.302 -		}
  10.303 -		return false;
  10.304 -	}
  10.305 -	this.enableMenu = function(menuobj) {
  10.306 -		if (typeof(menuobj) == 'object') {
  10.307 -			var elms = menuobj.getElementsByTagName('A');
  10.308 -			if (elms.length) {
  10.309 -				for (var i=0;i<elms.length;i++) {
  10.310 -					elms[i].style.color = "#000000";
  10.311 -				}
  10.312 -			}
  10.313 -			menuobj.style.color="#000000";
  10.314 -			if (menuobj.getAttribute('disabled')) {
  10.315 -				menuobj.removeAttribute('disabled');
  10.316 -			}
  10.317 -		}
  10.318 -	}
  10.319 -	this.changeCheckBox = function(param,attr) {
  10.320 -		if (typeof(param) != 'string' || !document.getElementById(param)) { return false; }
  10.321 -		var chb = self.getCheckBox(param);
  10.322 -		if (!chb) { return false; }
  10.323 -		if (typeof(attr) == 'undefined') {
  10.324 -			chb.checked = !chb.checked;
  10.325 -		}
  10.326 -		else { chb.checked = attr; }
  10.327 -	}
  10.328 -	this.getCheckBox = function(param) {
  10.329 -		if (typeof(param) != 'string' || !document.getElementById(param)) { return false; }
  10.330 -		if (document.getElementById('checkbox_'+param)) {
  10.331 -			return document.getElementById('checkbox_'+param);
  10.332 -		}
  10.333 -	}
  10.334 -	this.disableMenu = function(menuobj) {
  10.335 -		if (typeof(menuobj) == 'object') {
  10.336 -			var elms = menuobj.getElementsByTagName('A');
  10.337 -			if (elms.length) {
  10.338 -				for (var i=0;i<elms.length;i++) {
  10.339 -					elms[i].style.color = "#b1b1b1";
  10.340 -				}
  10.341 -			}
  10.342 -			menuobj.style.color="#b1b1b1";
  10.343 -			menuobj.setAttribute('disabled','yes');
  10.344 -		}
  10.345 -	}
  10.346 -	this.uploadMenu = false;
  10.347 -	this.openUploadMenu = function() {
  10.348 -		if (self.uploadMenu) { document.getElementById('uploadmenu').style.display = 'none'; }
  10.349 -		else { document.getElementById('uploadmenu').style.display = 'block'; }
  10.350 -		self.uploadMenu = !self.uploadMenu;
  10.351 -	}
  10.352 -}
  10.353 -var xcp_menu = new xcp_Menu();
  10.354 -function xcp_Functions() {
  10.355 -	var self = this;
  10.356 -	var param;
  10.357 -	var attr;
  10.358 -
  10.359 -	var objElement;
  10.360 -	var strClass;
  10.361 -	var binMayAlredyExists;
  10.362 -	this.HasClassName = function(objElement, strClass) {
  10.363 -		if ( objElement.className ) {
  10.364 -			var arrList = objElement.className.split(' ');
  10.365 -			var strClassUpper = strClass.toUpperCase();
  10.366 -			for ( var i = 0; i < arrList.length; i++ ) {
  10.367 -				if ( arrList[i].toUpperCase() == strClassUpper ) {
  10.368 -					return true;
  10.369 -				}
  10.370 -			}
  10.371 -		}
  10.372 -		return false;
  10.373 -	}
  10.374 -	this.addClassName = function(objElement, strClass, blnMayAlreadyExist) {
  10.375 -		if ( objElement.className ) {
  10.376 -			var arrList = objElement.className.split(' ');
  10.377 -			if ( blnMayAlreadyExist ) {
  10.378 -				var strClassUpper = strClass.toUpperCase();
  10.379 -				for ( var i = 0; i < arrList.length; i++ ) {
  10.380 -					if ( arrList[i].toUpperCase() == strClassUpper ) {
  10.381 -						arrList.splice(i, 1);
  10.382 -						i--;
  10.383 -					}
  10.384 -				}
  10.385 -			}
  10.386 -			arrList[arrList.length] = strClass;
  10.387 -			objElement.className = arrList.join(' ');
  10.388 -		}
  10.389 -		else {
  10.390 -			objElement.className = strClass;
  10.391 -		}
  10.392 -	}
  10.393 -	this.removeClassName = function(objElement, strClass) {
  10.394 -		if ( objElement.className ) {
  10.395 -			var arrList = objElement.className.split(' ');
  10.396 -			var strClassUpper = strClass.toUpperCase();
  10.397 -			for ( var i = 0; i < arrList.length; i++ ) {
  10.398 -				if ( arrList[i].toUpperCase() == strClassUpper ) {
  10.399 -					arrList.splice(i, 1);
  10.400 -					i--;
  10.401 -				}
  10.402 -			}
  10.403 -			objElement.className = arrList.join(' ');
  10.404 -		}
  10.405 -	}
  10.406 -	this.findPos = function(fobj) {
  10.407 -		if (typeof(fobj) != 'object') { return [0,0]; }
  10.408 -		var curleft = curtop = 0;
  10.409 -		if (fobj.offsetParent) {
  10.410 -			curleft = fobj.offsetLeft
  10.411 -			curtop = fobj.offsetTop
  10.412 -			while (fobj = fobj.offsetParent) {
  10.413 -				curleft += fobj.offsetLeft
  10.414 -				curtop += fobj.offsetTop
  10.415 -			}
  10.416 -		}
  10.417 -		return [curleft,curtop];
  10.418 -	}
  10.419 -	this.findPosX = function(fobj) {
  10.420 -		if (typeof(fobj) != 'object') { return 0; }
  10.421 -		if (navigator.appName == 'Microsoft Internet Explorer' || navigator.appName == 'Opera' || navigator.appName == 'Netscape') {
  10.422 -			return fobj.offsetLeft;
  10.423 -		}
  10.424 -		if (navigator.userAgent.indexOf('Chrome') > -1) {
  10.425 -			return fobj.offsetLeft;
  10.426 -		}
  10.427 -		var curleft = 0;
  10.428 -		if(fobj.offsetParent)
  10.429 -		while(1) {
  10.430 -			curleft += fobj.offsetLeft;
  10.431 -			if(!fobj.offsetParent)
  10.432 -			break;
  10.433 -			fobj = fobj.offsetParent;
  10.434 -		}
  10.435 -		else if(fobj.x)
  10.436 -		curleft += fobj.x;
  10.437 -		return curleft;
  10.438 -	}
  10.439 -	this.findPosY = function(fobj) {
  10.440 -		if (typeof(fobj) != 'object') { return 0; }
  10.441 -		if (navigator.appName == 'Microsoft Internet Explorer' || navigator.appName == 'Opera' || navigator.appName == 'Netscape') {
  10.442 -			return fobj.offsetTop;
  10.443 -		}
  10.444 -		if (navigator.userAgent.indexOf('Chrome') > -1) {
  10.445 -			return fobj.offsetTop;
  10.446 -		}
  10.447 -		var curtop = 0;
  10.448 -		if(fobj.offsetParent)
  10.449 -		while(1) {
  10.450 -			  curtop += fobj.offsetTop;
  10.451 -			  if(!fobj.offsetParent)
  10.452 -			  break;
  10.453 -			  fobj = fobj.offsetParent;
  10.454 -		}
  10.455 -		else if(fobj.y)
  10.456 -		curtop += fobj.y;
  10.457 -		return curtop;
  10.458 -	}
  10.459 -}
  10.460 -var tplf = new xcp_Functions();
  10.461 -document.onmousedown = xcp_menu.mousedown;
  10.462 \ No newline at end of file
    11.1 --- a/interface/tabs.css	Tue Jun 15 00:35:25 2010 +0300
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,105 +0,0 @@
    11.4 -table.tabs {
    11.5 -	height:24px;
    11.6 -	padding:0;
    11.7 -	border:0;
    11.8 -}
    11.9 -table.tabs td {
   11.10 -	min-width:30px;
   11.11 -	border:0;
   11.12 -	padding:0;
   11.13 -	padding-top:0px;
   11.14 -	width:auto;
   11.15 -}
   11.16 -table.tabs td .tabBg {
   11.17 -	float:left;
   11.18 -	margin-top:5px;
   11.19 -	border:1px solid #867878;
   11.20 - 	min-width:30px;
   11.21 -	font-size:12px;
   11.22 -	border-right:0;
   11.23 -	height:15px;
   11.24 -	padding:0;
   11.25 -	padding-top:3px;
   11.26 -	padding-left:5px;
   11.27 -	padding-right:5px;
   11.28 -	background-color:#EEEAEB;
   11.29 -	background-image:url('img/tabs/unactive-gradient.jpg');
   11.30 -	background-repeat:repeat-x;
   11.31 -	background-position:left top;
   11.32 -	color:#8B7F7F;
   11.33 -	border-left:1px solid #000000;
   11.34 -	overflow:hidden;
   11.35 -	position:relative;
   11.36 -}
   11.37 -table.tabs td .tabBg span.tabClose {
   11.38 -	position:absolute;
   11.39 -	top:0px;
   11.40 -	right:0px;
   11.41 -	display:none;
   11.42 -}
   11.43 -table.tabs td .tabBg:hover  span.tabClose {
   11.44 -	display:block;
   11.45 -	position:absolute;
   11.46 -	top:0px;
   11.47 -	right:0px;
   11.48 -}
   11.49 -table.tabs td .tabBg a {
   11.50 -	height:100%;
   11.51 -	text-decoration:none;
   11.52 -	cursor:pointer;
   11.53 -}
   11.54 -table.tabs td.activeTab {
   11.55 -	background-image:url('img/tabs/border.png');
   11.56 -	background-repeat:no-repeat;
   11.57 -	background-position:bottom right;
   11.58 -	padding-right:4px;
   11.59 -}
   11.60 -table.tabs td.activeTab .tabBg {
   11.61 -	border:1px solid #867878;
   11.62 - 	min-width:30px;
   11.63 -	font-size:12px;
   11.64 -	height:16px;
   11.65 -	padding:0;
   11.66 -	padding-top:7px;
   11.67 -	padding-left:12px;
   11.68 -	padding-right:12px;
   11.69 -	font-weight:bold;
   11.70 -	background-color:#f3f3f3;
   11.71 -	background-image:url('img/tabs/active-gradient.jpg');
   11.72 -	background-repeat:repeat-x;
   11.73 -	background-position:left top;
   11.74 -	border-bottom:1px solid #f3f3f3;
   11.75 -	margin-top:0px;
   11.76 -	text-align:center;
   11.77 -	color:#4E4747;
   11.78 -	border-left:1px solid #000000;
   11.79 -}
   11.80 -table.tabs td.singleTab .active {
   11.81 -	padding-right:13px;
   11.82 -}
   11.83 -table.tabs td.singleTab:hover .tabBg {
   11.84 -	color: #5c5e5d;
   11.85 -	background-color:#EEEAEB;
   11.86 -	background-image:url('img/tabs/unactive-gradient-hover.jpg');
   11.87 -	background-repeat:repeat-x;
   11.88 -	background-position:left top;
   11.89 -}
   11.90 -.tabs .singleTab:last-child .tabBg {
   11.91 -	border-right:1px solid #867878;
   11.92 -}
   11.93 -.tabs .activeTab:first-child .tabBg {
   11.94 -	border-left:1px solid #867878;
   11.95 -}
   11.96 -.tabs .singleTab:first-child .tabBg {
   11.97 -	border-left:1px solid #867878;
   11.98 -}
   11.99 -.tabs div { cursor:pointer; }
  11.100 -.tabContent {
  11.101 -	border:1px solid #867878;
  11.102 -	background-color:#f3f3f3;
  11.103 -	min-width:400px;
  11.104 -	min-height:100px;
  11.105 -	height:auto;
  11.106 -	float:left;
  11.107 -	margin-top:-1px;
  11.108 -}
  11.109 \ No newline at end of file
    12.1 --- a/interface/tabs.js	Tue Jun 15 00:35:25 2010 +0300
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,56 +0,0 @@
    12.4 -function FileTabs() {
    12.5 -	var self = this;
    12.6 -	var tempTab = false;
    12.7 -	this.clear = function() { tempTab = true; }
    12.8 -	this.construct = function(tabId) {
    12.9 -		var tbl = document.createElement('TABLE');
   12.10 -		tbl.className = 'tabs';
   12.11 -		tbl.setAttribute('tabList','yes');
   12.12 -		tbl.setAttribute('id',tabId);
   12.13 -		tbl.setAttribute('cellpadding',0);
   12.14 -		tbl.setAttribute('cellspacing',0);
   12.15 -		tbl.insertRow(0);
   12.16 -		tempTab = tbl;
   12.17 -		return tempTab;
   12.18 -	}
   12.19 -	this.getTr = function(param) { return param ? param.rows[0] : false; }
   12.20 -	this.getDom = function() { return tempTab; }
   12.21 -	this.append = function(tabAlias,tabName,onclickEvent,temp) {
   12.22 -		if (!temp) { temp = tempTab; }
   12.23 -		var tr = self.getTr(temp);
   12.24 -		var cl = tr.insertCell(tr.cells.length);
   12.25 -		var div = document.createElement('DIV');
   12.26 -		div.className = 'tabBg';
   12.27 -		cl.appendChild(div);
   12.28 -		cl.setAttribute('nowrap','nowrap');
   12.29 -		cl.setAttribute('tabAlias',tabAlias);
   12.30 -		var a = document.createElement('A');
   12.31 -		a.onclick = function() {
   12.32 -			tabs.activate(this.parentNode.parentNode);
   12.33 -			onclickEvent();
   12.34 -		}
   12.35 -		a.appendChild(document.createTextNode(tabName));
   12.36 -		div.appendChild(a);
   12.37 -		tempTab = temp;
   12.38 -		return tempTab;
   12.39 -	}
   12.40 -	this.activate = function(param) {
   12.41 -		var tr = param;
   12.42 -		while (tr = tr.parentNode) {
   12.43 -			if (tr.tagName == 'TR') { break; }
   12.44 -		}
   12.45 -		for (var i=0,len=tr.cells.length;i<len;i++) { tr.cells[i].className = 'singleTab'; }
   12.46 -		param.className = 'activeTab';
   12.47 -	}
   12.48 -	this.activateByAlias = function(alias,temp) {
   12.49 -		if (!temp) { return false; }
   12.50 -		var tr = self.getTr(temp);
   12.51 -		for (var i=0,len=tr.cells.length;i<len;i++) {
   12.52 -			if (tr.cells[i].getAttribute('tabAlias') == alias) {
   12.53 -				tr.cells[i].className = 'activeTab';
   12.54 -			}
   12.55 -			else { tr.cells[i].className = 'singleTab'; }
   12.56 -		}
   12.57 -	}
   12.58 -}
   12.59 -var tabs = new FileTabs();
   12.60 \ No newline at end of file
    13.1 --- a/interface/tabs_tmpl.html	Tue Jun 15 00:35:25 2010 +0300
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,35 +0,0 @@
    13.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    13.5 -<html xmlns="http://www.w3.org/1999/xhtml">
    13.6 -<head>
    13.7 -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    13.8 -<title>XCP web interface tabs test</title>
    13.9 -<link href="tabs.css" rel="stylesheet" type="text/css" />
   13.10 -<script type="Text/JavaScript" Language="JavaScript" src="tabs.js"></script>
   13.11 -<script type="text/javascript" language="javascript">
   13.12 -function testTabs() {
   13.13 -	tabs.construct('testtab');
   13.14 -	tabs.append('name','name of the tab',function() { myFunc(1); });
   13.15 -	tabs.append('name2','name2 of the tab',function() { myFunc(2); });
   13.16 -	tabs.activateByAlias('name',tabs.getDom());
   13.17 -	document.getElementById('tabDiv').appendChild(tabs.getDom());
   13.18 -	var cnt = document.createElement('DIV');
   13.19 -	cnt.setAttribute('id','tabContent');
   13.20 -	cnt.className = 'tabContent';
   13.21 -	document.getElementById('tabDiv').appendChild(cnt);
   13.22 -	tabs.clear();
   13.23 -}
   13.24 -function myFunc(param) {
   13.25 -	document.getElementById('tabContent').innerHTML = param;
   13.26 -}
   13.27 -</script>
   13.28 -<style>
   13.29 -#tabDiv {
   13.30 -	width:auto;
   13.31 -	text-align:left;
   13.32 -}
   13.33 -</style>
   13.34 -</head>
   13.35 -<body onload="testTabs();">
   13.36 -<div id="tabDiv"></div>
   13.37 -</body>
   13.38 -</html>
   13.39 \ No newline at end of file