Bug 129375 cd /home/akrasilnikov/web_root/bug3/trunk/js
git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1792 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
5af8b603ed
commit
8c0e2adf1c
17
js/bug.js
17
js/bug.js
|
@ -327,8 +327,15 @@ function search_filter_click(e, el)
|
||||||
var field_name = field_id.substr(12);
|
var field_name = field_id.substr(12);
|
||||||
var field_current_value = document.getElementById(field_name).value;
|
var field_current_value = document.getElementById(field_name).value;
|
||||||
if (field_current_value == '')
|
if (field_current_value == '')
|
||||||
|
{
|
||||||
|
if (preventDefault && e.preventDefault)
|
||||||
{
|
{
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
alert('Field must be filled!');
|
alert('Field must be filled!');
|
||||||
}
|
}
|
||||||
var href_parts = href.split('&' + field_name + '=');
|
var href_parts = href.split('&' + field_name + '=');
|
||||||
|
@ -336,7 +343,7 @@ function search_filter_click(e, el)
|
||||||
el.href = new_href;
|
el.href = new_href;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
addListener(window, 'load', function() {
|
||||||
if (document.getElementById('form_bug_edit'))
|
if (document.getElementById('form_bug_edit'))
|
||||||
{
|
{
|
||||||
var testCl = new RegExp("\\bsearch-link\\b");
|
var testCl = new RegExp("\\bsearch-link\\b");
|
||||||
|
@ -345,10 +352,14 @@ window.onload = function() {
|
||||||
var length = all.length;
|
var length = all.length;
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
if (testCl.test(all[i].className)) {
|
if (testCl.test(all[i].className)) {
|
||||||
(function(i) { addListener(all[i], 'click', function (e) { return search_filter_click(e, all[i]); }); })(i);
|
(function(i) {
|
||||||
|
addListener(i, 'click', function (e) {
|
||||||
|
return search_filter_click(e, i);
|
||||||
|
});
|
||||||
|
})(all[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue