|
|
@@ -11,7 +11,20 @@ define(['angular', 'showdown', 'angular-toaster'], function(angular) {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
- }).directive('datetrigger', ['$parse', function($parse) {
|
|
|
+ }).directive('scrollTable', [function () {
|
|
|
+ // table 固定表头
|
|
|
+ return {
|
|
|
+ restrict: 'A',
|
|
|
+ link: function (scope, element, attrs, ngModel) {
|
|
|
+ var header = element.find('.table-header-wrap'), body = element.find('.table-body-wrap');
|
|
|
+ if (header && body) {
|
|
|
+ body.bind('scroll', function () {
|
|
|
+ header.scrollLeft(body.scrollLeft());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }]).directive('datetrigger', ['$parse', function($parse) {
|
|
|
return {
|
|
|
restrict: 'EA',
|
|
|
transclude: true,
|