Skip to content

Commit df5e80e

Browse files
v0.0.0
1 parent 0a53a93 commit df5e80e

File tree

5 files changed

+58
-24
lines changed

5 files changed

+58
-24
lines changed

dist/angular-jscrollpane.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
(function() {
2+
angular.module("ngJScrollPane", []);
3+
4+
angular.module("ngJScrollPane").directive("scrollPane", [
5+
'$timeout', function($timeout) {
6+
return {
7+
restrict: 'A',
8+
transclude: true,
9+
template: '<div class="scroll-pane"><div ng-transclude></div></div>',
10+
link: function($scope, $elem, $attrs) {
11+
var config, fn;
12+
config = {};
13+
if ($attrs.scrollConfig) {
14+
config = $scope.$eval($attrs.scrollConfig);
15+
}
16+
fn = function() {
17+
return jQuery("#" + $attrs.id).jScrollPane(config);
18+
};
19+
if ($attrs.scrollTimeout) {
20+
return $timeout(fn, $scope.$eval($attrs.scrollTimeout));
21+
} else {
22+
return fn();
23+
}
24+
},
25+
replace: true
26+
};
27+
}
28+
]);
29+
30+
}).call(this);

dist/angular-jscrollpane.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jscrollpane.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"url": "https://github.com/lght/angular-scroll-pane/issues"
2323
},
2424
"devDependencies": {
25-
"bower": "~1.3.9"
25+
"bower": "~1.3.9",
26+
"coffee-script": "^1.8.0",
27+
"grunt": "^0.4.5",
28+
"grunt-cli": "^0.1.13",
29+
"grunt-contrib-coffee": "^0.12.0",
30+
"grunt-contrib-uglify": "^0.6.0"
2631
}
2732
}

src/jscrollpane.coffee

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
angular.module "ngJScrollPane", []
2+
angular
3+
.module("ngJScrollPane")
4+
.directive "scrollPane", ['$timeout',
5+
($timeout) ->
6+
restrict: 'A'
7+
transclude: true
8+
template: '<div class="scroll-pane"><div ng-transclude></div></div>'
9+
link: ($scope, $elem, $attrs) ->
10+
config = {}
11+
if $attrs.scrollConfig
12+
config = $scope.$eval $attrs.scrollConfig
13+
fn = () ->
14+
jQuery("##{$attrs.id}").jScrollPane config
15+
if $attrs.scrollTimeout
16+
$timeout fn, $scope.$eval $attrs.scrollTimeout
17+
else
18+
do fn
19+
replace: true
20+
]

0 commit comments

Comments
 (0)