zuora_connect_ui 0.2.13 → 0.3.0

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: 09427e329b031e4984dc69dc68d0b304002f7101
4
- data.tar.gz: 6457bc1ebfbafe5504047978bfd326b45add3e89
3
+ metadata.gz: e251112f70f996c04b020c1d21c2b1ff60377660
4
+ data.tar.gz: f1525e84c44a06ea74c41a730e715691a713855b
5
5
  SHA512:
6
- metadata.gz: cdc767581470577bf9d5f685d1d44b77ca0069bf8e2cf314a39bc013c97b4c6acb83af94ffcf468631c11a33a0e97a63d04180d02246de9bdf559cc8114cb901
7
- data.tar.gz: 0b7a5c668abbd5f40eff0305e3e8f742d4ca0da7d4127a33e6dc2b8c197367de8878289c0dea4eccd9516f15f343fa358252b01f2817fa2b3bdbd4ab658a6d15
6
+ metadata.gz: 72ed47ab88443bddb5e1b22a6fea4055db23c90728a7f2fe8f827321739e67eec3704982493576ac41460ceac12dbb754eaf2b775bcec5e4212d6ca804a0f4ff
7
+ data.tar.gz: 16e016e3fabc2bd7c6305ab77d1c3590f2f3000caa32cab73a3d55500d0d1e6a340549dbafb772da5248365747dc471168c9520a0815c533351d606c540196b7
data/README.md CHANGED
@@ -28,6 +28,23 @@ $ gem install zuora_connect_ui
28
28
 
29
29
  ## Usage
30
30
 
31
+ ### HTML Imports
32
+
33
+ Add to `<head>` in `layouts/application.html.erb`
34
+
35
+ ```erb
36
+ <%= stylesheet_link_tag "application", :media => "all"%>
37
+ <%= javascript_include_tag "application" %>
38
+ <%= zuo_include_tag %> <!-- ADD THIS LINE WHEN UPGRADING ABOVE VERSION 0.3 -->
39
+ <%= yield :head %>
40
+ ```
41
+
42
+ If these lines are in the `<head>`, **they are no longer necesary** as of version 0.2.9
43
+ ```html
44
+ <link href="https://fonts.googleapis.com/css?family=Muli:400,600,700" rel="stylesheet">
45
+ <link href="https://d3ntcvh9ql14ma.cloudfront.net/zui/1.4.0/css/zui.icons.css" rel="stylesheet">
46
+ ```
47
+
31
48
  ### SCSS Imports
32
49
 
33
50
  Add to `app/assets/stylesheets/application.scss`
@@ -238,6 +255,8 @@ Label does not need the `for` html attribute, however the `div.radio` is require
238
255
 
239
256
  ### Date Picker
240
257
 
258
+ **UPGRADING to 0.3+: ensure that [HTML import is present](#html-imports)**
259
+
241
260
  ```erb
242
261
  <div class="zuo-datepicker date">
243
262
  <%= f.text_field :Start_Date, value: Date.yesterday, class: "zuo-textbox" %>
@@ -15,11 +15,6 @@
15
15
  //= require select2_locale_fr
16
16
  //= require select2_locale_zh-CN
17
17
  //
18
- //
19
- // Bootstrap Datepicker
20
- //
21
- //= require bootstrap-datepicker
22
- //
23
18
  // Datatables
24
19
  //
25
20
  //= require dataTables/jquery.dataTables
@@ -38,4 +33,3 @@
38
33
  //= require zuora_connect_ui/datatable
39
34
  //= require zuora_connect_ui/input
40
35
  //= require zuora_connect_ui/iframe
41
- //
@@ -175,7 +175,11 @@ function initSearch(api, tableName) {
175
175
  });
176
176
 
177
177
  let timer;
178
- $(`#${tableName}_content input[name="table[search]"]`).keydown(function() {
178
+ $(`#${tableName}_content input[name="table[search]"]`).keydown(function(e) {
179
+ if (e.keyCode == 13) {
180
+ e.preventDefault();
181
+ return false;
182
+ }
179
183
  clearTimeout(timer);
180
184
  if ($(this).val()) {
181
185
  timer = setTimeout(function() {
@@ -142,7 +142,7 @@ $check-icon: "\E936";
142
142
  @import "select2-bootstrap";
143
143
 
144
144
  // Bootstrap Datepicker
145
- @import "bootstrap-datepicker";
145
+ @import url("https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.min.css");
146
146
 
147
147
  // contextMenu
148
148
  @import "css/jquery.contextMenu.min.scss";
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ZuoraConnectUi
4
+ # General helpers for application level
5
+ module ApplicationHelper
6
+ def zuo_include_tag
7
+ JAVASCRIPT_INCLUDE
8
+ end
9
+
10
+ JAVASCRIPT_INCLUDE = %w[
11
+ https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js
12
+ https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/locales/bootstrap-datepicker.ja.min.js
13
+ https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/locales/bootstrap-datepicker.it.min.js
14
+ https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/locales/bootstrap-datepicker.zh-CN.min.js
15
+ ].map { |link| '<script src="' + link + '"></script>' }.join("\n").html_safe
16
+ end
17
+ end
@@ -2,7 +2,6 @@ require 'zuora_connect_ui/version'
2
2
  require 'jquery-ui-rails'
3
3
  require 'bootstrap-sass'
4
4
  require 'select2-rails'
5
- require 'bootstrap-datepicker-rails'
6
5
  require 'jquery-datatables-rails'
7
6
  require 'peek'
8
7
  require 'peek/views/connect'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ZuoraConnectUi
4
- VERSION = '0.2.13'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zuora_connect_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Connect Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-04 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-sass
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: bootstrap-datepicker-rails
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: jquery-datatables-rails
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +150,7 @@ files:
164
150
  - app/assets/stylesheets/zuora_connect_ui/tabs.scss
165
151
  - app/helpers/datatable_helper.rb
166
152
  - app/helpers/input_helper.rb
153
+ - app/helpers/zuora_connect_ui/application_helper.rb
167
154
  - app/views/partials/_admin_menu.html.erb
168
155
  - app/views/partials/_filters.html.erb
169
156
  - app/views/partials/_row_actions.html.erb