Subversion Repositories DevTools

Rev

Rev 6612 | Rev 6785 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6612 Rev 6613
Line 114... Line 114...
114
    {
114
    {
115
        divel.style.display = 'none';
115
        divel.style.display = 'none';
116
    }
116
    }
117
}
117
}
118
 
118
 
119
//
-
 
120
//	Load/Hide/Show an Ajax expander
-
 
121
//	BaseId - Base for two IDs.
-
 
122
//			 IMG_BaseId - image to to toggle
-
 
123
//			 BaseId - Div to load data into
-
 
124
//	url - Url used to load subcontrol
-
 
125
function ToggleUsedByControl(baseId, url)
-
 
126
{
-
 
127
	var img, dmode;
-
 
128
	var imgel = MM_findObj("IMG_" + baseId);
-
 
129
	var divel = MM_findObj(baseId);
-
 
130
	var showing = divel.getAttribute("data-show");
-
 
131
	if(showing == 1)
-
 
132
	{
-
 
133
		img = "images/bt_minus.gif";
-
 
134
		dmode = 'block';
-
 
135
		showing = 2
-
 
136
	}
-
 
137
	else if(showing == 2)
-
 
138
	{
-
 
139
		img = "images/bt_plus.gif";
-
 
140
		dmode = 'none';
-
 
141
		showing = 1;
-
 
142
	}
-
 
143
	else
-
 
144
	{
-
 
145
		img = "images/bt_minus.gif";
-
 
146
		dmode = 'block';
-
 
147
		showing = 2;
-
 
148
 
-
 
149
		// Set div name for ajax loading
-
 
150
		ajaxdivname = baseId;
-
 
151
 
-
 
152
		//Create the xmlHttp object to use in the request
-
 
153
		//stateChangeHandler will fire when the state has changed, i.e. data is received back
-
 
154
		// This is non-blocking (asynchronous)
-
 
155
		xmlHttp = GetXmlHttpObject(stateChangeHandler);
-
 
156
 
-
 
157
		//Send the xmlHttp get to the specified url
-
 
158
		xmlHttp_Get(xmlHttp, url);
-
 
159
	}
-
 
160
	// Update image and attributes
-
 
161
	imgel.src = img;
-
 
162
	divel.style.display = dmode;
-
 
163
	divel.setAttribute("data-show", showing);
-
 
164
}
-
 
165
 
-
 
166
function matchValue(ename) {
119
function matchValue(ename) {
167
    var el
120
    var el
168
    el = document.getElementsByName(ename);
121
    el = document.getElementsByName(ename);
169
    if (el[0] && el[0].checked) return 1;
122
    if (el[0] && el[0].checked) return 1;
170
    return 0;
123
    return 0;