platformx 0.0.9.2 → 0.0.9.3

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: 7124967b2a7204c719a5363dd1273ff7b5f742f9
4
- data.tar.gz: e43da8713af2ee4873dc8a142a41eba98ef5ef15
3
+ metadata.gz: 4e45267f019c40fe488e3c7070de36a90dc01ad3
4
+ data.tar.gz: 6aa48716a5a1c95d4ddce54cfb2d1974667e54e7
5
5
  SHA512:
6
- metadata.gz: fae05630d353037b5c980b523242f286e20f4e14eebdb28b6cc2c92ae61b50ccd52c82a4899f24323f060732ef7ff511a9783949bc373857072f2fd2d10e5041
7
- data.tar.gz: 3e528cae42329ec8421eccb0cd21c5cb29fee833a66deea5871592658040a580b645ac94d7a33bcb3caf03d2ba88558265c7e55737b3782da549482715e937f7
6
+ metadata.gz: 25949836328f197df1e3ad52fda8341837d740c03509f0d91ff52a3bf4dccc704f66ab771c83daa010312d08d6c5c978ac92abf10533c27bbb55dd91b69c1f26
7
+ data.tar.gz: db2b5c0b1c8d16db3e6377074923141005599d75cdc29f998423d5549442711f3312ab1bc793ae443b4a151b4fb5357f77cc976a3e385118494a108b2c00c8fc
@@ -451,7 +451,7 @@ EOS
451
451
  # @param mask [String] ssn input mask
452
452
  # @param maxlength [String] nuber input max length
453
453
  # @return [String] compiled html of ssn input
454
- def x_ssn(id: "", name: "", value: "", label: "", required: false, placeholder: "", mask: "999-99-9999", maxlength: "11")
454
+ def x_ssn(id: "", name: "", value: "", label: "", required: false, placeholder: "", mask: "999-99-9999")
455
455
 
456
456
  if required
457
457
  if label != ""
@@ -473,14 +473,11 @@ EOS
473
473
  mask = "data-masked-input='#{mask}'"
474
474
  end
475
475
 
476
- if maxlength != ""
477
- maxlength = "maxlength='#{maxlength}'"
478
- end
479
476
 
480
477
  tb = <<EOS
481
478
  <div class="form-group">
482
479
  #{label}
483
- <input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} #{maxlength} />
480
+ <input type="text" class="form-control ssn" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} data-parsley-minlength="11" placeholder="#{placeholder}" #{mask} />
484
481
  </div>
485
482
  EOS
486
483
  return tb
@@ -525,7 +522,7 @@ EOS
525
522
  tb = <<EOS
526
523
  <div class="form-group">
527
524
  #{label}
528
- <input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} #{maxlength} />
525
+ <input type="text" class="form-control ein" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} data-parsley-minlength="10" placeholder="#{placeholder}" #{mask} #{maxlength} />
529
526
  </div>
530
527
  EOS
531
528
  return tb
@@ -570,7 +567,7 @@ EOS
570
567
  tb = <<EOS
571
568
  <div class="form-group">
572
569
  #{label}
573
- <input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} data-parsley-range="[10000,99999]" />
570
+ <input type="text" class="form-control zip" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} data-parsley-range="[10000,99999]" />
574
571
  </div>
575
572
  EOS
576
573
  return tb
@@ -586,7 +583,7 @@ EOS
586
583
  # @param mask [String] state input mask
587
584
  # @param maxlength [String] nuber input max length
588
585
  # @return [String] compiled html of state input
589
- def x_state(id: "", name: "", value: "", label: "", required: false, placeholder: "", mask: "**", maxlength: "2")
586
+ def x_state(id: "", name: "", value: "", label: "", required: false, placeholder: "", mask: "aa", maxlength: "2")
590
587
 
591
588
  if required
592
589
  if label != ""
@@ -615,7 +612,7 @@ EOS
615
612
  tb = <<EOS
616
613
  <div class="form-group">
617
614
  #{label}
618
- <input type="text" class="form-control" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} placeholder="#{placeholder}" #{mask} #{maxlength} />
615
+ <input type="text" class="form-control state" id="#{id}" name="post[#{name}]" value="#{value}" #{required_tag} data-parsley-pattern="^[A-Za-z]*$" data-parsley-minlength="2" placeholder="#{placeholder}" #{maxlength} />
619
616
  </div>
620
617
  EOS
621
618
  return tb
@@ -1318,11 +1315,12 @@ EOS
1318
1315
  # @param title [String] title of the select
1319
1316
  # @param multple [Boolean] if multiple selection is enabled
1320
1317
  # @return [String] compiled select drop down
1321
- def x_select(id: "", name: "", value: "",name_col: "name", value_col: "id", label: "", css: "selectpicker", menu_style: "dropdown-blue", style: "btn-default btn-block", option_data: "", option_name: "name", option_value: "id", selected_value: "", title: "", multiple: false, add_none: false, required: false)
1318
+ def x_select(id: "", name: "", value: "",name_col: "name", value_col: "id", label: "", css: "selectpicker", menu_style: "dropdown-blue", style: "btn-default btn-block", option_data: "", option_name: "name", option_value: "id", selected_value: "", title: "", multiple: false, add_none: false, required: false, menu_size: 0, live_search: false)
1322
1319
 
1323
1320
  options_html = ""
1324
1321
  show_multiple = ""
1325
1322
  add_none_option = ""
1323
+ live_search_html = ""
1326
1324
 
1327
1325
  if multiple == true
1328
1326
  show_multiple = "Multiple"
@@ -1373,10 +1371,20 @@ EOS
1373
1371
  add_none_option = "<option value=''>Select One</option>"
1374
1372
  end
1375
1373
 
1374
+ if menu_size == 0
1375
+ menu_size_html = ""
1376
+ else
1377
+ menu_size_html = "data-size='#{menu_size}'"
1378
+ end
1379
+
1380
+ if live_search == true
1381
+ live_search_html = "data-live-search='true'"
1382
+ end
1383
+
1376
1384
  select = <<EOS
1377
1385
  <div class="form-group">
1378
1386
  <label>#{label}#{required_output}</label>
1379
- <select id="#{id}" name="post[#{name}]#{multiple_name}" class="#{css}" data-title="#{title}" title="#{title}" data-style="#{style}" data-menu-style="#{menu_style}" #{show_multiple}" #{required_tag}>
1387
+ <select id="#{id}" name="post[#{name}]#{multiple_name}" class="#{css}" data-title="#{title}" title="#{title}" data-style="#{style}" data-menu-style="#{menu_style}" #{show_multiple}" #{required_tag} #{menu_size_html} data-container=".content" #{live_search_html}>
1380
1388
  #{add_none_option}
1381
1389
  #{options_html}
1382
1390
  </select>
@@ -1,3 +1,3 @@
1
1
  module Platformx
2
- VERSION = "0.0.9.2"
2
+ VERSION = "0.0.9.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platformx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.2
4
+ version: 0.0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - timmushen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler