summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/projects.js
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-12 23:52:27 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-12 23:52:27 +0200
commitece9f50fb1076c1efee54b4ab3b161f2cac70046 (patch)
tree1e4073f7dad6890e9de48a187dca315d25fe5da7 /app/assets/javascripts/projects.js
parent48bc4fc214934160af39958c70f3adb6d7e00b5a (diff)
downloadgitlab-ce-ece9f50fb1076c1efee54b4ab3b161f2cac70046.tar.gz
fixed unworking infinite scroll
Diffstat (limited to 'app/assets/javascripts/projects.js')
-rw-r--r--app/assets/javascripts/projects.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/app/assets/javascripts/projects.js b/app/assets/javascripts/projects.js
deleted file mode 100644
index 90de73a112d..00000000000
--- a/app/assets/javascripts/projects.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var ProjectsList = {
- limit:0,
- offset:0,
-
- init:
- function(limit) {
- this.limit=limit;
- this.offset=limit;
- this.initLoadMore();
- },
-
- getOld:
- function() {
- $('.loading').show();
- $.ajax({
- type: "GET",
- url: location.href,
- data: "limit=" + this.limit + "&offset=" + this.offset,
- complete: function(){ $('.loading').hide()},
- dataType: "script"});
- },
-
- append:
- function(count, html) {
- $(".tile").append(html);
- if(count > 0) {
- this.offset += count;
- this.initLoadMore();
- }
- },
-
- initLoadMore:
- function() {
- $(window).bind('scroll', function(){
- if($(window).scrollTop() == $(document).height() - $(window).height()){
- $(window).unbind('scroll');
- $('.loading').show();
- ProjectsList.getOld();
- }
- });
- }
-}