Skip to content

Commit

Permalink
## v0.3.2
Browse files Browse the repository at this point in the history
* Now icons are setted as CSS classes.
* Fixed minification errors.
* Added gitignore, package.json and Gruntfile.
  • Loading branch information
Elecash committed Apr 20, 2014
1 parent 0691bbc commit 8074752
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
================

## v0.3.2
* Now icons are setted as CSS classes.
* Fixed minification errors.
* Added gitignore, package.json and Gruntfile.

## v0.3.1
* Added support for minification.
* Added minified version.
Expand Down
35 changes: 35 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
release: {
options: {
//bump: false, //default: true
//file: 'component.json', //default: package.json
//add: false, //default: true
//commit: false, //default: true
//tag: false, //default: true
//push: false, //default: true
//pushTags: false, //default: true
//npmtag: true, //default: no tag
//folder: 'folder/to/publish/to/npm', //default project root
//commitMessage: 'check out my release <%= version %>', //default: 'release <%= version %>'
//tagMessage: 'tagging version <%= version %>', //default: 'Version <%= version %>',

file: 'bower.json', //default: package.json
npm: false, //default: true
tagName: 'v<%= version %>', //default: '<%= version %>'
github: {
repo: '2fdevs/bower-videogular-overlay-play', //put your user/repo here
usernameVar: 'GITHUB_USERNAME', //ENVIRONMENT VARIABLE that contains Github username
passwordVar: 'GITHUB_PASSWORD' //ENVIRONMENT VARIABLE that contains Github password
}
}
},
});

grunt.loadNpmTasks('grunt-release');

grunt.registerTask('major', ['release:major']);
grunt.registerTask('minor', ['release:minor']);
grunt.registerTask('patch', ['release:patch']);
};
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "videogular-overlay-play",
"version": "0.3.0",
"version": "0.3.1",
"main": "./overlay-play.js",
"dependencies": {
"videogular": "latest"
Expand Down
23 changes: 10 additions & 13 deletions overlay-play.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,41 @@ angular.module("com.2fdevs.videogular.plugins.overlayplay", [])
scope: {
vgPlayIcon: "="
},
controller: function ($scope){
$scope.playIcon = $.parseHTML($scope.vgPlayIcon)[0].data;
$scope.currentIcon = $scope.playIcon;
},
template: "<div class='overlayPlayContainer'>"+
"<div class='iconButton'>{{currentIcon}}</div>"+
"</div>"
,
template:
"<div class='overlayPlayContainer'>"+
"<div class='iconButton' ng-class='overlayPlayIcon'></div>"+
"</div>",
link: function(scope, elem, attr, API) {
function onComplete(target, params) {
scope.currentIcon = scope.playIcon;
scope.overlayPlayIcon = scope.playIcon;
}

function onClickOverlayPlay(event) {
API.playPause();
}

function onPlay(target, params) {
scope.currentIcon = "";
scope.overlayPlayIcon = {};
}

function onChangeState(target, params) {
switch (params[0]) {
case VG_STATES.PLAY:
scope.currentIcon = "";
scope.overlayPlayIcon = {};
break;

case VG_STATES.PAUSE:
scope.currentIcon = scope.playIcon;
scope.overlayPlayIcon = {play: true};
break;

case VG_STATES.STOP:
scope.currentIcon = scope.playIcon;
scope.overlayPlayIcon = {play: true};
break;
}
}

elem.bind("click", onClickOverlayPlay);
scope.overlayPlayIcon = {play: true};

API.$on(VG_EVENTS.ON_PLAY, onPlay);
API.$on(VG_EVENTS.ON_SET_STATE, onChangeState);
Expand Down
3 changes: 1 addition & 2 deletions overlay-play.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "videogular",
"version": "0.3.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-release": "~0.7.0"
},
"engines": {
"node": ">=0.8.0"
},
"scripts": {
"test": "grunt test"
}
}

0 comments on commit 8074752

Please sign in to comment.