mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:23:25 +02:00
-Added clear button directive.
-Added filter button directive. -Moved the UI stuff to stf/common-ui. -Added optional filtering to Details. -Sync active tabs to local forage. -Device List status filters by usability. -Removed 750ms delay from filtering.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
module.exports = function clearButtonDirective() {
|
||||
return {
|
||||
restrict: 'EA',
|
||||
replace: true,
|
||||
scope: {},
|
||||
template: require('./clear-button.jade')
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
describe('clearButton', function () {
|
||||
|
||||
beforeEach(module('stf.clear-button'));
|
||||
|
||||
var scope, compile;
|
||||
|
||||
beforeEach(inject(function ($rootScope, $compile) {
|
||||
scope = $rootScope.$new();
|
||||
compile = $compile;
|
||||
}));
|
||||
|
||||
it('should ...', function () {
|
||||
|
||||
/*
|
||||
To test your directive, you need to create some html that would use your directive,
|
||||
send that through compile() then compare the results.
|
||||
|
||||
var element = compile('<div clear-button name="name">hi</div>')(scope);
|
||||
expect(element.text()).toBe('hello, world');
|
||||
*/
|
||||
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
button.btn.btn-sm.btn-danger-outline.pull-right
|
||||
i.fa.fa-trash-o
|
||||
span(translate) Clear
|
||||
2
res/app/components/stf/common-ui/clear-button/index.js
Normal file
2
res/app/components/stf/common-ui/clear-button/index.js
Normal file
@@ -0,0 +1,2 @@
|
||||
module.exports = angular.module('stf.clear-button', [])
|
||||
.directive('clearButton', require('./clear-button-directive'))
|
||||
Reference in New Issue
Block a user