caboose-cms 0.7.83 → 0.7.84

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: 5f7134595e82eab6150c6c24ee82c0fff9c39845
4
- data.tar.gz: ad14e7624de3cae7fcb7fe3d6664af11bb5732a8
3
+ metadata.gz: e26ea9684ed67352289454d78363dc87365c7304
4
+ data.tar.gz: 901ac00e18c77df7b38d3998e0ecaca611096536
5
5
  SHA512:
6
- metadata.gz: 38c658b6f26840717cabd52da7c463df939cdc072752b36d59d4c47a3e6573983639bf4e7ca168800d78f5098da2f58139d3be3178242ed2459b7bd8905c650f
7
- data.tar.gz: 5b0ae8114f3bbbfdbcf6b3334dea0fcdaa1de2e08b5cc0cdb7921e64c953c5730d699668ea694d1e1cd1842e217abc0739460db5aead07289c831987bf245efb
6
+ metadata.gz: 2fbba346db6d45291f8119d8018035bb28ec26da722ed2fd3484bbba9b203e69f4615d336b51e3628ee720b1320188eceb2d6e9f0188f7edcca71fa324aa8154
7
+ data.tar.gz: c625c160661a5358d143eae93a182092bf09206f8c9fa3c9c2dc86a175b27946cca9afa843eb5ade23b2efe3c87b3c19b1d35e4636680197bdfc468665eaaf51
@@ -866,9 +866,9 @@ IndexTable.prototype = {
866
866
  });
867
867
  form.append(select);
868
868
  }
869
- else
869
+ else // text
870
870
  {
871
- form.append($('<p/>').append($('<input/>').attr('type', 'text').attr('name', f.name).attr('placeholder', f.nice_name).css('width', '' + f.width + 'px')));
871
+ form.append($('<p/>').append($('<input/>').attr('type', 'text').attr('id', 'new_form_' + f.name).attr('name', f.name).attr('placeholder', f.nice_name).css('width', '' + f.width + 'px')));
872
872
  if (!focus_field)
873
873
  focus_field = f.name;
874
874
  }
@@ -881,7 +881,19 @@ IndexTable.prototype = {
881
881
  var div = $('<div/>').addClass('note')
882
882
  .append($('<h2/>').css('margin-top', 0).css('padding-top', 0).html(that.new_model_text))
883
883
  .append(form);
884
- that.show_message(div, null, function() { $('#new_form input[name="' + focus_field + '"]').focus(); });
884
+ that.show_message(div, null, function() {
885
+ $('#new_form input[name="' + focus_field + '"]').focus();
886
+
887
+ $.each(that.new_model_fields, function(i, f) {
888
+ if (f.type == 'date')
889
+ {
890
+ $('#new_form_' + f.name).datetimepicker({
891
+ format: f.date_format ? f.date_format : 'm/d/Y',
892
+ timepicker: false
893
+ });
894
+ }
895
+ });
896
+ });
885
897
  },
886
898
 
887
899
  add_model: function()
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.7.83'
2
+ VERSION = '0.7.84'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.83
4
+ version: 0.7.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-13 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg