server-generated-popups 1.3.6 → 1.3.7

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: 5591100b648748b6c73bee9e54b83e5a827d7295
4
- data.tar.gz: 964ee3450b1f27a25cb0029ad5294dcde66beb51
3
+ metadata.gz: 52fc94fd7a3eaffa5752ed09b7d6cd06a0c6a6d5
4
+ data.tar.gz: eed96a154c24f1938e5543bab2f7f9879b4c19af
5
5
  SHA512:
6
- metadata.gz: dac02d123c73c5ca451fdec23fce567255f7ecb4d39fcca17c5fbe00869116300ad6dfa8c99d60bc1c4279cf91ac9f7d6ca95e1e507a106ce2e0505deb4cf321
7
- data.tar.gz: c567902ac2bb1046f0e0c8317f3784b9c416bf3f523eabdcf12a9799e9bb1cb1981a7067fdb5088665eb9c605c320bf2ec11aec457c1e44b2bd3e3656bffd183
6
+ metadata.gz: b369244fe1cd32357224ada23cf7b969aebed819fc2299e3ac41beabef419b10b1c332f905241dca6871d1ba43956d19a10c742364586d2ed20c1d90322ffd8e
7
+ data.tar.gz: 37d76724e39c3f672f33503b199fe750468d6d6ee2a6eb8243c6d1ba0600ba944209a24c77947e925b52db0277f34c035694b4890cb78f920e3ae5936d4be6d2
@@ -6,12 +6,12 @@ function PopupClass(html, options) {
6
6
  contents = $(html)
7
7
  this.popupWindow = $('<div class="popup"></div>')
8
8
 
9
- options = $.extend({}, {width: 600}, options || {})
10
- actualWidth = Math.min($(window).width(), options.width) // TODO: use CSS
9
+ this.options = $.extend({}, {width: 600}, options || {})
10
+ actualWidth = Math.min($(window).width(), this.options.width) // TODO: use CSS
11
11
  this.popupWindow.css({
12
12
  'width': actualWidth.toString() + 'px',
13
13
  'margin-left': (actualWidth/2 * -1).toString() + 'px',
14
- 'padding': options.padding
14
+ 'padding': this.options.padding
15
15
  })
16
16
  this.popupWindow.append(contents)
17
17
 
@@ -43,6 +43,8 @@ PopupClass.prototype.hideBackdrop = function () {
43
43
  }
44
44
  PopupClass.prototype.createCloseButton = function () {
45
45
  closeButton = $('<div class="closeButton"></div>')
46
+ margin = this.options.padding || '16px'
47
+ closeButton.css({top: margin, right: margin})
46
48
  popupObject = this
47
49
  closeButton.click(function () {
48
50
  popupObject.hide('down')
@@ -18,7 +18,6 @@
18
18
 
19
19
  .closeButton {
20
20
  width: 16px; height: 16px;
21
- top: 16px; right: 16px;
22
21
 
23
22
  position: absolute;
24
23
  cursor: pointer;
@@ -12,7 +12,7 @@ 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.3.6"
15
+ gem.version = "1.3.7"
16
16
 
17
17
  gem.add_runtime_dependency 'jquery-rails'
18
18
  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.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Khamets