Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-27 20:47:19 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-27 20:47:19 +0400
commitce0ec05c6371e055e9cc90e6239cafc015a6a69b (patch)
treed0a9cbc2000c12d492ee992ff9b236e813ebd09c /app/assets/javascripts/pager.js
parente3c3c67b25e2601194293885818ff4dfb39885cd (diff)
Pager.js to coffee
Diffstat (limited to 'app/assets/javascripts/pager.js')
-rw-r--r--app/assets/javascripts/pager.js56
1 files changed, 0 insertions, 56 deletions
diff --git a/app/assets/javascripts/pager.js b/app/assets/javascripts/pager.js
deleted file mode 100644
index 7edd6bd6186..00000000000
--- a/app/assets/javascripts/pager.js
+++ /dev/null
@@ -1,56 +0,0 @@
-var Pager = {
- limit:0,
- offset:0,
- disable:false,
-
- init:
- function(limit, preload) {
- this.limit=limit;
-
- if(preload) {
- this.offset = 0;
- this.getOld();
- } else {
- 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) {
- $(".content_list").append(html);
- if(count > 0) {
- this.offset += count;
- } else {
- this.disable = true;
- }
- },
-
- initLoadMore:
- function() {
- $(document).endlessScroll({
- bottomPixels: 400,
- fireDelay: 1000,
- fireOnce:true,
- ceaseFire: function() {
- return Pager.disable;
- },
- callback: function(i) {
- $('.loading').show();
- Pager.getOld();
- }
- });
- }
-}