mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 00:53:26 +02:00
- Improving the shell. Still not a real shell.
This commit is contained in:
16
res/app/components/stf/common-ui/tooltips/README.md
Normal file
16
res/app/components/stf/common-ui/tooltips/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# stf-tooltips
|
||||
|
||||
Based on Angular Bootstrap.
|
||||
|
||||
Usage:
|
||||
|
||||
```html
|
||||
help-title='{{"Run Command"|translate}}'
|
||||
help-key='Enter'
|
||||
```
|
||||
|
||||
Maps to:
|
||||
|
||||
```html
|
||||
tooltip-html-unsafe='{{"Run Command<br /><br /><code>Enter</code>"|translate}}'
|
||||
```
|
||||
4
res/app/components/stf/common-ui/tooltips/index.js
Normal file
4
res/app/components/stf/common-ui/tooltips/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
module.exports = angular.module('stf.tooltips', [
|
||||
|
||||
])
|
||||
.directive('tooltips', require('./tooltips-directive'))
|
||||
@@ -0,0 +1,8 @@
|
||||
module.exports = function tooltipsDirective() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attrs) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
23
res/app/components/stf/common-ui/tooltips/tooltips-spec.js
Normal file
23
res/app/components/stf/common-ui/tooltips/tooltips-spec.js
Normal file
@@ -0,0 +1,23 @@
|
||||
describe('tooltips', function () {
|
||||
|
||||
beforeEach(module('stf.tooltips'));
|
||||
|
||||
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 tooltips name="name">hi</div>')(scope);
|
||||
expect(element.text()).toBe('hello, world');
|
||||
*/
|
||||
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user