Skip to content

Commit

Permalink
FLUID-5284: Linted pager demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jobara committed Mar 26, 2014
1 parent 05e8e17 commit 1eae2a0
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/demos/pager/js/pagerDemo.js
Expand Up @@ -13,14 +13,12 @@ https://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt
*/

// Declare dependencies
/*global demo:true, fluid, jQuery*/

// JSLint options
/*jslint white: true, funcinvoke: true, undef: true, newcap: true, nomen: true, regexp: true, bitwise: true, browser: true, forin: true, maxerr: 100, indent: 4 */
/*global fluid */

var demo = demo || {};

(function ($, fluid) {
"use strict";

/**
* Main demo initialization
Expand All @@ -34,20 +32,20 @@ var demo = demo || {};
}
}
};

function initPager(resourceSpecs) {

var model = resourceSpecs.users.resourceText;
var columnDefs = [
var columnDefs = [
{
key: "user-link",
valuebinding: "*.userDisplayName",
valuebinding: "*.userDisplayName",
sortable: true
},
{
key: "user-email",
valuebinding: "*.userEmail",
sortable: true
sortable: true
},
{
key: "user-role",
Expand All @@ -60,7 +58,7 @@ var demo = demo || {};
sortable: false
}
];

demo.pager = fluid.pagedTable(".demo-pager-container", {
dataModel: model,
model: {
Expand All @@ -78,7 +76,7 @@ var demo = demo || {};
},
rendererOptions: {debugMode: false} // Change this to true to diagnose rendering issues
}
}
}
},
decorators: {
unsortableHeader: [
Expand All @@ -96,7 +94,7 @@ var demo = demo || {};
}
});
}

fluid.fetchResources(resources, initPager);

};
Expand Down

0 comments on commit 1eae2a0

Please sign in to comment.