From ec03200068022610fdd4e5926321d38fc60672d6 Mon Sep 17 00:00:00 2001 From: Matthew Marino Date: Mon, 7 Dec 2015 22:14:40 -0800 Subject: [PATCH] Initial commit --- .gitignore | 1 + README.md | 4 +- bower.json | 25 ++ dist/angular-revolution.js | 524 +++++++++++++++++++++++++++++++++++++ package.json | 25 ++ 5 files changed, 578 insertions(+), 1 deletion(-) create mode 100644 bower.json create mode 100644 dist/angular-revolution.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 123ae94..b5f8e29 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules +.idea \ No newline at end of file diff --git a/README.md b/README.md index 6f547cb..65aa53f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # angular-revolution -directive for the Slider Revoluiton created by ThemePunch (http://www.themepunch.com/portfolio/slider-revolution-jquery-plugin/) +A directive for the Slider Revolution created by [ThemePunch](http://www.themepunch.com/portfolio/slider-revolution-jquery-plugin/) + +This directive requires the jQuery plugin Slider Revolution, which is a paid plugin and requires license. The plugin is not included in this directive because of this. diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..69a9cde --- /dev/null +++ b/bower.json @@ -0,0 +1,25 @@ +{ + "name": "angular-revolution", + "description": "Directive for Slider Revolution plugin from ThemePunch", + "main": "dist/angular-revolution.js", + "authors": [ + "JCMar" + ], + "license": "MIT", + "keywords": [ + "angular", + "slider", + "revolution", + "jquery" + ], + "homepage": "https://github.com/Karnith/angular-revolution", + "moduleType": [], + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/dist/angular-revolution.js b/dist/angular-revolution.js new file mode 100644 index 0000000..dc8e3dd --- /dev/null +++ b/dist/angular-revolution.js @@ -0,0 +1,524 @@ +/* + * angular-revolution + * https://github.com/Karnith/angular-revolution + + * Version: 1.0.0 - 2015-12-07 + * License: MIT + */ +angular.module("rev.slider", ["rev.slider.tpls"]) + .directive('revSlider', ['$timeout', function ($timeout) { + return { + restrict: 'AE', + transclude: true, + scope: { + sliderType: '@', + sliderLayout: '@', + responsiveLevels: '@', + gridwidth: '@', + gridheight: '@', + autoHeight: '@', + minHeight: '@', + fullScreenOffsetContainer: '@', + fullScreenOffset: '@', + delay: '@', + disableProgressBar: '@', + startDelay: '@', + stopAfterLoops: '@', + stopAtSlide: '@', + viewPort: '@', + lazyType: '@', + dottedOverlay: '@', + shadow: '@', + spinner: '@', + hideAllCaptionAtLilmit: '@', + hideCaptionAtLimit: '@', + hideSliderAtLimit: '@', + debugMode: '@', + extensions: '@', + extensions_suffix: '@extensionssuffix', + fallbacks: '@', + parallax: '@', + revCarousel: '@', + navigation: '@', + jsFileLocation: '@', + visibilityLevels: '@', + hideThumbsOnMobile: '@', + slides: '=' + }, + templateUrl: function(element, attrs) { + return attrs.sliderTemplateUrl || 'template/slider/slider.tpl.html'; + }, + link: function(scope, element, attrs) { + var hasValuesDefined, trueOrFalse; + scope.templateUrl = attrs.sliderTemplateUrl; + trueOrFalse = function(bool) { + if (bool === 'true') { + return true; + } else { + return false; + } + }; + hasValuesDefined = function(value) { + if (angular.isDefined(value)) { + return JSON.parse(value); + } else { + return {}; + } + }; + return $timeout(function() { + var revapi; + revapi = element.show().revolution({ + sliderType: scope.sliderType, + sliderLayout: scope.sliderLayout, + responsiveLevels: hasValuesDefined(scope.responsiveLevels), + gridwidth: hasValuesDefined(scope.gridwidth), + gridheight: hasValuesDefined(scope.gridheight), + autoHeight: scope.autoHeight, + minHeight: scope.minHeight, + fullScreenOffsetContainer: scope.fullScreenOffsetContainer, + fullScreenOffset: scope.fullScreenOffset, + delay: scope.delay, + disableProgressBar: scope.disableProgressBar, + startDelay: scope.startDelay, + stopAfterLoops: scope.stopAfterLoops, + stopAtSlide: scope.stopAtSlide, + viewPort: hasValuesDefined(scope.viewPort), + lazyType: scope.lazyType, + dottedOverlay: scope.dottedOverlay, + shadow: scope.shadow, + spinner: scope.spinner, + hideAllCaptionAtLilmit: scope.hideAllCaptionAtLilmit, + hideCaptionAtLimit: scope.hideCaptionAtLimit, + hideSliderAtLimit: scope.hideSliderAtLimit, + debugMode: trueOrFalse(scope.debugMode), + extensions: scope.extensions, + extensions_suffix: scope.extensions_suffix, + fallbacks: hasValuesDefined(scope.fallbacks), + parallax: hasValuesDefined(scope.parallax), + carousel: hasValuesDefined(scope.carousel), + navigation: hasValuesDefined(scope.navigation), + jsFileLocation: scope.jsFileLocation, + visibilityLevels: hasValuesDefined(scope.visibilityLevels), + hideThumbsOnMobile: scope.hideThumbsOnMobile + }); + return scope.$on('$destroy', function() { + return revapi.revkill(); + }); + }); + } + }; + }]); + +angular.module("rev.slider.tpls", ["template/slider/slider.tpl.html"]); +angular.module("template/slider/slider.tpl.html", []).run(["$templateCache", function($templateCache) { + $templateCache.put('template/slider/slider.tpl.html', + '\n' + + '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '\n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + ' \n' + + '\n' + + '
\n' + + ''); +}]); diff --git a/package.json b/package.json new file mode 100644 index 0000000..9d25e76 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "angular-revolution", + "version": "1.0.0", + "description": "Directive for Slider Revolution plugin from ThemePunch", + "main": "dist/angular-revolution.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/Karnith/angular-revolution.git" + }, + "keywords": [ + "angular", + "slider", + "revolution", + "jquery" + ], + "author": "JCMar", + "license": "MIT", + "bugs": { + "url": "https://github.com/Karnith/angular-revolution/issues" + }, + "homepage": "https://github.com/Karnith/angular-revolution" +}