~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/yuilib/3.13.0/paginator/paginator-coverage.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
YUI 3.13.0 (build 508226d)
 
3
Copyright 2013 Yahoo! Inc. All rights reserved.
 
4
Licensed under the BSD License.
 
5
http://yuilibrary.com/license/
 
6
*/
 
7
 
 
8
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
 
9
if (!__coverage__['build/paginator/paginator.js']) {
 
10
   __coverage__['build/paginator/paginator.js'] = {"path":"build/paginator/paginator.js","s":{"1":0,"2":0},"b":{},"f":{"1":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":40}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":75,"column":47}},"2":{"start":{"line":69,"column":0},"end":{"line":72,"column":2}}},"branchMap":{},"code":["(function () { YUI.add('paginator', function (Y, NAME) {","","/**"," The Paginator utility allows you to display an item or a group of items"," depending on the number of items you wish to display at one time.",""," Paginator's primary functionality is contained in `paginator-core` and is mixed"," into `paginator` to allow `paginator` to have extra functionality added to it"," while leaving the core functionality untouched. This allows `paginator-core` to"," remain available for use later on or used in isolation if it is the only piece"," you need.",""," Due to the vast number of interfaces a paginator could possibly consist of,"," `Paginator` does not contain any ready to use UIs. However, `Paginator` is"," ready to be used in any Based-based, module such as a Widget, by extending your"," desired class and mixing in `Paginator`. This is displayed in the following"," example:",""," <pre><code>"," YUI().use('paginator-url', 'widget', function (Y){","     var MyPaginator = Y.Base.create('my-paginator', Y.Widget, [Y.Paginator], {","","        renderUI: function () {","            var numbers = '',","                i, numberOfPages = this.get('totalPages');","","            for (i = 1; i <= numberOfPages; i++) {","                // use paginator-url's formatUrl method","                numbers += '&lt;a href=\"' + this.formatUrl(i) + '\">' + i + '&lt;/a>';","            }","","            this.get('boundingBox').append(numbers);","        },","","        bindUI: function () {","            this.get('boundingBox').delegate('click', function (e) {","                // let's not go to the page, just update internally","                e.preventDefault();","                this.set('page', parseInt(e.currentTarget.getContent(), 10));","            }, 'a', this);","","            this.after('pageChange', function (e) {","                // mark the link selected when it's the page being displayed","                var bb = this.get('boundingBox'),","                    activeClass = 'selected';","","                bb.all('a').removeClass(activeClass).item(e.newVal).addClass(activeClass);","            });","        }","","     });","","     var myPg = new MyPaginator({","                    totalItems: 100,","                    pageUrl: '?pg={page}'","                });","","     myPg.render();"," });"," </code></pre>",""," @module paginator"," @main paginator"," @class Paginator"," @constructor"," @since 3.11.0"," */","","Y.Paginator = Y.mix(","    Y.Base.create('paginator', Y.Base, [Y.Paginator.Core]),","    Y.Paginator",");","","","}, '3.13.0', {\"requires\": [\"paginator-core\"]});","","}());"]};
 
11
}
 
12
var __cov_ZdY6Pu0_MB6gZTkNaF0I0w = __coverage__['build/paginator/paginator.js'];
 
13
__cov_ZdY6Pu0_MB6gZTkNaF0I0w.s['1']++;YUI.add('paginator',function(Y,NAME){__cov_ZdY6Pu0_MB6gZTkNaF0I0w.f['1']++;__cov_ZdY6Pu0_MB6gZTkNaF0I0w.s['2']++;Y.Paginator=Y.mix(Y.Base.create('paginator',Y.Base,[Y.Paginator.Core]),Y.Paginator);},'3.13.0',{'requires':['paginator-core']});