Skip to content

Commit b952906

Browse files
committed
Fix the skip button
Delete the last object when you create a new object
1 parent bf96fc0 commit b952906

File tree

10 files changed

+1569
-1428
lines changed

10 files changed

+1569
-1428
lines changed

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory":"lib"
3+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/*
2+
lib/*

Gruntfile.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = function(grunt){
2+
grunt.initConfig({
3+
pkg: grunt.file.readJSON('bower.json'),
4+
concat:{
5+
options: {
6+
separator: ';'
7+
},
8+
dist:{
9+
src:['src/*.js', 'lib/kinetic/kinetic.min.js'],
10+
dest: '<%= pkg.name %>.js'
11+
}
12+
},
13+
uglify: {
14+
main: {
15+
files: {
16+
'<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
17+
}
18+
}
19+
},
20+
jshint: {
21+
files: ['Gruntfile.js', 'src/*.js'],
22+
options: {
23+
"eqnull": true,
24+
"globals": {
25+
jQuery: true,
26+
console: true,
27+
module: true
28+
}
29+
}
30+
}
31+
});
32+
33+
grunt.loadNpmTasks('grunt-contrib-uglify');
34+
grunt.loadNpmTasks('grunt-contrib-jshint');
35+
grunt.loadNpmTasks('grunt-contrib-concat');
36+
37+
};

bower.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,9 @@
2020
"bower_components",
2121
"test",
2222
"tests"
23-
]
23+
],
24+
"dependencies": {
25+
"jquery": "~2.1.3",
26+
"kinetic": "~5.2.0"
27+
}
2428
}

enjoyhint.js

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

enjoyhint.min.js

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

package.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "enjoyhint",
3+
"version": "1.0.0",
4+
"description": "Web-tool that provides the simplest way to create interactive tutorials and hints.",
5+
"main": "enjoyhint.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/xbsoftware/enjoyhint.git"
12+
},
13+
"keywords": [
14+
"enjoyhint",
15+
"hint",
16+
"xbs",
17+
"tutorials"
18+
],
19+
"author": "XB Software",
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/xbsoftware/enjoyhint/issues"
23+
},
24+
"homepage": "https://github.com/xbsoftware/enjoyhint"
25+
}

src/enjoyhint.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ var EnjoyHint = function(_options){
1919

2020
/********************* PRIVAT METHODS ***************************************/
2121
var init = function(){
22+
if ($('.enjoyhint'))
23+
$('.enjoyhint').remove();
2224
$body.enjoyhint({
2325
onNextClick:function(){
2426
current_step++;
@@ -29,9 +31,15 @@ var EnjoyHint = function(_options){
2931
var $element = $(step_data.selector);
3032
off(step_data.event);
3133
$element.off(makeEventName(step_data.event));
34+
destroyEnjoy();
3235
}
3336
});
3437
};
38+
39+
var destroyEnjoy = function () {
40+
$body = $('body');
41+
$('.enjoyhint').remove();
42+
};
3543

3644
var $body = $('body');
3745
var stepAction = function(){
@@ -124,6 +132,7 @@ var EnjoyHint = function(_options){
124132
} else {
125133
$body.enjoyhint('hide');
126134
options.onEnd();
135+
destroyEnjoy();
127136
}
128137

129138
};

src/jquery.enjoyhint.css

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@font-face {
22
font-family: 'casino_handregular';
3-
src: url('Casino_Hand/casino_hand-webfont.eot');
4-
src: url('Casino_Hand/casino_hand-webfont.eot?#iefix') format('embedded-opentype'),
5-
url('Casino_Hand/casino_hand-webfont.woff') format('woff'),
6-
url('Casino_Hand/casino_hand-webfont.ttf') format('truetype'),
7-
url('Casino_Hand/casino_hand-webfont.svg#casino_handregular') format('svg');
3+
src: url('src/Casino_Hand/casino_hand-webfont.eot');
4+
src: url('src/Casino_Hand/casino_hand-webfont.eot?#iefix') format('embedded-opentype'),
5+
url('src/Casino_Hand/casino_hand-webfont.woff') format('woff'),
6+
url('src/Casino_Hand/casino_hand-webfont.ttf') format('truetype'),
7+
url('src/Casino_Hand/casino_hand-webfont.svg#casino_handregular') format('svg');
88
font-weight: normal;
99
font-style: normal;
1010

@@ -35,12 +35,31 @@
3535
}
3636

3737
.enjoyhint_skip_btn{
38-
position:absolute;
39-
bottom:40px;
40-
right:40px;
41-
z-index: 1012;
42-
/*display: none;*/
43-
pointer-events: all;
38+
position:absolute;
39+
z-index: 1012;
40+
/*display: none;*/
41+
pointer-events: all;
42+
-webkit-box-sizing: content-box;
43+
-moz-box-sizing: content-box;
44+
box-sizing: content-box;
45+
width: 100px;
46+
height: 40px;
47+
cursor: pointer;
48+
margin: 0 auto;
49+
border: 2px solid rgb(30,205,151);
50+
-webkit-border-radius: 40px;
51+
border-radius: 40px;
52+
font: normal normal normal 17px/40px "Advent Pro", Helvetica, sans-serif;
53+
color: rgb(30, 205, 151);
54+
text-align: center;
55+
-o-text-overflow: clip;
56+
text-overflow: clip;
57+
letter-spacing: 1px;
58+
background: rgba(0,0,0,0);
59+
-webkit-transition: background-color 0.3s cubic-bezier(0, 0, 0, 0), color 0.3s cubic-bezier(0, 0, 0, 0), width 0.3s cubic-bezier(0, 0, 0, 0), border-width 0.3s cubic-bezier(0, 0, 0, 0), border-color 0.3s cubic-bezier(0, 0, 0, 0);
60+
-moz-transition: background-color 0.3s cubic-bezier(0, 0, 0, 0), color 0.3s cubic-bezier(0, 0, 0, 0), width 0.3s cubic-bezier(0, 0, 0, 0), border-width 0.3s cubic-bezier(0, 0, 0, 0), border-color 0.3s cubic-bezier(0, 0, 0, 0);
61+
-o-transition: background-color 0.3s cubic-bezier(0, 0, 0, 0), color 0.3s cubic-bezier(0, 0, 0, 0), width 0.3s cubic-bezier(0, 0, 0, 0), border-width 0.3s cubic-bezier(0, 0, 0, 0), border-color 0.3s cubic-bezier(0, 0, 0, 0);
62+
transition: background-color 0.3s cubic-bezier(0, 0, 0, 0), color 0.3s cubic-bezier(0, 0, 0, 0), width 0.3s cubic-bezier(0, 0, 0, 0), border-width 0.3s cubic-bezier(0, 0, 0, 0), border-color 0.3s cubic-bezier(0, 0, 0, 0);
4463
}
4564
.enjoyhint_next_btn{
4665
position:absolute;

0 commit comments

Comments
 (0)