MarionetteJS chapter 2 views part 2

Marionette Views demostrated http://marionettejs.com

by Steven Senkus

HTML

<script src="http://underscorejs.org/underscore.js"></script>
<script src="http://backbonejs.org/backbone.js"></script>
<script src="http://marionettejs.com/downloads/backbone.marionette.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.0/bootstrap.min.js"></script>

JavaScript

/*
  backbone.paginator 2.0.0
  http://github.com/backbone-paginator/backbone.paginator

  Copyright (c) 2013 Jimmy Yuen Ho Wong and contributors
  Licensed under the MIT @license.
*/
! function (a) {
    if ("object" == typeof exports) module.exports = a(require("underscore"), require("backbone"));
    else if ("function" == typeof define && define.amd) define(["underscore", "backbone"], a);
    else if ("undefined" != typeof _ && "undefined" != typeof Backbone) {
        var b = Backbone.PageableCollection,
            c = a(_, Backbone);
        Backbone.PageableCollection.noConflict = function () {
            return Backbone.PageableCollection = b, c
        }
    }
}(function (a, b) {
    "use strict";

    function c(b, c) {
        if (!a.isNumber(b) || a.isNaN(b) || !a.isFinite(b) || ~~b !== b) throw new TypeError("`" + c + "` must be a finite integer");
        return b
    }
    function d(a) {
        for (var b, c, d, e, f = {}, g = decodeURIComponent, h = a.split("&"), i = 0, j = h.length; j > i; i++) {
            var k = h[i];
            b = k.split("="), c = b[0], d = b[1] || !0, c = g(c), d = g(d), e = f[c], o(e) ? e.push(d) : f[c] = e ? [e, d] : d
        }
        return f
    }
    function e(a, b, c) {
        var d = a._events[b];
        if (d && d.length) {
            var e = d[d.length - 1],
                f = e.callback;
            e.callback = function () {
                try {
                    f.apply(this, arguments), c()
                } catch (a) {
                    throw a
                } finally {
                    e.callback = f
                }
            }
        } else c()
    }
    var f = a.extend,
        g = a.omit,
        h = a.clone,
        i = a.each,
        j = a.pick,
        k = a.contains,
        l = a.isEmpty,
        m = a.pairs,
        n = a.invert,
        o = a.isArray,
        p = a.isFunction,
        q = a.isObject,
        r = a.keys,
        s = a.isUndefined,
        t = a.result,
...