Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 256c879b

Von Moritz Bunkus vor etwa 16 Jahren hinzugefügt

  • ID 256c879b9614b9e0c7254e448fda6805da743db8
  • Vorgänger 0f7124b3
  • Nachfolger 1a0025cb

Update des DHTML-Tab-Scripts auf Version 2.2.

Unterschiede anzeigen:

SL/Form.pm
617 617

  
618 618
  <meta name="robots" content="noindex,nofollow" />
619 619
  <script type="text/javascript" src="js/highlight_input.js"></script>
620
  <link rel="stylesheet" type="text/css" href="css/tabcontent.css" />
621 620

  
621
  <link rel="stylesheet" type="text/css" href="css/tabcontent.css" />
622 622
  <script type="text/javascript" src="js/tabcontent.js">
623 623

  
624 624
  /***********************************************
625
  * Tab Content script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
626
  * This notice MUST stay intact for legal use
627
  * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
628
  ***********************************************/
625
   * Tab Content script v2.2- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
626
   * This notice MUST stay intact for legal use
627
   * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
628
   ***********************************************/
629 629

  
630 630
  </script>
631 631

  
css/tabcontent.css
1
.shadetabs{
2
padding: 3px 0;
3
margin-left: 0;
4
margin-top: 1px;
5
margin-bottom: 0;
6
font: bold 12px Verdana;
7
list-style-type: none;
8
text-align: left; /*set to left, center, or right to align the menu as desired*/
9
}
10

  
11
.shadetabs li{
12
display: inline;
13
margin: 0;
14
}
15

  
16
.shadetabs li a{
17
text-decoration: none;
18
padding: 3px 7px;
19
margin-right: 3px;
20
border: 1px solid #778;
21
color: #2d2b2b;
22
background: white url(shade.gif) top left repeat-x;
23
}
24

  
25
.shadetabs li a:visited{
26
color: #2d2b2b;
27
}
28

  
29
.shadetabs li a:hover{
30
text-decoration: underline;
31
color: #2d2b2b;
32
}
33

  
34
.shadetabs li.selected{
35
position: relative;
36
top: 1px;
37
}
38

  
39
.shadetabs li.selected a{ /*selected main tab style */
40
background-image: url(shadeactive.gif);
41
border-bottom-color: white;
42
}
43

  
44
.shadetabs li.selected a:hover{ /*selected main tab style */
45
text-decoration: none;
46
}
47

  
48
.tabcontentstyle{ /*style of tab content oontainer*/
49
border: 1px solid gray;
50
width: 90%;
51
margin-bottom: 1em;
52
padding: 10px;
53
}
54

  
55
.tabcontent{
56
display:none;
57
}
58

  
59
@media print {
60
.tabcontent {
61
display:block!important;
62
}
1
/* ######### CSS for Shade Tabs. Remove if not using ######### */
2

  
3
.shadetabs{
4
padding: 3px 0;
5
margin-left: 0;
6
margin-top: 1px;
7
margin-bottom: 0;
8
font: bold 12px Verdana;
9
list-style-type: none;
10
text-align: left; /*set to left, center, or right to align the menu as desired*/
11
}
12

  
13
.shadetabs li{
14
display: inline;
15
margin: 0;
16
}
17

  
18
.shadetabs li a{
19
text-decoration: none;
20
position: relative;
21
z-index: 1;
22
padding: 3px 7px;
23
margin-right: 3px;
24
border: 1px solid #778;
25
color: #2d2b2b;
26
background: white url(../image/shade.gif) top left repeat-x;
27
}
28

  
29
.shadetabs li a:visited{
30
color: #2d2b2b;
31
}
32

  
33
.shadetabs li a:hover{
34
text-decoration: underline;
35
color: #2d2b2b;
36
}
37

  
38
.shadetabs li a.selected{ /*selected main tab style */
39
position: relative;
40
top: 1px;
41
}
42

  
43
.shadetabs li a.selected{ /*selected main tab style */
44
background-image: url(../image/shadeactive.gif);
45
border-bottom-color: white;
46
}
47

  
48
.shadetabs li a.selected:hover{ /*selected main tab style */
49
text-decoration: none;
50
}
51

  
52
.tabcontent{
53
display:none;
54
}
55

  
56
@media print {
57
.tabcontent {
58
display:block !important;
59
}
60
}
61

  
62
/* ######### CSS for Inverted Modern Bricks II Tabs. Remove if not using ######### */
63

  
64
.modernbricksmenu2{
65
padding: 0;
66
width: 362px;
67
border-top: 5px solid #D25A0B; /*Brown color theme*/ 
68
background: transparent;
69
voice-family: "\"}\"";
70
voice-family: inherit;
71
}
72

  
73
.modernbricksmenu2 ul{
74
margin:0;
75
margin-left: 10px; /*margin between first menu item and left browser edge*/
76
padding: 0;
77
list-style: none;
78
}
79

  
80
.modernbricksmenu2 li{
81
display: inline;
82
margin: 0 2px 0 0;
83
padding: 0;
84
text-transform:uppercase;
85
}
86

  
87
.modernbricksmenu2 a{
88
float: left;
89
display: block;
90
font: bold 11px Arial;
91
color: white;
92
text-decoration: none;
93
margin: 0 1px 0 0; /*Margin between each menu item*/
94
padding: 5px 10px;
95
background-color: black; /*Brown color theme*/ 
96
border-top: 1px solid white;
97
}
98

  
99
.modernbricksmenu2 a:hover{
100
background-color: #D25A0B; /*Brown color theme*/ 
101
color: white;
102
}
103

  
104
.modernbricksmenu2 a.selected{ /*currently selected tab*/
105
background-color: #D25A0B; /*Brown color theme*/ 
106
color: white;
107
border-color: #D25A0B; /*Brown color theme*/ 
108
}
109

  
110
.tabcontent{
111
display:none;
112
}
113

  
114
@media print {
115
.tabcontent {
116
display:block !important;
117
}
118
}
119

  
120
/* ######### CSS for Indented CSS Tabs. Remove if not using ######### */
121

  
122

  
123
.indentmenu{
124
font: bold 13px Arial;
125
width: 100%; /*leave this value as is in most cases*/
126
}
127

  
128
.indentmenu ul{
129
margin: 0;
130
padding: 0;
131
float: left;
132
/* width: 80%; width of menu*/
133
border-top: 1px solid navy; /*navy border*/
134
background: black url(../image/indentbg.gif) center center repeat-x;
135
}
136

  
137
.indentmenu ul li{
138
display: inline;
139
}
140

  
141
.indentmenu ul li a{
142
float: left;
143
color: white; /*text color*/
144
padding: 5px 11px;
145
text-decoration: none;
146
border-right: 1px solid navy; /*navy divider between menu items*/
147
}
148

  
149
.indentmenu ul li a:visited{
150
color: white;
151
}
152

  
153
.indentmenu ul li a.selected{
154
color: white !important;
155
padding-top: 6px; /*shift text down 1px*/
156
padding-bottom: 4px;
157
background: black url(../image/indentbg2.gif) center center repeat-x;
158
}
159

  
160

  
161
.tabcontentstyle{ /*style of tab content oontainer*/
162
border: 1px solid gray;
163
width: 95%;
164
margin-bottom: 1em;
165
padding: 10px;
166
}
167

  
168
.tabcontent{
169
display:none;
170
}
171

  
172
@media print {
173
.tabcontent {
174
display:block !important;
175
}
63 176
}
js/tabcontent.js
1
//** Tab Content script- ? Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
2
//** Last updated: June 29th, 06
3

  
4
var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered?
1
//** Tab Content script v2.0- ? Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
2
//** Updated Oct 7th, 07 to version 2.0. Contains numerous improvements:
3
//   -Added Auto Mode: Script auto rotates the tabs based on an interval, until a tab is explicitly selected
4
//   -Ability to expand/contract arbitrary DIVs on the page as the tabbed content is expanded/ contracted
5
//   -Ability to dynamically select a tab either based on its position within its peers, or its ID attribute (give the target tab one 1st)
6
//   -Ability to set where the CSS classname "selected" get assigned- either to the target tab's link ("A"), or its parent container
7
//** Updated Feb 18th, 08 to version 2.1: Adds a "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically
8
//** Updated April 8th, 08 to version 2.2: Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0) 
5 9

  
6 10
////NO NEED TO EDIT BELOW////////////////////////
7
var tabcontentIDs=new Object()
8

  
9
function expandcontent(linkobj){
10
var ulid=linkobj.parentNode.parentNode.id //id of UL element
11
var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
12
for (var i=0; i<ullist.length; i++){
13
ullist[i].className=""  //deselect all tabs
14
if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)
15
document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
16
}
17
linkobj.parentNode.className="selected"  //highlight currently clicked on tab
18
document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content
19
saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
20
}
21 11

  
22
function savetabcontentids(ulid, relattribute){// save ids of tab content divs
23
if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
24
tabcontentIDs[ulid]=new Array()
25
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
12
function ddtabcontent(tabinterfaceid){
13
	this.tabinterfaceid=tabinterfaceid //ID of Tab Menu main container
14
	this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container
15
	this.enabletabpersistence=true
16
	this.hottabspositions=[] //Array to store position of tabs that have a "rel" attr defined, relative to all tab links, within container
17
	this.currentTabIndex=0 //Index of currently selected hot tab (tab with sub content) within hottabspositions[] array
18
	this.subcontentids=[] //Array to store ids of the sub contents ("rel" attr values)
19
	this.revcontentids=[] //Array to store ids of arbitrary contents to expand/contact as well ("rev" attr values)
20
	this.selectedClassTarget="link" //keyword to indicate which target element to assign "selected" CSS class ("linkparent" or "link")
26 21
}
27 22

  
28
function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
29
if (enabletabpersistence==1) //if persistence feature turned on
30
setCookie(ulid, selectedtabid)
23
ddtabcontent.getCookie=function(Name){ 
24
	var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
25
	if (document.cookie.match(re)) //if cookie found
26
		return document.cookie.match(re)[0].split("=")[1] //return its value
27
	return ""
31 28
}
32 29

  
33
function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
34
var ullist=document.getElementById(ulid).getElementsByTagName("li")
35
for (var i=0; i<ullist.length; i++){
36
if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
37
return ullist[i].getElementsByTagName("a")[0]
38
break
39
}
40
}
30
ddtabcontent.setCookie=function(name, value){
31
	document.cookie = name+"="+value+";path=/" //cookie value is domain wide (path=/)
41 32
}
42 33

  
43
function initializetabcontent(){
44
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
45
if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off
46
setCookie(arguments[i], "")
47
var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any
48
var ulobj=document.getElementById(arguments[i])
49
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
50
for (var x=0; x<ulist.length; x++){ //loop through each LI element
51
var ulistlink=ulist[x].getElementsByTagName("a")[0]
52
if (ulistlink.getAttribute("rel")){
53
savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs
54
ulistlink.onclick=function(){
55
expandcontent(this)
56
return false
57
}
58
if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default
59
expandcontent(ulistlink) //auto load currenly selected tab content
60
}
61
} //end inner for loop
62
if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value
63
var culistlink=getullistlinkbyId(arguments[i], clickedontab)
64
if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value
65
expandcontent(culistlink) //auto load currenly selected tab content
66
else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)
67
expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead
68
}
69
} //end outer for loop
70
}
34
ddtabcontent.prototype={
71 35

  
36
	expandit:function(tabid_or_position){ //PUBLIC function to select a tab either by its ID or position(int) within its peers
37
		this.cancelautorun() //stop auto cycling of tabs (if running)
38
		var tabref=""
39
		try{
40
			if (typeof tabid_or_position=="string" && document.getElementById(tabid_or_position).getAttribute("rel")) //if specified tab contains "rel" attr
41
				tabref=document.getElementById(tabid_or_position)
42
			else if (parseInt(tabid_or_position)!=NaN && this.tabs[tabid_or_position].getAttribute("rel")) //if specified tab contains "rel" attr
43
				tabref=this.tabs[tabid_or_position]
44
		}
45
		catch(err){alert("Invalid Tab ID or position entered!")}
46
		if (tabref!="") //if a valid tab is found based on function parameter
47
			this.expandtab(tabref) //expand this tab
48
	},
72 49

  
73
function getCookie(Name){ 
74
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
75
if (document.cookie.match(re)) //if cookie found
76
return document.cookie.match(re)[0].split("=")[1] //return its value
77
return ""
78
}
50
	cycleit:function(dir, autorun){ //PUBLIC function to move foward or backwards through each hot tab (tabinstance.cycleit('foward/back') )
51
		if (dir=="next"){
52
			var currentTabIndex=(this.currentTabIndex<this.hottabspositions.length-1)? this.currentTabIndex+1 : 0
53
		}
54
		else if (dir=="prev"){
55
			var currentTabIndex=(this.currentTabIndex>0)? this.currentTabIndex-1 : this.hottabspositions.length-1
56
		}
57
		if (typeof autorun=="undefined") //if cycleit() is being called by user, versus autorun() function
58
			this.cancelautorun() //stop auto cycling of tabs (if running)
59
		this.expandtab(this.tabs[this.hottabspositions[currentTabIndex]])
60
	},
61

  
62
	setpersist:function(bool){ //PUBLIC function to toggle persistence feature
63
			this.enabletabpersistence=bool
64
	},
65

  
66
	setselectedClassTarget:function(objstr){ //PUBLIC function to set which target element to assign "selected" CSS class ("linkparent" or "link")
67
		this.selectedClassTarget=objstr || "link"
68
	},
69

  
70
	getselectedClassTarget:function(tabref){ //Returns target element to assign "selected" CSS class to
71
		return (this.selectedClassTarget==("linkparent".toLowerCase()))? tabref.parentNode : tabref
72
	},
73

  
74
	urlparamselect:function(tabinterfaceid){
75
		var result=window.location.search.match(new RegExp(tabinterfaceid+"=(\\d+)", "i")) //check for "?tabinterfaceid=2" in URL
76
		return (result==null)? null : parseInt(RegExp.$1) //returns null or index, where index (int) is the selected tab's index
77
	},
78

  
79
	expandtab:function(tabref){
80
		var subcontentid=tabref.getAttribute("rel") //Get id of subcontent to expand
81
		//Get "rev" attr as a string of IDs in the format ",john,george,trey,etc," to easily search through
82
		var associatedrevids=(tabref.getAttribute("rev"))? ","+tabref.getAttribute("rev").replace(/\s+/, "")+"," : ""
83
		this.expandsubcontent(subcontentid)
84
		this.expandrevcontent(associatedrevids)
85
		for (var i=0; i<this.tabs.length; i++){ //Loop through all tabs, and assign only the selected tab the CSS class "selected"
86
			this.getselectedClassTarget(this.tabs[i]).className=(this.tabs[i].getAttribute("rel")==subcontentid)? "selected" : ""
87
		}
88
		if (this.enabletabpersistence) //if persistence enabled, save selected tab position(int) relative to its peers
89
			ddtabcontent.setCookie(this.tabinterfaceid, tabref.tabposition)
90
		this.setcurrenttabindex(tabref.tabposition) //remember position of selected tab within hottabspositions[] array
91
	},
92

  
93
	expandsubcontent:function(subcontentid){
94
		for (var i=0; i<this.subcontentids.length; i++){
95
			var subcontent=document.getElementById(this.subcontentids[i]) //cache current subcontent obj (in for loop)
96
			subcontent.style.display=(subcontent.id==subcontentid)? "block" : "none" //"show" or hide sub content based on matching id attr value
97
		}
98
	},
99

  
100
	expandrevcontent:function(associatedrevids){
101
		var allrevids=this.revcontentids
102
		for (var i=0; i<allrevids.length; i++){ //Loop through rev attributes for all tabs in this tab interface
103
			//if any values stored within associatedrevids matches one within allrevids, expand that DIV, otherwise, contract it
104
			document.getElementById(allrevids[i]).style.display=(associatedrevids.indexOf(","+allrevids[i]+",")!=-1)? "block" : "none"
105
		}
106
	},
107

  
108
	setcurrenttabindex:function(tabposition){ //store current position of tab (within hottabspositions[] array)
109
		for (var i=0; i<this.hottabspositions.length; i++){
110
			if (tabposition==this.hottabspositions[i]){
111
				this.currentTabIndex=i
112
				break
113
			}
114
		}
115
	},
116

  
117
	autorun:function(){ //function to auto cycle through and select tabs based on a set interval
118
		this.cycleit('next', true)
119
	},
120

  
121
	cancelautorun:function(){
122
		if (typeof this.autoruntimer!="undefined")
123
			clearInterval(this.autoruntimer)
124
	},
125

  
126
	init:function(automodeperiod){
127
		var persistedtab=ddtabcontent.getCookie(this.tabinterfaceid) //get position of persisted tab (applicable if persistence is enabled)
128
		var selectedtab=-1 //Currently selected tab index (-1 meaning none)
129
		var selectedtabfromurl=this.urlparamselect(this.tabinterfaceid) //returns null or index from: tabcontent.htm?tabinterfaceid=index
130
		this.automodeperiod=automodeperiod || 0
131
		for (var i=0; i<this.tabs.length; i++){
132
			this.tabs[i].tabposition=i //remember position of tab relative to its peers
133
			if (this.tabs[i].getAttribute("rel")){
134
				var tabinstance=this
135
				this.hottabspositions[this.hottabspositions.length]=i //store position of "hot" tab ("rel" attr defined) relative to its peers
136
				this.subcontentids[this.subcontentids.length]=this.tabs[i].getAttribute("rel") //store id of sub content ("rel" attr value)
137
				this.tabs[i].onclick=function(){
138
					tabinstance.expandtab(this)
139
					tabinstance.cancelautorun() //stop auto cycling of tabs (if running)
140
					return false
141
				}
142
				if (this.tabs[i].getAttribute("rev")){ //if "rev" attr defined, store each value within "rev" as an array element
143
					this.revcontentids=this.revcontentids.concat(this.tabs[i].getAttribute("rev").split(/\s*,\s*/))
144
				}
145
				if (selectedtabfromurl==i || this.enabletabpersistence && selectedtab==-1 && parseInt(persistedtab)==i || !this.enabletabpersistence && selectedtab==-1 && this.getselectedClassTarget(this.tabs[i]).className=="selected"){
146
					selectedtab=i //Selected tab index, if found
147
				}
148
			}
149
		} //END for loop
150
		if (selectedtab!=-1) //if a valid default selected tab index is found
151
			this.expandtab(this.tabs[selectedtab]) //expand selected tab (either from URL parameter, persistent feature, or class="selected" class)
152
		else //if no valid default selected index found
153
			this.expandtab(this.tabs[this.hottabspositions[0]]) //Just select first tab that contains a "rel" attr
154
		if (parseInt(this.automodeperiod)>500 && this.hottabspositions.length>1){
155
			this.autoruntimer=setInterval(function(){tabinstance.autorun()}, this.automodeperiod)
156
		}
157
	} //END int() function
79 158

  
80
function setCookie(name, value){
81
document.cookie = name+"="+value //cookie value is domain wide (path=/)
82
}
159
} //END Prototype assignment
templates/webpages/ct/form_footer_de.html
33 33

  
34 34
 <script type="text/javascript">
35 35
  <!--
36
      //Start Tab Content script for UL with id="maintab".
37
      initializetabcontent("maintab");
36
      Calendar.setup({ inputField : "fromB",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_from" });
37
      Calendar.setup({ inputField : "toB",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
38
      Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
39

  
40
      function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
41
      function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
42

  
43
      var maintab = new ddtabcontent("maintab");
44
      maintab.setpersist(true);
45
      maintab.setselectedClassTarget("link"); //"link" or "linkparent"
46
      maintab.init();
47

  
38 48
    -->
39 49
 </script>
40 50
</body>
templates/webpages/ct/form_footer_master.html
33 33

  
34 34
 <script type="text/javascript">
35 35
  <!--
36
      //Start Tab Content script for UL with id="maintab".
37
      initializetabcontent("maintab");
36
      Calendar.setup({ inputField : "fromB",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_from" });
37
      Calendar.setup({ inputField : "toB",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
38
      Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
39

  
40
      function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
41
      function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
42

  
43
      var maintab = new ddtabcontent("maintab");
44
      maintab.setpersist(true);
45
      maintab.setselectedClassTarget("link"); //"link" or "linkparent"
46
      maintab.init();
47

  
38 48
    -->
39 49
 </script>
40 50
</body>
templates/webpages/ct/form_header_de.html
588 588
   [%- END %]
589 589

  
590 590
  </div>
591

  
592
  <script type="text/javascript">
593
   <!--
594
       Calendar.setup({ inputField : "fromB",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_from" });
595
       Calendar.setup({ inputField : "toB",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
596
       Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
597
       //-->
598

  
599
   function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
600
   function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
601
  </script>
templates/webpages/ct/form_header_master.html
588 588
   [%- END %]
589 589

  
590 590
  </div>
591

  
592
  <script type="text/javascript">
593
   <!--
594
       Calendar.setup({ inputField : "fromB",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_from" });
595
       Calendar.setup({ inputField : "toB",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger_to" });
596
       Calendar.setup({ inputField : "FU_date", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BR", button : "FU_date_trigger" });
597
       //-->
598

  
599
   function enable_delete_shipto(used) { var s=document.getElementById('delete_shipto');  if (s) s.disabled = (used > 0 ? true : false); }
600
   function enable_delete_contact(used){ var s=document.getElementById('delete_contact'); if (s) s.disabled = (used > 0 ? true : false); }
601
  </script>

Auch abrufbar als: Unified diff