Skip to content

Commit

Permalink
users - added FIXME notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladislav Slezak committed Dec 6, 2012
1 parent e3073d4 commit 99b4014
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/users/app/assets/javascripts/webyast-users.js
Expand Up @@ -26,7 +26,7 @@ function _trim(word){
return word.replace(/^\s*|\s*$/g,'');
}

// WTF? FIXME: use standard jQuery selectors for this
// WTF? FIXME: use standard jQuery selectors for this!
function _getElementsByClassName(node, classname) {
if(!node) node = document.getElementsByTagName("body")[0];
var a = [];
Expand Down Expand Up @@ -116,7 +116,7 @@ function groups_validation(which){
}
}
set_tab_focus("groups")
// WTF? use jQuery here!
// WTF? FIXME: use jQuery here!
var error = findById(which.parentNode.parentNode.parentNode.getElementsByTagName('label'), "groups-error");
error.innerHTML = errmsg;
error.style.display= (errmsg.length==0) ? "none" : "block";
Expand All @@ -140,15 +140,15 @@ function def_group_validation(which){
}

set_tab_focus("groups")
// WTF? use jQuery here!
// WTF? FIXME: use jQuery here!
var error = findById(which.parentNode.parentNode.parentNode.getElementsByTagName('label'), "def-group-error");
error.innerHTML = errmsg;
error.style.display= (errmsg.length==0) ? "none" : "block";
return (errmsg.length==0);
}

function roles_validation(which){
// WTF? use jQuery here!
// WTF? FIXME: use jQuery here!
var myroles = _trim(findById(which.parentNode.getElementsByTagName('input'), "user_roles_string").value);
if (myroles.length>0) myroles = myroles.split(",");
var allroles = $("#all_roles_string")[0].value.split(",");
Expand All @@ -164,7 +164,7 @@ function roles_validation(which){
}
}
set_tab_focus("roles")
// WTF? use jQuery here!
// WTF? FIXME: use jQuery here!
var error = findById(which.parentNode.parentNode.parentNode.getElementsByTagName('label'), "roles-error");
error.innerHTML = errmsg;
error.style.display= (errmsg.length==0) ? "none" : "block";
Expand Down

0 comments on commit 99b4014

Please sign in to comment.