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/
8 YUI.add('datatable-paginator-templates', function (Y, NAME) {
10 var engine = new Y.Template(),
18 rowWrapper = '<tr><td class="<%= this.wrapperClass %>" colspan="' +
19 '<%= this.numOfCols %>"/></tr>',
26 content = '<%= buttons %><%= this.classNames.gotoPage %>' +
27 '<%= this.classNames.perPage %>',
36 button = '<button class="<%= this.classNames.control %> ' +
37 '<%= this.classNames.control %>-<%= this.type %>" ' +
38 'data-type="<%= this.type %>"><%= this.label %></button>',
48 buttons = '<div class="<%= this.classNames.controls %> <%= this.classNames.group %>">' +
49 '<%== this.buttons %>' +
59 gotoPage = '<form action="#" class="<%= this.classNames.group %>">' +
60 '<label><%= this.strings.goToLabel %>' +
61 '<input type="text" value="<%= this.page %>">' +
62 '<button><%= this.strings.goToAction %></button>' +
73 perPage = '<div class="<%= this.classNames.group %> <%= this.classNames.perPage %>">' +
74 '<label><%= this.strings.perPage %> <select>' +
75 '<% Y.Array.each(this.options, function (option, i) { %>' +
76 '<option value="<%= option.value %>" <%= option.selected %>>' +
77 '<%= option.label %></option>'+
79 '</select></label></div>';
84 Y.namespace('DataTable.Templates').Paginator = {
85 rowWrapper: engine.compile(rowWrapper),
86 button: engine.compile(button),
87 content: engine.compile(content),
88 buttons: engine.compile(buttons),
89 gotoPage: engine.compile(gotoPage),
90 perPage: engine.compile(perPage)
94 }, '3.13.0', {"requires": ["template"]});