Forked from Aaron Baker's Pen jPZBNK.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function curriedReadFile(path) { | |
| var _done, _error, _result; | |
| var callback = function(error, result) { | |
| _done = true, | |
| _error = error, | |
| _result = result; | |
| }; | |
| fs.readFile(path, function(e, r) { |
Pen exploring several topics: (1) How to build a scrollable, bootstrap style data grid; (2) How to virtualize the requisite components (2) using ES6 classes; (3) How to handle AJAX using an ES6 promise (instead of jQuery); and (4) How to make each class testable (or compatible with) using jsTestDriver.
Forked from brady house's Pen ES6 - Scrollable Datagrid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default class Application { | |
| constructor(container) { | |
| this[container] = container; | |
| } | |
| init() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define([ | |
| 'jquery' | |
| ], | |
| function (requirejs) { | |
| 'use strict'; | |
| var $ = requirejs('jquery'), | |
| lib = requirejs('lib'), | |
| controller = requirejs('UserController'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(function () { | |
| 'use strict'; | |
| function BaseController(id) { | |
| this.id = id; | |
| } | |
| BaseController.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define(function () { | |
| 'use strict'; | |
| function BaseModel(title) { | |
| this.title = title; | |
| } | |
| BaseModel.prototype = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Storage = (function (name) { | |
| if (supportLocalStorage) { | |
| var self = window['localStorage']; | |
| if (!localStorage[name]) { | |
| localStorage.ApplicationStorage = localStorage[name]; | |
| localStorage.ApplicationStorage.users = localStorage.setItem('ApplicationStorage', 'Users'); |