templus_models 1.0.6 → 1.2.0

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: 020e38041e0105923344497bd5ae455c40a4cb4c
4
- data.tar.gz: 7b85e50d5b2afaf0cd427961003b156bb510da53
3
+ metadata.gz: 2ac386fc845b92961fac47a0e89fd6420d40897a
4
+ data.tar.gz: ab9e8bbb94a00c9b28521deafed3a7a9d3453a8a
5
5
  SHA512:
6
- metadata.gz: 98736d10babbc0cbcd73dd97ba6b67b347b7e48fedd0b9fd978b9859ca19b2b39246d66506c24524bf96e60710847abd05c638d0e9eec1dd856e3996cfef2113
7
- data.tar.gz: bc5b4d03b955b4a23ff9a6bdbe9a6a542d3ad8e01cc9eb22375d5abe68c62a955de641fa7459cbe0476bdce19c2715d15d23e5869d1a650352ecb7932404ce62
6
+ metadata.gz: 0cc636beaf47d4017038eaf9853f1860256976d6db20618ba27c6f14f89a3c260e4dcdef6b311d22cdacac80fa2b287d80c888fcbc120ea7c41e890eba82e10f
7
+ data.tar.gz: 80bf42bbc135abc70ca2e38d73bcc38cfc89f0931e92f6e2766ace90478388b682d8fb960fd2fb5fbf8e64c69227459bf373adbe8014efe268007b69cfda738d
@@ -1,65 +1,3 @@
1
- //= require permissoes
2
-
3
- function atualiza_campos_crud(){
4
- $('.datepicker').datepicker({
5
- todayBtn: "linked",
6
- keyboardNavigation: false,
7
- forceParse: false,
8
- calendarWeeks: true,
9
- autoclose: true
10
- });
11
-
12
- $('.i-checks').iCheck({
13
- checkboxClass: 'icheckbox_square-green',
14
- radioClass: 'iradio_square-green'
15
- });
16
-
17
-
18
- $('.raro_date_range').daterangepicker({
19
- format: 'DD/MM/YYYY',
20
- ranges: {
21
- 'Hoje': [moment(), moment()],
22
- 'Ontem': [moment().subtract('days', 1), moment().subtract('days', 1)],
23
- 'Últimos 7 dias': [moment().subtract('days', 6), moment()],
24
- 'Últimos 30 dias': [moment().subtract('days', 29), moment()],
25
- 'Este Mês': [moment().startOf('month'), moment().endOf('month')],
26
- 'Mês Passado': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
27
- },
28
-
29
- startDate: moment().subtract('days', 60),
30
- endDate: moment()
31
-
32
- },function(start, end) {
33
- $($(document.getElementById(this.element.context.id)).data('start-target')).val(start.format('YYYY-MM-DD 00:00'))
34
- $($(document.getElementById(this.element.context.id)).data('end-target')).val(end.format('YYYY-MM-DD 23:59'))
35
- }
36
- );
37
-
38
- $(".sidebar-collapse").find("li.childreen").click(function (){
39
- var menu = $(this);
40
- $("li.active").removeClass("active");
41
- menu.addClass("active");
42
- if(menu.parent().parent().hasClass("parent-menu")){
43
- menu.parent().parent().addClass("active");
44
- }
45
- });
46
-
47
- $(document).on('click', '[data-toggle="modal"]', function (e) {
48
- $('.modal-backdrop').appendTo("body");
49
- });
50
-
51
- $('.modal').appendTo("body");
52
-
53
- $('.crud-new-record').click(function(){
54
- var select = $(this).siblings().last().find('select')
55
- var id = select.attr('id')
56
- var name = select.attr('name')
57
- new_record(id,name)
58
- return false;
59
- })
60
-
61
- };
62
-
63
1
  function new_record(id,name){
64
2
  var model_name = name.split("[")[1].split("_id]")[0];
65
3
 
@@ -79,8 +17,8 @@ function new_record(id,name){
79
17
  var entity_desc = $(model_target).attr('data-entity-name')
80
18
  var entity_id = $(model_target).attr('data-entity-id')
81
19
  $('#' + id).append($('<option>', {
82
- value: entity_id,
83
- text: entity_desc,
20
+ value: entity_id,
21
+ text: entity_desc,
84
22
  selected: 'selected'
85
23
  }));
86
24
  $(model_target).attr('data-saved','false');
@@ -31,13 +31,9 @@
31
31
  <div class="ibox-title">
32
32
  <% unless content_for? :title %>
33
33
  <% if is_action_edit? && @model.present?%>
34
- <h5>Editar
35
- <small> você pode editar todos os seus dados. <%=@model.name.humanize %></small>
36
- </h5>
34
+ <h5>Editar</h5>
37
35
  <% elsif is_action_create? && @model.present? %>
38
- <h5>Cadastrar
39
- <small> você pode cadastrar todos os seus dados. <%=@model.name.humanize %></small>
40
- </h5>
36
+ <h5>Cadastrar</h5>
41
37
  <% elsif is_action_show? && @crud_helper.present? %>
42
38
  <h5><%= @crud_helper.subtitle(:show) %>
43
39
  <small><%= @crud_helper.description(:show) %></small>
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "1.0.6"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: templus_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Sol
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-16 00:00:00.000000000 Z
12
+ date: 2015-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails