server-generated-popups 1.1.9 → 1.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 049e6a501a8031864eaa16b00b64b256135b5abe
4
- data.tar.gz: 14282035b5ee7b6d3dc7872023cd3e0bcc431bd7
3
+ metadata.gz: 81c141d306d989a9d4f5b84c0767257a36538e4d
4
+ data.tar.gz: f0a9cb33e5732d2fbb76bdc684447ca99cf95b2c
5
5
  SHA512:
6
- metadata.gz: 6b63fcf716b5de51c350e3424f5ffdb3d4c9919b4c92a11c1e2c67d9cdc1e5127f4e7707003bca16c5299d791b4e5e2df7d27d5d53c3900f2783f44f2a248063
7
- data.tar.gz: 0c8c8dfbede3704d7a169fa909a11de3fde993084f968bf049d0b4a6fe0d5f7ee2c66e4641bd0d7306b8f679d6d83956e448a6398fbe1d892d76dae1e1fd7b5c
6
+ metadata.gz: 5d24a6db486a9e6d4ee8103b9b3a0efbe7bbb7db897fb15f15699678c3f1db26de29c5b97f85d2b990f2183893781ad5418ec008319a2276c4992e9cd76b3651
7
+ data.tar.gz: 4da2429b2ec4167f5bc717c69cda86a653add8642218d0c3fb66977052ae7a2a1f1dd27232c03e2dba7a612d9398d0f1bc85ed53eee8904ebab740bbee1e0f28
@@ -12,10 +12,11 @@ function PopupClass(html, options) {
12
12
  'margin-left': (options.width/2 * -1).toString() + 'px'
13
13
  })
14
14
  this.popupWindow.append(contents)
15
+ }
15
16
 
16
- this.distanceFromTop = ($(window).height() - this.popupWindow.height())/2
17
+ PopupClass.prototype.distanceFromTop = function () {
18
+ return ($(window).height() - this.popupWindow.height())/2
17
19
  }
18
-
19
20
  PopupClass.prototype.move = function (from, to, callback) {
20
21
  this.popupWindow.css('top', from)
21
22
  this.popupWindow.animate({top: to}, callback)
@@ -24,12 +25,12 @@ PopupClass.prototype.move = function (from, to, callback) {
24
25
  PopupClass.prototype.show = function (direction, callback) {
25
26
  $('body').append(this.popupWindow)
26
27
  startFrom = (direction == 'up') ? '180%' : '-80%'
27
- this.move(startFrom, this.distanceFromTop, callback)
28
+ this.move(startFrom, this.distanceFromTop(), callback)
28
29
  return this;
29
30
  }
30
31
  PopupClass.prototype.hide = function (direction) {
31
32
  moveTo = (direction == 'down') ? '180%' : '-80%'
32
- this.move(this.distanceFromTop, moveTo, function () {
33
+ this.move(this.distanceFromTop(), moveTo, function () {
33
34
  this.remove() // this == $('.popup') here
34
35
  })
35
36
  }
@@ -12,5 +12,5 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = "server-generated-popups"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "1.1.9"
15
+ gem.version = "1.1.10"
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: server-generated-popups
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Khamets