dynaspan 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc5312b4df9cd626e5ef11f6ca4b5c397041ee37
4
- data.tar.gz: 9f5ddb6ff7138112f92f637dd6b2233b2063201c
3
+ metadata.gz: 50cc54aff7feafb72ee47120cf69fd7fef487184
4
+ data.tar.gz: 958e7bed78526b02eb04564d2ed3a38a20b5882c
5
5
  SHA512:
6
- metadata.gz: 6a16ec5ce589adf54c733a39b4c818674d051ed941456b80aa4817c89bb83a02d73727eef2ed9197bed314a8c27d34ef43d1c8cb8d829a66f505cb29e6f81391
7
- data.tar.gz: 578097b786f0eaee8579e2e8749a1a8c02d39a1dc9ed0831ce406c42d3262fdfa2fa5b537aba8c393a868e8b6cf7654f89e66a609fff08159ac3a7aa2a5c965f
6
+ metadata.gz: 9ad0569db146c7b183b9884f0347d9c4088ba5e9bb9262a27e889732fc814bb74c013e07c578354deca02bb15039668c85e83b42945f18174a67bbc69c007b3d
7
+ data.tar.gz: bc424e98e28c85f82615f38f6cc3cd5badf78952e0173f03b94d3b5686f4351fd1b179541f36733a018c0bf86338ece63d15b4fed47003b7a4d0f9809871bd02
data/README.md CHANGED
@@ -53,6 +53,20 @@ box. If you don't want it to drop you can style it with the proper CSS selector
53
53
  field height is to maintain the position of the edit text. With jQuery you can also set style for
54
54
  hidden and visible changes.
55
55
 
56
+ In version 0.0.7 I've added a class to the parent div object for when the text field dialog is open. The class
57
+ is "ds-dialog-open". This is also to use in CSS styles. This feature was added since CSS doesn't support
58
+ calling parents with selectors. Example usage:
59
+
60
+ ```css
61
+ .ds-content-present > .dyna-span-edit-text {
62
+ margin-top:-18px;
63
+ }
64
+
65
+ .ds-dialog-open > .dyna-span-edit-text {
66
+ margin-top:-24px;
67
+ }
68
+ ```
69
+
56
70
  ###License
57
71
 
58
72
  The MIT License (MIT)
@@ -1,3 +1,3 @@
1
1
  module Dynaspan
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
@@ -10,6 +10,7 @@
10
10
  $.fn.dynaspan.upShow = function(uniq_id_ref){
11
11
  $('#dyna_span_div' + uniq_id_ref).show().find('.dyna-span-input').focus();
12
12
  $('#dyna_span_span' + uniq_id_ref).hide();
13
+ $("#dyna_span_block" + uniq_id_ref).addClass("ds-dialog-open");
13
14
  };
14
15
 
15
16
  $.fn.dynaspan.upHide = function(uniq_id_ref){
@@ -18,10 +19,12 @@
18
19
  $('#last_dyna_span_val_' + uniq_id_ref).val(field_val);
19
20
  $('#dyna_span_span' + uniq_id_ref).show().html(field_val);
20
21
  $('#dyna_span_div' + uniq_id_ref).hide();
22
+ var ds_block = $("#dyna_span_block" + uniq_id_ref);
23
+ ds_block.removeClass("ds-dialog-open");
21
24
  if (field_val.length == 0){
22
- $("#dyna_span_block" + uniq_id_ref).removeClass("ds-content-present")
25
+ ds_block.removeClass("ds-content-present")
23
26
  } else {
24
- $("#dyna_span_block" + uniq_id_ref).addClass("ds-content-present")
27
+ ds_block.addClass("ds-content-present")
25
28
  }
26
29
  };
27
30
  })(jQuery);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynaspan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel P. Clark