common_core_js 0.3.3 → 0.3.4

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
  SHA256:
3
- metadata.gz: e7e5ec56e4fffb8aab8840c9cc1aff9377d1291bd9b82fd91fe57841089d8b9e
4
- data.tar.gz: c688ccfbca5218fdc210ee199b87e5b61f32405179f41268d2776b086e22e58a
3
+ metadata.gz: 9ed403954e1619e60aed2c0c239679b882ded20fab6876557bc370682866e4e9
4
+ data.tar.gz: 82d2eff05dcd520bc721087573fcc01a928651415a66e3b9437e8641082df995
5
5
  SHA512:
6
- metadata.gz: 69bdb23d11a350e5f31b160840dc1f96abf8706a3716df9250e992e1e8cacbfd4b7d10d17be2103fc3f38c1064b178eec7cd2a445ead0c1c5e7269a59188560d
7
- data.tar.gz: 29d5aea167e7cfaba9861758a72c8ecc16883ec1b70d11294e45e4ef89377d5654c12a0dcfbcac4c0d3a1b8abdace463e68fc9ca39f9aedfccbc20b18e470f0a
6
+ metadata.gz: 0d962aeeb62c3a241cb00e774e207f20d6f7d5e0ce73ad18f3d77ee23806531278fcb897172125baf64c234f559b981b40a4e5fbb05e6f96b21c6684eba94e3a
7
+ data.tar.gz: fa77bc758647627c1995163e803646dfd144543881fe623c50ba9b5a9f6689337ba054e928623edf37e933e00bd01dd7c5ea16affdd499cd45a570c8edb5f3c1
@@ -22,7 +22,7 @@ module CommonCoreJs
22
22
 
23
23
  res << form_object.text_field(field_name, class: 'form-control',
24
24
  type: 'date',
25
- value: date_to_current_timezone(value, timezone))
25
+ value: value )
26
26
 
27
27
  res
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module CommonCoreJs
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
@@ -13,7 +13,7 @@ module CommonCore
13
13
  end
14
14
 
15
15
  ".row
16
- .form-group.col-md-4
16
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
17
17
  = f.text_area :#{col.to_s}, class: 'form-control', cols: 40, rows: '#{lines}'
18
18
  %label.form-text
19
19
  #{col.to_s.humanize}\n"
@@ -23,7 +23,7 @@ module CommonCore
23
23
 
24
24
  def field_output(col, type = nil, width)
25
25
  ".row
26
- .form-group.col-md-4
26
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
27
27
  = f.text_field :#{col.to_s}, value: @#{singular}.#{col.to_s}, size: #{width}, class: 'form-control', type: '#{type}'
28
28
  %label.form-text
29
29
  #{col.to_s.humanize}\n"
@@ -397,14 +397,14 @@ module CommonCore
397
397
  end
398
398
 
399
399
  ".row
400
- .form-group.col-md-4
400
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{assoc_name.to_s})}\"}
401
401
  = f.collection_select(:#{col.to_s}, #{assoc_name.titleize}.all, :id, :#{display_column}, {prompt: true, selected: @#{singular}.#{col.to_s} }, class: 'form-control')
402
402
  %label.small.form-text.text-muted
403
403
  #{col.to_s.humanize}"
404
404
 
405
405
  else
406
406
  ".row
407
- .form-group.col-md-4
407
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
408
408
  = f.text_field :#{col.to_s}, value: @#{singular}.#{col.to_s}, class: 'form-control', size: 4, type: 'number'
409
409
  %label.form-text
410
410
  #{col.to_s.humanize}\n"
@@ -427,15 +427,15 @@ module CommonCore
427
427
 
428
428
  when :datetime
429
429
  ".row
430
- .form-group.col-md-4
430
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
431
431
  = datetime_field_localized(f, :#{col.to_s}, @#{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth}.timezone)"
432
432
  when :date
433
433
  ".row
434
- .form-group.col-md-4
434
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
435
435
  = date_field_localized(f, :#{col.to_s}, @#{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth}.timezone)"
436
436
  when :time
437
437
  ".row
438
- .form-group.col-md-4
438
+ %div{class: \"form-group col-md-4 \#{'alert-danger' if #{singular}.errors.details.keys.include?(:#{col.to_s})}\"}
439
439
  = time_field_localized(f, :#{col.to_s}, @#{singular}.#{col.to_s}, '#{col.to_s.humanize}', #{@auth}.timezone)"
440
440
 
441
441
  end
@@ -510,6 +510,7 @@ module CommonCore
510
510
  = #{singular}.#{col}
511
511
  - else
512
512
  %span.alert-danger
513
+ MISSING
513
514
  "
514
515
  when :time
515
516
  " %td
@@ -517,6 +518,7 @@ module CommonCore
517
518
  = #{singular}.#{col}.in_time_zone(current_timezone).strftime('%l:%M %p ') + human_timezone(Time.now, current_timezone)
518
519
  - else
519
520
  %span.alert-danger
521
+ MISSING
520
522
  "
521
523
 
522
524
  end
@@ -1,3 +1,5 @@
1
1
  <%= all_line_fields %>
2
2
  %td
3
- = link_to "Edit <i class='fa fa-1x fa-list-alt'></i>".html_safe, edit_<%= path_helper_singular %>(<%= singular %>), remote: true , disable_with: "Loading...", class: "edit-<%= singular %>-button btn btn-primary pull-right "
3
+ = link_to "Delete <i class='fa fa-1x fa-remove'></i>".html_safe, <%= path_helper_singular %>(<%= singular %>), remote: true ,method: :delete, disable_with: "Loading...", class: "delete-<%= singular %>-button btn btn-primary "
4
+ &nbsp;
5
+ = link_to "Edit <i class='fa fa-1x fa-list-alt'></i>".html_safe, edit_<%= path_helper_singular %>(<%= singular %>), remote: true , disable_with: "Loading...", class: "edit-<%= singular %>-button btn btn-primary "
@@ -1,4 +1,5 @@
1
1
  .container-fluid
2
2
  .row
3
3
  .col-md-12
4
- = render partial: "<%= namespace_with_trailing_dash %><%= plural %>/list", locals: {<%= plural %>: <%= all_objects_root %>.order("created_at DESC").page(1)}
4
+ .<%= singular %>-list
5
+ = render partial: "<%= namespace_with_trailing_dash %><%= plural %>/list", locals: {<%= plural %>: <%= all_objects_root %>.order("created_at DESC").page(1)}
@@ -1,9 +1,9 @@
1
1
 
2
2
  require("jquery")
3
- console.log("loading common core...")
3
+ // console.log("loading common core...")
4
4
 
5
- require("jstimezonedetect/dist/jstz.min")
6
- var JSTZ = require('jstimezonedetect');
5
+ // require("jstimezonedetect/dist/jstz.min")
6
+ // var JSTZ = require('jstimezonedetect');
7
7
 
8
8
 
9
9
 
@@ -0,0 +1,5 @@
1
+ [data-role='close-button'] {
2
+ position: absolute;
3
+ top: 0;
4
+ right: 0;
5
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: common_core_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt