Commit 0791116f authored by Clement Ho's avatar Clement Ho

Refactor loadingTemplate to abstract class

parent 50663661
...@@ -17,10 +17,7 @@ ...@@ -17,10 +17,7 @@
current_user: true, current_user: true,
}, },
searchValueFunction: this.getSearchInput, searchValueFunction: this.getSearchInput,
loadingTemplate: ` loadingTemplate: this.loadingTemplate,
<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`,
} }
}; };
} }
......
...@@ -17,10 +17,7 @@ ...@@ -17,10 +17,7 @@
current_user: true, current_user: true,
}, },
searchValueFunction: this.getSearchInput, searchValueFunction: this.getSearchInput,
loadingTemplate: ` loadingTemplate: this.loadingTemplate,
<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`,
} }
}; };
} }
......
...@@ -10,10 +10,7 @@ ...@@ -10,10 +10,7 @@
droplabAjax: { droplabAjax: {
endpoint: 'labels.json', endpoint: 'labels.json',
method: 'setData', method: 'setData',
loadingTemplate: ` loadingTemplate: this.loadingTemplate,
<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`,
}, },
droplabFilter: { droplabFilter: {
filterFunction: this.filterWithSymbol.bind(this, '~'), filterFunction: this.filterWithSymbol.bind(this, '~'),
......
...@@ -10,10 +10,7 @@ ...@@ -10,10 +10,7 @@
droplabAjax: { droplabAjax: {
endpoint: 'milestones.json', endpoint: 'milestones.json',
method: 'setData', method: 'setData',
loadingTemplate: ` loadingTemplate: this.loadingTemplate,
<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`,
}, },
droplabFilter: { droplabFilter: {
filterFunction: this.filterWithSymbol.bind(this, '%'), filterFunction: this.filterWithSymbol.bind(this, '%'),
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
this.hookId = 'filtered-search'; this.hookId = 'filtered-search';
this.input = input; this.input = input;
this.dropdown = dropdown; this.dropdown = dropdown;
this.loadingTemplate = `<div class="filter-dropdown-loading">
<i class="fa fa-spinner fa-spin"></i>
</div>`;
this.bindEvents(); this.bindEvents();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment