1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-10 18:36:43 +02:00

Shortened PopupFilter properties names

This commit is contained in:
Max Guglielmi 2016-08-04 16:11:19 +10:00
parent 10f843430d
commit b5dafdb173
12 changed files with 101 additions and 101 deletions

4
dist/starter.html vendored
View file

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>tablefilter v0.2.48 - Starter</title>
<title>tablefilter v0.2.49 - Starter</title>
</head>
<body>
<h1>tablefilter v0.2.48</h1>
<h1>tablefilter v0.2.49</h1>

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:31.069Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:04.008Z
* MIT License
*/
span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:31.069Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:04.008Z
* MIT License
*/
span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:31.069Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:04.008Z
* MIT License
*/
.activeHeader{background-color:#66afe9 !important;color:#fff !important}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:31.069Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:04.008Z
* MIT License
*/
table.TF{border-left:1px solid #ccc;border-top:none;border-right:none;border-bottom:none;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;border-left:1px solid #fff;border-top:1px solid #fff;color:#333}table.TF td{border-bottom:1px dotted #999;padding:5px}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#999 !important}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:31.069Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:04.008Z
* MIT License
*/
table.TF{border-left:1px dotted #81963b;border-top:none;border-right:0;border-bottom:none;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x;border-bottom:0;border-right:1px dotted #d0d0d0;border-left:0;border-top:0;color:#fff}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#81963b !important}

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:31.069Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:04.008Z
* MIT License
*/
table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important}

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/**
* tablefilter v0.2.48 by Max Guglielmi
* build date: 2016-08-04T05:35:30.989Z
* tablefilter v0.2.49 by Max Guglielmi
* build date: 2016-08-04T06:01:03.993Z
* MIT License
*/

View file

@ -1,6 +1,6 @@
{
"name": "tablefilter",
"version": "0.2.48",
"version": "0.2.49",
"description": "A Javascript library making HTML tables filterable and a bit more",
"license": "MIT",
"author": {

View file

@ -30,55 +30,55 @@ export class PopupFilter extends Feature {
* Filter icon path
* @type {String}
*/
this.popUpImgFlt = f.popup_filters_image ||
this.iconPath = f.popup_filters_image ||
tf.themesPath + 'icn_filter.gif';
/**
* Active filter icon path
* @type {string}
*/
this.popUpImgFltActive = f.popup_filters_image_active ||
this.activeIconPath = f.popup_filters_image_active ||
tf.themesPath + 'icn_filterActive.gif';
/**
* HTML for the filter icon
* @type {string}
*/
this.popUpImgFltHtml = f.popup_filters_image_html ||
'<img src="' + this.popUpImgFlt + '" alt="Column filter" />';
this.iconHtml = f.popup_filters_image_html ||
'<img src="' + this.iconPath + '" alt="Column filter" />';
/**
* Css class assigned to filter container element
* @type {String}
*/
this.popUpDivCssClass = f.popup_div_css_class || 'popUpFilter';
this.containerCssClass = f.popup_div_css_class || 'popUpFilter';
/**
* Callback fired before a popup filter is opened
* @type {Function}
*/
this.onBeforePopUpOpen = isFn(f.on_before_popup_filter_open) ?
this.onBeforeOpen = isFn(f.on_before_popup_filter_open) ?
f.on_before_popup_filter_open : null;
/**
* Callback fired after a popup filter is opened
* @type {Function}
*/
this.onAfterPopUpOpen = isFn(f.on_after_popup_filter_open) ?
this.onAfterOpen = isFn(f.on_after_popup_filter_open) ?
f.on_after_popup_filter_open : null;
/**
* Callback fired before a popup filter is closed
* @type {Function}
*/
this.onBeforePopUpClose = isFn(f.on_before_popup_filter_close) ?
this.onBeforeClose = isFn(f.on_before_popup_filter_close) ?
f.on_before_popup_filter_close : null;
/**
* Callback fired after a popup filter is closed
* @type {Function}
*/
this.onAfterPopUpClose = isFn(f.on_after_popup_filter_close) ?
this.onAfterClose = isFn(f.on_after_popup_filter_close) ?
f.on_after_popup_filter_close : null;
/**
@ -86,48 +86,48 @@ export class PopupFilter extends Feature {
* @type {Array}
* @private
*/
this.popUpFltSpans = [];
this.fltSpans = [];
/**
* Collection of filters icons
* @type {Array}
* @private
*/
this.popUpFltImgs = [];
this.fltIcons = [];
/**
* Collection of filters icons cached after pop-up filters are removed
* @type {Array}
* @private
*/
this.popUpFltElmCache = null;
this.filtersCache = null;
/**
* Collection of filters containers
* @type {Array}
* @private
*/
this.popUpFltElms = this.popUpFltElmCache || [];
this.fltElms = this.filtersCache || [];
/**
* Ensure filter's container element width matches column width
* @type {Boolean}
*/
this.popUpFltAdjustToContainer = true;
this.adjustToContainer = true;
/**
* Prefix for pop-up filter span ID
* @type {String}
* @private
*/
this.prfxPopUpSpan = 'popUpSpan_';
this.prfxSpan = 'popUpSpan_';
/**
* Prefix for pop-up filter container ID
* @type {String}
* @private
*/
this.prfxPopUpDiv = 'popUpDiv_';
this.prfxDiv = 'popUpDiv_';
}
/**
@ -141,8 +141,8 @@ export class PopupFilter extends Feature {
this.closeAll(colIndex);
this.toggle(colIndex);
if (this.popUpFltAdjustToContainer) {
let popUpDiv = this.popUpFltElms[colIndex],
if (this.adjustToContainer) {
let popUpDiv = this.fltElms[colIndex],
header = this.tf.getHeaderElement(colIndex),
headerWidth = header.clientWidth * 0.95;
popUpDiv.style.width = parseInt(headerWidth, 10) + 'px';
@ -172,15 +172,15 @@ export class PopupFilter extends Feature {
}
let popUpSpan = createElm(
'span',
['id', this.prfxPopUpSpan + tf.id + '_' + i],
['id', this.prfxSpan + tf.id + '_' + i],
['ci', i]
);
popUpSpan.innerHTML = this.popUpImgFltHtml;
popUpSpan.innerHTML = this.iconHtml;
let header = tf.getHeaderElement(i);
header.appendChild(popUpSpan);
addEvt(popUpSpan, 'click', (evt) => this.onClick(evt));
this.popUpFltSpans[i] = popUpSpan;
this.popUpFltImgs[i] = popUpSpan.firstChild;
this.fltSpans[i] = popUpSpan;
this.fltIcons[i] = popUpSpan.firstChild;
}
// subscribe to events
@ -211,8 +211,8 @@ export class PopupFilter extends Feature {
* Build all pop-up filters elements
*/
buildAll() {
for (let i = 0; i < this.popUpFltElmCache.length; i++) {
this.build(i, this.popUpFltElmCache[i]);
for (let i = 0; i < this.filtersCache.length; i++) {
this.build(i, this.filtersCache[i]);
}
}
@ -225,14 +225,14 @@ export class PopupFilter extends Feature {
let tf = this.tf;
let popUpDiv = !div ?
createElm('div',
['id', this.prfxPopUpDiv + tf.id + '_' + colIndex]) :
['id', this.prfxDiv + tf.id + '_' + colIndex]) :
div;
popUpDiv.className = this.popUpDivCssClass;
popUpDiv.className = this.containerCssClass;
tf.externalFltTgtIds.push(popUpDiv.id);
let header = tf.getHeaderElement(colIndex);
header.insertBefore(popUpDiv, header.firstChild);
addEvt(popUpDiv, 'click', (evt) => stopEvt(evt));
this.popUpFltElms[colIndex] = popUpDiv;
this.fltElms[colIndex] = popUpDiv;
}
/**
@ -241,13 +241,13 @@ export class PopupFilter extends Feature {
*/
toggle(colIndex) {
let tf = this.tf,
popUpFltElm = this.popUpFltElms[colIndex];
popUpFltElm = this.fltElms[colIndex];
if (popUpFltElm.style.display === NONE ||
popUpFltElm.style.display === '') {
if (this.onBeforePopUpOpen) {
this.onBeforePopUpOpen.call(
null, this, this.popUpFltElms[colIndex], colIndex);
if (this.onBeforeOpen) {
this.onBeforeOpen.call(
null, this, this.fltElms[colIndex], colIndex);
}
popUpFltElm.style.display = 'block';
if (tf.getFilterType(colIndex) === INPUT) {
@ -256,19 +256,19 @@ export class PopupFilter extends Feature {
flt.focus();
}
}
if (this.onAfterPopUpOpen) {
this.onAfterPopUpOpen.call(
null, this, this.popUpFltElms[colIndex], colIndex);
if (this.onAfterOpen) {
this.onAfterOpen.call(
null, this, this.fltElms[colIndex], colIndex);
}
} else {
if (this.onBeforePopUpClose) {
this.onBeforePopUpClose.call(
null, this, this.popUpFltElms[colIndex], colIndex);
if (this.onBeforeClose) {
this.onBeforeClose.call(
null, this, this.fltElms[colIndex], colIndex);
}
popUpFltElm.style.display = NONE;
if (this.onAfterPopUpClose) {
this.onAfterPopUpClose.call(
null, this, this.popUpFltElms[colIndex], colIndex);
if (this.onAfterClose) {
this.onAfterClose.call(
null, this, this.fltElms[colIndex], colIndex);
}
}
}
@ -278,11 +278,11 @@ export class PopupFilter extends Feature {
* @param {Number} exceptIdx Column index of the filter to not close
*/
closeAll(exceptIdx) {
for (let i = 0; i < this.popUpFltElms.length; i++) {
for (let i = 0; i < this.fltElms.length; i++) {
if (i === exceptIdx) {
continue;
}
let popUpFltElm = this.popUpFltElms[i];
let popUpFltElm = this.fltElms[i];
if (popUpFltElm) {
popUpFltElm.style.display = NONE;
}
@ -293,7 +293,7 @@ export class PopupFilter extends Feature {
* Build all the icons representing the pop-up filters
*/
buildIcons() {
for (let i = 0; i < this.popUpFltImgs.length; i++) {
for (let i = 0; i < this.fltIcons.length; i++) {
this.buildIcon(i, false);
}
}
@ -304,9 +304,9 @@ export class PopupFilter extends Feature {
* @param {Boolean} active Apply active state
*/
buildIcon(colIndex, active) {
if (this.popUpFltImgs[colIndex]) {
this.popUpFltImgs[colIndex].src = active ?
this.popUpImgFltActive : this.popUpImgFlt;
if (this.fltIcons[colIndex]) {
this.fltIcons[colIndex].src = active ?
this.activeIconPath : this.iconPath;
}
}
@ -318,14 +318,14 @@ export class PopupFilter extends Feature {
return;
}
this.popUpFltElmCache = [];
for (let i = 0; i < this.popUpFltElms.length; i++) {
let popUpFltElm = this.popUpFltElms[i],
popUpFltSpan = this.popUpFltSpans[i],
popUpFltImg = this.popUpFltImgs[i];
this.filtersCache = [];
for (let i = 0; i < this.fltElms.length; i++) {
let popUpFltElm = this.fltElms[i],
popUpFltSpan = this.fltSpans[i],
popUpFltImg = this.fltIcons[i];
if (popUpFltElm) {
removeElm(popUpFltElm);
this.popUpFltElmCache[i] = popUpFltElm;
this.filtersCache[i] = popUpFltElm;
}
popUpFltElm = null;
if (popUpFltSpan) {
@ -337,9 +337,9 @@ export class PopupFilter extends Feature {
}
popUpFltImg = null;
}
this.popUpFltElms = [];
this.popUpFltSpans = [];
this.popUpFltImgs = [];
this.fltElms = [];
this.fltSpans = [];
this.fltIcons = [];
// unsubscribe to events
this.emitter.off(['before-filtering'], () => this.buildIcons());

View file

@ -14,8 +14,8 @@ var popupFilter = tf.feature('popupFilter');
module('Sanity checks');
test('Pop-up filter component', function() {
notEqual(popupFilter, null, 'PopupFilter instanciated');
deepEqual(popupFilter.popUpFltElms instanceof Array,
true, 'Type of popUpFltElms property');
deepEqual(popupFilter.fltElms instanceof Array,
true, 'Type of fltElms property');
deepEqual(tf.headersRow, 1, 'Headers row index');
// issue 99: getHeadersText for pick-list filter types
deepEqual(
@ -34,9 +34,9 @@ module('UI elements');
test('Pop-up filter UI elements', function() {
var flt1 = id(tf.fltIds[3]);
var flt2 = id(tf.fltIds[2]);
var fltIcn1 = popupFilter.popUpFltImgs[3];
var fltIcn2 = popupFilter.popUpFltImgs[2];
var fltIcn3 = popupFilter.popUpFltImgs[4];
var fltIcn1 = popupFilter.fltIcons[3];
var fltIcn2 = popupFilter.fltIcons[2];
var fltIcn3 = popupFilter.fltIcons[4];
notEqual(flt1, null, 'Filter element exists');
notEqual(flt2, null, 'Filter element exists');
@ -47,7 +47,7 @@ test('Pop-up filter UI elements', function() {
});
test('Pop-up filter state after filtering', function(){
var fltIcn0 = popupFilter.popUpFltImgs[0];
var fltIcn0 = popupFilter.fltIcons[0];
tf.setFilterValue(0, 'syd');
tf.filter();
@ -56,10 +56,10 @@ test('Pop-up filter state after filtering', function(){
});
test('Pop-up filter state after clearing', function(){
var fltIcn0 = popupFilter.popUpFltImgs[0];
var fltIcn1 = popupFilter.popUpFltImgs[1];
var fltIcn2 = popupFilter.popUpFltImgs[2];
var fltIcn3 = popupFilter.popUpFltImgs[3];
var fltIcn0 = popupFilter.fltIcons[0];
var fltIcn1 = popupFilter.fltIcons[1];
var fltIcn2 = popupFilter.fltIcons[2];
var fltIcn3 = popupFilter.fltIcons[3];
tf.clearFilters();
deepEqual(fltIcn0.src.indexOf('icn_filterActive') === -1,
@ -74,14 +74,14 @@ test('Pop-up filter state after clearing', function(){
test('TableFilter removed', function() {
tf.destroy();
var fltIcn1 = popupFilter.popUpFltImgs[3];
var fltIcn1 = popupFilter.fltIcons[3];
deepEqual(fltIcn1, undefined, 'Filter icon is removed');
deepEqual(id(tf.fltIds[3]), null, 'Filter is removed');
});
test('TableFilter re-initialised', function() {
tf.init();
var fltIcn1 = popupFilter.popUpFltImgs[3];
var fltIcn1 = popupFilter.fltIcons[3];
deepEqual(fltIcn1.nodeName, 'IMG', 'Filter icon exists');
deepEqual(id(tf.fltIds[3]).nodeName, 'SELECT', 'Filter exists');
});
@ -101,8 +101,8 @@ test('Re-instantiated with grid-layout', function() {
tf.init();
notEqual(popupFilter, null, 'PopupFilter instanciated');
deepEqual(popupFilter.popUpFltElms instanceof Array,
true, 'Type of popUpFltElms property');
deepEqual(popupFilter.fltElms instanceof Array,
true, 'Type of fltElms property');
deepEqual(tf.headersRow, 0, 'Headers row index');
// issue 99: getHeadersText for pick-list filter types
deepEqual(
@ -121,9 +121,9 @@ test('Pop-up filter UI elements with grid-layout', function() {
var popupFilter = tf.feature('popupFilter');
var flt1 = id(tf.fltIds[3]);
var flt2 = id(tf.fltIds[2]);
var fltIcn1 = popupFilter.popUpFltImgs[3];
var fltIcn2 = popupFilter.popUpFltImgs[2];
var fltIcn3 = popupFilter.popUpFltImgs[4];
var fltIcn1 = popupFilter.fltIcons[3];
var fltIcn2 = popupFilter.fltIcons[2];
var fltIcn3 = popupFilter.fltIcons[4];
notEqual(flt1, null, 'Filter element exists');
notEqual(flt2, null, 'Filter element exists');
@ -135,7 +135,7 @@ test('Pop-up filter UI elements with grid-layout', function() {
test('Pop-up filter state after filtering', function(){
var popupFilter = tf.feature('popupFilter');
var fltIcn0 = popupFilter.popUpFltImgs[0];
var fltIcn0 = popupFilter.fltIcons[0];
tf.setFilterValue(0, 'syd');
tf.filter();
@ -145,10 +145,10 @@ test('Pop-up filter state after filtering', function(){
test('Pop-up filter state after clearing', function(){
var popupFilter = tf.feature('popupFilter');
var fltIcn0 = popupFilter.popUpFltImgs[0];
var fltIcn1 = popupFilter.popUpFltImgs[1];
var fltIcn2 = popupFilter.popUpFltImgs[2];
var fltIcn3 = popupFilter.popUpFltImgs[3];
var fltIcn0 = popupFilter.fltIcons[0];
var fltIcn1 = popupFilter.fltIcons[1];
var fltIcn2 = popupFilter.fltIcons[2];
var fltIcn3 = popupFilter.fltIcons[3];
tf.clearFilters();
deepEqual(fltIcn0.src.indexOf('icn_filterActive') === -1,
@ -185,7 +185,7 @@ test('Properties', function() {
module('Tear-down');
test('TableFilter removed', function() {
tf.destroy();
var fltIcn1 = popupFilter.popUpFltImgs[3];
var fltIcn1 = popupFilter.fltIcons[3];
deepEqual(fltIcn1, undefined, 'Filter icon is removed');
deepEqual(id(tf.fltIds[3]), null, 'Filter is removed');
deepEqual(tf.isInitialized(), false, 'Filters removed');