Commit f0db6c0b authored by Martin Urban's avatar Martin Urban
Browse files

File: Fix not declared variables in helper

parent 07bdb46e
......@@ -107,7 +107,8 @@ var FileBaseHelper = Class.extend({
var firstRowItem = $(".file-table-" + sortGlyphicons[item], ".files-table-first-row");
$("i.glyphicon", firstRowItem).attr("class", "").addClass("glyphicon glyphicon-sort");
// set buttons to unsorted
$("i.glyphicon", "#fastmenu-" + sortGlyphicons[item], sortMenu).attr("class", "").addClass("glyphicon glyphicon-sort");
$("i.glyphicon", "#fastmenu-" + sortGlyphicons[item], sortMenu).attr("class", "").addClass(
"glyphicon glyphicon-sort");
if ($("#fastmenu-" + sortGlyphicons[item], sortMenu).hasClass("active"))
$("#fastmenu-" + sortGlyphicons[item], sortMenu).removeClass("active")
}
......@@ -150,11 +151,17 @@ var FileBaseHelper = Class.extend({
glyphiconForSortItem: function(sortItem, pushedGlyphicon) {
// determine current sorting
if ((sortItem != "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort") || pushedGlyphicon.hasClass("glyphicon-sort-by-order-alt") || pushedGlyphicon.hasClass("glyphicon-sort-by-alphabet-alt")))
var reverse = undefined;
var newGlyphicon = undefined;
if ((sortItem != "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort") ||
pushedGlyphicon.hasClass("glyphicon-sort-by-order-alt") || pushedGlyphicon.hasClass(
"glyphicon-sort-by-alphabet-alt")))
reverse = false;
else if ((sortItem != "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort-by-order") || pushedGlyphicon.hasClass("glyphicon-sort-by-alphabet")))
else if ((sortItem != "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort-by-order") ||
pushedGlyphicon.hasClass("glyphicon-sort-by-alphabet")))
reverse = true;
else if ((sortItem == "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort") || pushedGlyphicon.hasClass("glyphicon-sort-by-order")))
else if ((sortItem == "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort") ||
pushedGlyphicon.hasClass("glyphicon-sort-by-order")))
reverse = false;
if ((sortItem == "last-changed") && (pushedGlyphicon.hasClass("glyphicon-sort-by-order-alt")))
reverse = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment