Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0084c86

Browse files
committed
Merge branch 'release/5.4.1'
2 parents 43abb09 + cc1f80f commit 0084c86

File tree

20 files changed

+305
-54
lines changed

20 files changed

+305
-54
lines changed

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 5.4.1 (December 1, 2020)
4+
- Update "Dummy" App with examples
5+
36
## 5.4.0 (October 26, 2020)
47
- Support for uploading multiple files
58

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.4.0
1+
5.4.1

‎lib/filestack_rails/version.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module FilestackRails
2-
VERSION = '5.4.0'
2+
VERSION = '5.4.1'
33
end

‎spec/dummy/app/assets/javascripts/application.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13-
//= require_tree .
13+
//= require_tree .

‎spec/dummy/app/assets/javascripts/hello.js‎

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Place all the behaviors and hooks related to the matching controller here.
2+
// All this logic will automatically be available in application.js.
3+
console.log(filestack_client);
4+
5+
function logIt(data) {
6+
console.log('logIt', data.filesUploaded[0].url);
7+
};
8+
9+
function onDone() {
10+
console.log('onDone');
11+
};
12+
13+
function onClose() {
14+
console.log('onClose');
15+
};
16+
17+
function onFileUploadFinishedCallback(data) {
18+
console.log('onFileUploadFinishedCallback', data.url);
19+
};
20+
21+
function attachLogo(data) {
22+
console.log(data);
23+
};

‎spec/dummy/app/assets/stylesheets/application.css‎

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,119 @@
1313
*= require_tree .
1414
*= require_self
1515
*/
16+
17+
body {
18+
background-color: #FFF;
19+
color: #333;
20+
margin: 33px;
21+
font-family: verdana, arial, helvetica, sans-serif;
22+
font-size: 13px;
23+
line-height: 18px;
24+
}
25+
26+
a {
27+
color: #000;
28+
padding: 2px 4px;
29+
}
30+
31+
a:visited {
32+
color: #666;
33+
}
34+
35+
a:hover {
36+
color: #FFF;
37+
background-color: #39CCCC;
38+
}
39+
40+
th {
41+
text-align: left;
42+
padding: 0 0 5px 0;
43+
}
44+
45+
td {
46+
padding: 0 5px 7px;
47+
}
48+
49+
#notice {
50+
color: #4CAF50;
51+
}
52+
53+
#error-explanation {
54+
width: 450px;
55+
border: 2px solid red;
56+
padding: 7px 7px 0;
57+
margin-bottom: 20px;
58+
background-color: #f0f0f0;
59+
}
60+
61+
#error-explanation h2 {
62+
text-align: left;
63+
font-weight: bold;
64+
padding: 5px 5px 5px 15px;
65+
font-size: 12px;
66+
margin: -7px -7px 0;
67+
background-color: #c00;
68+
color: #fff;
69+
}
70+
71+
#error-explanation ul {
72+
font-size: 12px;
73+
list-style: square;
74+
}
75+
76+
#error-explanation li {
77+
font-size: 12px;
78+
list-style: square;
79+
}
80+
81+
label {
82+
display: block;
83+
84+
}
85+
86+
.field, .actions {
87+
margin: 0 0 10px 0
88+
}
89+
90+
button {
91+
background-color: #39CCCC;
92+
border: none;
93+
color: white;
94+
padding: 8px 12px;
95+
margin: 5px 0;
96+
text-align: center;
97+
text-decoration: none;
98+
display: inline-block;
99+
font-size: 14px;
100+
cursor: pointer;
101+
}
102+
103+
.btn {
104+
border: none;
105+
color: white;
106+
padding: 8px 12px;
107+
margin: 5px 0;
108+
text-align: center;
109+
text-decoration: none;
110+
display: inline-block;
111+
font-size: 14px;
112+
}
113+
114+
.btn-primary {
115+
background-color: #ccc;
116+
}
117+
118+
.action-bar {
119+
margin: 20px 0
120+
}
121+
122+
input[type=submit] {
123+
background-color: #f0ad4e;
124+
}
125+
126+
input[type=text] {
127+
width: 250px;
128+
padding: 10px;
129+
margin: 5px 0;
130+
border: 2px solid #eee;
131+
}

‎spec/dummy/app/controllers/hello_controller.rb‎

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
class UsersController < ApplicationController
2+
include FilestackRails::ApplicationHelper
3+
4+
before_action :set_user, only: [:show, :edit, :update]
5+
6+
def index
7+
@users = User.all
8+
end
9+
10+
def show
11+
end
12+
13+
def new
14+
@user = User.new
15+
end
16+
17+
def edit
18+
end
19+
20+
def create
21+
@user = User.new(user_params)
22+
23+
respond_to do |format|
24+
if @user.save
25+
format.html { redirect_to @user, notice: 'User was successfully created.' }
26+
format.json { render :show, status: :created, location: @user }
27+
else
28+
format.html { render :new }
29+
format.json { render json: @user.errors, status: :unprocessable_entity }
30+
end
31+
end
32+
end
33+
34+
def update
35+
respond_to do |format|
36+
if @user.update(user_params)
37+
format.html { redirect_to @user, notice: 'User was successfully updated.' }
38+
format.json { render :show, status: :ok, location: @user }
39+
else
40+
format.html { render :edit }
41+
format.json { render json: @user.errors, status: :unprocessable_entity }
42+
end
43+
end
44+
end
45+
46+
private
47+
48+
def set_user
49+
@user = User.find(params[:id])
50+
end
51+
52+
def user_params
53+
params.require(:user).permit(:name, :email, :picture)
54+
end
55+
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /