Skip to content

Commit

Permalink
Merge branch 'release/1.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
amalloy committed Sep 25, 2011
2 parents 08aa61f + 649c55d commit 5383458
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject foreclojure "1.3.2"
(defproject foreclojure "1.3.3"
:description "4clojure - a website for lisp beginners"
:dependencies [[clojure "1.2.1"]
[clojure-contrib "1.2.0"]
Expand Down
18 changes: 16 additions & 2 deletions resources/public/script/foreclojure.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,29 @@ $(document).ready(function() {

});

var difficulty = new Array();
difficulty["Elementary"] = 0;
difficulty["Easy"] = 1;
difficulty["Medium"] = 2;
difficulty["Hard"] = 3;
difficulty[""] = 4;

jQuery.fn.dataTableExt.oSort['difficulty-asc'] = function(a, b) {
return difficulty[a] - difficulty[b];
};

jQuery.fn.dataTableExt.oSort['difficulty-desc'] = function(a, b) {
return difficulty[b] - difficulty[a];
};

function configureDataTables(){

$('#problem-table').dataTable( {
"iDisplayLength": 25,
"aaSorting": [[ 4, "desc" ]],
"aaSorting": [[5, "desc"], [ 1, "asc" ], [ 4, "desc" ]],
"aoColumns": [
null,
null,
{ "sType": "difficulty" },
null,
null,
null,
Expand Down

0 comments on commit 5383458

Please sign in to comment.