WRMCB=function(e){var c=console;if(c&&c.log&&c.error){c.log('Error running batched script.');c.error(e);}}
;
try {
/* module-key = 'confluence.web.resources:select-grid', location = 'includes/js/select-grid.soy' */
// This file was automatically generated from select-grid.soy.
// Please don't edit this file by hand.
/**
* @fileoverview Templates in namespace Confluence.Templates.SelectGrid.
*/
if (typeof Confluence == 'undefined') { var Confluence = {}; }
if (typeof Confluence.Templates == 'undefined') { Confluence.Templates = {}; }
if (typeof Confluence.Templates.SelectGrid == 'undefined') { Confluence.Templates.SelectGrid = {}; }
Confluence.Templates.SelectGrid.gridOutline = function(opt_data, opt_ignored) {
return '
';
};
if (goog.DEBUG) {
Confluence.Templates.SelectGrid.gridOutline.soyTemplateName = 'Confluence.Templates.SelectGrid.gridOutline';
}
Confluence.Templates.SelectGrid.cellWithLink = function(opt_data, opt_ignored) {
return '' + soy.$$escapeHtml(opt_data.text) + ' | ';
};
if (goog.DEBUG) {
Confluence.Templates.SelectGrid.cellWithLink.soyTemplateName = 'Confluence.Templates.SelectGrid.cellWithLink';
}
Confluence.Templates.SelectGrid.cellWithoutLink = function(opt_data, opt_ignored) {
return '' + soy.$$escapeHtml(opt_data.text) + ' | ';
};
if (goog.DEBUG) {
Confluence.Templates.SelectGrid.cellWithoutLink.soyTemplateName = 'Confluence.Templates.SelectGrid.cellWithoutLink';
}
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'confluence.web.resources:select-grid', location = 'includes/js/select-grid.js' */
define("confluence/select-grid",["ajs","jquery","confluence/templates","confluence/group","confluence/control"],function(c,f,h,g,l){g=g.extend({init:function(a){this.type=this.type||"SelectGrid";this._super();var b=f(h.SelectGrid.gridOutline()),d=b.find("thead tr");f(a.columns).each(function(a,b){a=c("th").addClass(b.getClassName()).text(b.heading);d.append(a)});this.gridContainer=f(a.gridContainer).append(b);this.getRowId=a.getRowId;this.table=b;this.columns=a.columns;this.selectionCallback=a.selectionCallback;
this.body=b.find("tbody");this.body.delegate("a","click",function(a){a.preventDefault()});this.dontShiftFocus=a.dontShiftFocus||function(){}},keys:{up:function(a){this.table.is(":visible")&&!this.dontShiftFocus()&&(this.shiftFocus(-1),a.preventDefault())},down:function(a){this.table.is(":visible")&&!this.dontShiftFocus()&&(this.shiftFocus(1),a.preventDefault())}},_addRow:function(a,b,d,e){f.isFunction(d)&&(e=d,d=!1);d?this.body.prepend(a):this.body.append(a);a=new m({row:a,data:b,callback:e,getRowId:this.getRowId,
selectionCallback:e});this.addItem(a);return a},clear:function(){this.removeAllItems();this.body.children().remove()},_addRows:function(a,b){var d=this,e=[];f(a).each(function(a,c){a=n(c,d.columns);a.attr("data-id",d.getRowId(c));e.push(d._addRow(a,c,b,d.selectionCallback))});return e},update:function(a){this.clear();a&&a.length?(this._addRows(a),this.prepareForInput()):c.debug("SelectGrid.update called with no data, returning.")},prependAndSelect:function(a,b){a&&a.length?this._addRows(a,!0)[b||
0].selectRow():c.debug("SelectGrid.prependAndSelect called with no data, returning.")},findItem:function(a){for(var b=0;b