Skip to content

Commit

Permalink
NOJIRA - Fix the issues on the previous pull request https://github.c…
Browse files Browse the repository at this point in the history
  • Loading branch information
christianvuerings committed Dec 16, 2011
1 parent b6c7b8e commit a16241a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
5 changes: 0 additions & 5 deletions dev/javascript/search_sakai2.js
Expand Up @@ -185,11 +185,6 @@ require(["jquery","sakai/sakai.api.core"], function($, sakai) {
*/
sakai_global._search.doSearch = function(page, searchquery, searchwhere, facet) {

//debug.log(page);
//debug.log(searchquery);
//debug.log(searchwhere);
//debug.log(facet);

// if there is facet selected then remove previous one and highlight new one
if (facet) {
$(".faceted_category").removeClass("faceted_category_selected");
Expand Down
4 changes: 2 additions & 2 deletions devwidgets/addarea/javascript/addarea.js
Expand Up @@ -773,7 +773,7 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai){
url = "/var/search/pool/all-all.0.json";
}

if(library){
if (library) {
json["userid"] = sakai.data.me.user.userid;
url = "/var/search/pool/manager-viewer.json";
}
Expand All @@ -797,7 +797,7 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai){
}
var container = "#addarea_existing_everywhere_bottom";
var context = "everywhere";
if (library){
if (library) {
container = "#addarea_existing_mylibrary_bottom";
context = "my_library";
}
Expand Down
2 changes: 1 addition & 1 deletion devwidgets/mymemberships/javascript/mymemberships.js
Expand Up @@ -400,7 +400,7 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
var itemdiv = $(this);
sakai.api.Groups.addJoinRequest(groupid, function (success) {
if (success) {
var notimsg;
var notimsg = "";
if (joinable === "withauth") {
// Don't add green tick yet because they need to be approved.
notimsg = sakai.api.i18n.getValueForKey("YOUR_REQUEST_HAS_BEEN_SENT");
Expand Down
2 changes: 1 addition & 1 deletion devwidgets/sakai2tools/javascript/sakai2tools.js
Expand Up @@ -497,7 +497,7 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
for (var i = 0; i < data.toolList.length; i++) {
// Our i18n keys for the tools are formatted as: sakai.announcements -> CLE_SAKAI_ANNOUNCEMENTS
var key = "CLE_" + data.toolList[i].replace(/\./g,"_").toUpperCase();
var toolname;
var toolname = "";
if (sakai.config.sakai2ToolNames && sakai.config.sakai2ToolNames[data.toolList[i]]) {
toolname = sakai.config.sakai2ToolNames[data.toolList[i]];
}
Expand Down
24 changes: 11 additions & 13 deletions devwidgets/topnavigation/javascript/topnavigation.js
Expand Up @@ -583,16 +583,15 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {

// bind down/left/right keys for top menu
$("#topnavigation_container .s3d-dropdown-menu,.topnavigation_counts_container button").keydown(function(e) {
var $focusElement;
if (e.which === $.ui.keyCode.DOWN && $(this).hasClass("hassubnav")) {
$(this).find("div a:first").focus();
var $focusElement = $(this);
if (e.which === $.ui.keyCode.DOWN && $focusElement.hasClass("hassubnav")) {
$focusElement.find("div a:first").focus();
return false; // prevent browser page from scrolling down
} else if (e.which === $.ui.keyCode.LEFT || (e.which === $.ui.keyCode.TAB && shiftDown) && $(this).attr("id") !== "topnavigation_user_options_login_wrapper") {
} else if (e.which === $.ui.keyCode.LEFT || (e.which === $.ui.keyCode.TAB && shiftDown) && $focusElement.attr("id") !== "topnavigation_user_options_login_wrapper") {
closeMenu();
closePopover();
$focusElement = $(this);
if($(this).parents(".topnavigation_counts_container").length){
$focusElement = $(this).parents(".topnavigation_counts_container");
if($focusElement.parents(".topnavigation_counts_container").length){
$focusElement = $focusElement.parents(".topnavigation_counts_container");
}
if($focusElement.prev(".topnavigation_counts_container").length){
$focusElement.prev(".topnavigation_counts_container").children("button").focus();
Expand All @@ -602,12 +601,11 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
$focusElement.nextAll("li:last").children("a").focus();
}
return false;
} else if ((e.which === $.ui.keyCode.RIGHT || e.which === $.ui.keyCode.TAB) && $(this).attr("id") !== "topnavigation_user_options_login_wrapper") {
} else if ((e.which === $.ui.keyCode.RIGHT || e.which === $.ui.keyCode.TAB) && $focusElement.attr("id") !== "topnavigation_user_options_login_wrapper") {
closeMenu();
closePopover();
$focusElement = $(this);
if($(this).parents(".topnavigation_counts_container").length){
$focusElement = $(this).parents(".topnavigation_counts_container");
if($focusElement.parents(".topnavigation_counts_container").length){
$focusElement = $focusElement.parents(".topnavigation_counts_container");
}
if($focusElement.next(".topnavigation_counts_container").length){
$focusElement.next(".topnavigation_counts_container").children("button").focus();
Expand All @@ -617,10 +615,10 @@ require(["jquery", "sakai/sakai.api.core"], function($, sakai) {
$("#topnavigation_search_input").focus();
}
return false;
} else if ($(this).hasClass("hassubnav") && $(this).children("a").is(":focus")) {
} else if ($focusElement.hasClass("hassubnav") && $focusElement.children("a").is(":focus")) {
// if a letter was pressed, search for the first menu item that starts with the letter
var keyPressed = String.fromCharCode(e.which).toLowerCase();
$(this).find("ul:first").children().each(function(index, item){
$focusElement.find("ul:first").children().each(function(index, item){
var firstChar = $.trim($(item).text()).toLowerCase().substr(0, 1);
if (keyPressed === firstChar){
$(item).find("a").focus();
Expand Down

0 comments on commit a16241a

Please sign in to comment.