thecore_ui_commons 2.3.4 → 2.3.8

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: 00a17cec4f9a2303e93a0a6d9f8757a8c6d3df430aa0d79b1c218f0d88831e0a
4
- data.tar.gz: b78f6b740d795d96cde5272c959b7b4ec699be48ea66df6f260f3d5dabf99571
3
+ metadata.gz: 76dda6ce54d4a1ec72656300cb58eca4cfef2bdc3f3206ae01e804c8d1faf978
4
+ data.tar.gz: 7ba92d4afc5e66e35a30c319841f11a4fe81d75999e4452722e2911353dd6f78
5
5
  SHA512:
6
- metadata.gz: '099a64bcd24150e97436a6b336cb09b464da3cf39f4d765329c9478438d483dfdd2a0ad605a0a414670f050bedf9ecacf119dbdecb0200645beb5ebf0701a94e'
7
- data.tar.gz: 2fde66df3905ba1ea002471dab0637a6ac06d3f19450072ef5c5beaffa44726e39fee7cc669c2bb3169da79bc9e39d97442142e436fa623df80bc1e4a340cbee
6
+ metadata.gz: 30f64efa419c2af4b260d24e1908d81c01753d637aea19101823e9014d465f71f3c392bb5f673b4887e1851c517e22f88a6a3dc2ae945ace065f1f2cb3c9387d
7
+ data.tar.gz: 30e2603a4df5759e569eb65d5b91c57562e39ce5f2833851a3097fa1c680ade5145bb79f6257ff8c399fea8a8dc00a05ce796fadfa82d8c1357e347b5ec36d45
@@ -1,7 +1,7 @@
1
1
  //= require jquery
2
2
  //= require jquery-ui
3
+ //= require jquery-ui/widget
3
4
  //= require jquery-ui/widgets/dialog
4
- //= require jquery_ujs
5
5
  //= require bootstrap
6
6
  //= require ie
7
7
  //= require timer
@@ -38,6 +38,12 @@
38
38
  background-color: darkred;
39
39
  color: white;
40
40
  }
41
+
42
+ .progress-bar {
43
+ /* Initial width of the progress bar */
44
+ width: 0%;
45
+ background-color: darkgray;
46
+ }
41
47
  </style>
42
48
 
43
49
  <div class="panel panel-default">
@@ -54,7 +60,9 @@
54
60
  <div class="upload-drop-zone" id="<%=target%>">
55
61
 
56
62
  </div>
57
-
63
+ <div class="progress">
64
+ <div class="progress-bar progress-bar-striped" role="progressbar">0%</div>
65
+ </div>
58
66
  <div id="upload-status">
59
67
  </div>
60
68
  </div>
@@ -111,6 +119,26 @@
111
119
  error: function () {
112
120
  $("#<%=target%>-upload-drop-zone-feedback").html($('<i class="fa fa-exclamation-circle" aria-hidden="true"></i>').delay(3000).fadeOut(400));
113
121
  fileupload.init();
122
+ },
123
+ xhr: function () {
124
+ // Credit to https://stackoverflow.com/a/57213032
125
+ var xhr = new XMLHttpRequest();
126
+
127
+ xhr.upload.addEventListener('progress', function(e){
128
+ if(e.lengthComputable){
129
+ var uploadPercent = e.loaded / e.total;
130
+ uploadPercent = (uploadPercent * 100);
131
+
132
+ $('.progress-bar').text(uploadPercent.toFixed(2) + '%');
133
+ $('.progress-bar').width(uploadPercent + '%');
134
+
135
+ if(uploadPercent == 100){
136
+ $('.progress-bar').text('Completed');
137
+ }
138
+ }
139
+ }, false);
140
+
141
+ return xhr;
114
142
  }
115
143
  });
116
144
  // startUpload(e.dataTransfer.files)
@@ -1,44 +1,47 @@
1
1
  require 'date'
2
2
  module Helpers
3
3
  module ChartsHelper
4
- def candlestick_data
5
- @acc = rand(6570..6650)
6
- 60.times.map {|i| [Date.today - 60 + i, ohlc] }.to_h
7
- end
4
+ # Please override this in your gems to add charts, here some
5
+ # working, but commented out charts as example.
6
+
7
+ # def candlestick_data
8
+ # @acc = rand(6570..6650)
9
+ # 60.times.map {|i| [Date.today - 60 + i, ohlc] }.to_h
10
+ # end
8
11
 
9
- def ohlc
10
- open = @acc + rand(-20..20)
11
- high = open + rand(0..100)
12
- low = open - rand(0..100)
13
- @acc = close = open + rand(-((high-low)/3)..((high-low)/2))
14
- [open, high, low, close]
15
- end
12
+ # def ohlc
13
+ # open = @acc + rand(-20..20)
14
+ # high = open + rand(0..100)
15
+ # low = open - rand(0..100)
16
+ # @acc = close = open + rand(-((high-low)/3)..((high-low)/2))
17
+ # [open, high, low, close]
18
+ # end
16
19
 
17
- ### HIGH PRIORITY CHARTS
18
- def charts_high_pie_demo
19
- pie_chart([{name: "Series A", data: 25},{name: "Series B", data: 100},{name: "Series C", data: 200},{name: "Series D", data: 125}], legend: "left")
20
- end
20
+ # ### HIGH PRIORITY CHARTS
21
+ # def charts_high_pie_demo
22
+ # pie_chart([{name: "Series A", data: 25},{name: "Series B", data: 100},{name: "Series C", data: 200},{name: "Series D", data: 125}], legend: "left")
23
+ # end
21
24
 
22
- def charts_high_candlestick_demo
23
- candlestick_options = {plot_options: {candlestick: {colors: {upward: '#3C90EB',downward: '#DF7D46'}}}}
24
- candlestick_chart(candlestick_data, candlestick_options)
25
- end
25
+ # def charts_high_candlestick_demo
26
+ # candlestick_options = {plot_options: {candlestick: {colors: {upward: '#3C90EB',downward: '#DF7D46'}}}}
27
+ # candlestick_chart(candlestick_data, candlestick_options)
28
+ # end
26
29
 
27
- ### MEDIUM PRIORITY CHARTS
28
- def charts_medium_radar_demo
29
- radar_series = [{name: "What it should be",data: { "Code review"=>10, "Issues"=>5, "Pull request"=>25, "Commits"=>60 }},{name: "What it really is",data: { "Code review"=>1, "Issues"=>3, "Pull request"=>7, "Commits"=>89 }}]
30
- radar_chart(radar_series,{title: "GitHub Radar", markers: {size: 4}, theme: 'palette4'})
31
- end
30
+ # ### MEDIUM PRIORITY CHARTS
31
+ # def charts_medium_radar_demo
32
+ # radar_series = [{name: "What it should be",data: { "Code review"=>10, "Issues"=>5, "Pull request"=>25, "Commits"=>60 }},{name: "What it really is",data: { "Code review"=>1, "Issues"=>3, "Pull request"=>7, "Commits"=>89 }}]
33
+ # radar_chart(radar_series,{title: "GitHub Radar", markers: {size: 4}, theme: 'palette4'})
34
+ # end
32
35
 
33
- def charts_medium_bubble_demo
34
- bubble_series = (1..4).map do |n|{name: "Bubble#{n}",data: 20.times.map{[rand(750),rand(10..60),rand(70)]}}end
35
- bubble_chart(bubble_series, data_labels: false, theme: 'palette6')
36
- end
36
+ # def charts_medium_bubble_demo
37
+ # bubble_series = (1..4).map do |n|{name: "Bubble#{n}",data: 20.times.map{[rand(750),rand(10..60),rand(70)]}}end
38
+ # bubble_chart(bubble_series, data_labels: false, theme: 'palette6')
39
+ # end
37
40
 
38
- def charts_medium_range_demo
39
- range_bar_series = [{name: "Series A",data: {'A' => [1, 5],'B' => [4, 6],'C' => [5, 8],'D' => [3, 11]}}, {name: "Series B",data: {'A' => [2, 6],'B' => [1, 3],'C' => [7, 8],'D' => [5, 9]}}]
40
- range_bar_chart(range_bar_series, theme: 'palette3')
41
- end
41
+ # def charts_medium_range_demo
42
+ # range_bar_series = [{name: "Series A",data: {'A' => [1, 5],'B' => [4, 6],'C' => [5, 8],'D' => [3, 11]}}, {name: "Series B",data: {'A' => [2, 6],'B' => [1, 3],'C' => [7, 8],'D' => [5, 9]}}]
43
+ # range_bar_chart(range_bar_series, theme: 'palette3')
44
+ # end
42
45
  end
43
46
  end
44
47
 
@@ -1,4 +1,4 @@
1
1
  en:
2
2
  activerecord:
3
3
  models:
4
- rails_admin_settings/setting: Configurations
4
+ thecore_settings/setting: Configurations
@@ -1,4 +1,4 @@
1
1
  it:
2
2
  activerecord:
3
3
  models:
4
- rails_admin_settings/setting: Configurations
4
+ thecore_settings/setting: Configurations
@@ -19,7 +19,7 @@ module ThecoreUiCommons
19
19
  # Your code goes here...
20
20
 
21
21
  def self.save_files files
22
- # Rails.logger.debug "AAAAAAAAAAA: POST?"
22
+ Rails.logger.debug "AAAAAAAAAAA: POST?"
23
23
  files.each do |pic|
24
24
  # Rails.logger.debug "AAAAAAAAAAA: EACH PIC: #{pic.inspect}"
25
25
  upload_dir = Rails.root.join(Settings.ns(:importer).import_from_folder, 'uploads')
@@ -27,6 +27,7 @@ module ThecoreUiCommons
27
27
  # Rails.logger.debug "AAAAAAAAAAA: Fatto MKDIR di #{upload_dir}"
28
28
  file_to_upload = Rails.root.join(upload_dir, "uploaded-#{Time.now.strftime("%Y%m%d%H%M%S%L")}-#{pic.original_filename}")
29
29
  # Rails.logger.debug "AAAAAAAAAAA: File da uploadare #{file_to_upload}"
30
+ # Rails.logger.debug "AAAAAAAAAAA: File da uploadare esiste? #{File.exists?(file_to_upload)}"
30
31
  File.open(file_to_upload, 'wb') do |file|
31
32
  # Rails.logger.debug "AAAAAAAAAAAAAAAAAA: Dentro alla scrittura"
32
33
  file.write(pic.read)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_ui_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_background_jobs
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  requirements: []
209
- rubygems_version: 3.0.3
209
+ rubygems_version: 3.0.3.1
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: Common artifacts for the UIs.