Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cribjs-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
cribjs-editor
Commits
097e1705
Commit
097e1705
authored
Jul 17, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve Upload forms for app and home page
parent
02445392
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
16 deletions
+42
-16
gadget/gadget_cribjs_page_add_application.html
gadget/gadget_cribjs_page_add_application.html
+16
-4
gadget/gadget_zip_loader.html
gadget/gadget_zip_loader.html
+26
-10
gadget/gadget_zip_loader.js
gadget/gadget_zip_loader.js
+0
-2
No files found.
gadget/gadget_cribjs_page_add_application.html
View file @
097e1705
...
@@ -23,12 +23,18 @@
...
@@ -23,12 +23,18 @@
<h3>
Add Application
</h3>
<h3>
Add Application
</h3>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Application Name:
<label>
Application Name:
<input
name=
"app-name"
class=
"app-name form-control"
type=
"text"
size=
"30"
value=
""
required
>
<input
name=
"app-name"
class=
"app-name form-control"
type=
"text"
size=
"30"
value=
""
required
placeholder=
"My App Name"
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Application Path:
<label>
Application Path:
<input
name=
"load-zip-to-path"
class=
"load-zip-to-path form-control"
type=
"text"
size=
"30"
value=
""
pattern=
"[a-zA-Z0-9]+"
title=
"Alphanumeric Characters"
required
>
<input
name=
"load-zip-to-path"
class=
"load-zip-to-path form-control"
type=
"text"
size=
"30"
value=
""
pattern=
"[a-zA-Z0-9]+"
title=
"Alphanumeric Characters"
required
placeholder=
"my-app-path/"
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -39,12 +45,18 @@
...
@@ -39,12 +45,18 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Path in Zip:
<label>
Path in Zip:
<input
name=
"load-zip-path"
class=
"load-from-zip-path form-control"
type=
"text"
size=
"30"
value=
""
>
<input
name=
"load-zip-path"
class=
"load-from-zip-path form-control"
type=
"text"
size=
"50"
value=
""
placeholder=
"Use if index.html is not at the root of the zip. e.g.: cribjs-editor-master/"
title=
"Use if index.html is not at the root of the zip. e.g.: cribjs-editor-master/"
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
And redirect to:
<label>
And redirect to:
<input
name=
"redirect-url"
class=
"redirect-url form-control"
type=
"text"
size=
"30"
value=
"index.html"
>
<input
name=
"redirect-url"
class=
"redirect-url form-control"
type=
"text"
size=
"30"
value=
"index.html"
title=
"Will be used as home page"
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
gadget/gadget_zip_loader.html
View file @
097e1705
...
@@ -23,24 +23,32 @@
...
@@ -23,24 +23,32 @@
<h3>
Fill This site from a zip URL
</h3>
<h3>
Fill This site from a zip URL
</h3>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Zip Url:
<label>
Zip Url:
<input
name=
"load-zip-url"
class=
"load-zip-url form-control"
type=
"text"
size=
"60"
></label>
<input
name=
"load-zip-url"
class=
"load-zip-url form-control"
type=
"text"
size=
"60"
></label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Path in Zip:
<label>
Path in Zip:
<input
name=
"load-from-zip-path"
class=
"load-from-zip-path form-control"
type=
"text"
size=
"30"
value=
"/"
>
<input
name=
"load-from-zip-path"
class=
"load-from-zip-path form-control"
type=
"text"
size=
"30"
value=
""
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
to path:
<label>
to path:
<input
name=
"load-zip-to-path"
class=
"load-zip-to-path form-control"
type=
"text"
size=
"30"
value=
"/"
>
<input
name=
"load-zip-to-path"
class=
"load-zip-to-path form-control"
type=
"text"
size=
"30"
value=
""
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
And redirect to:
<label>
And redirect to:
<input
name=
"redirect-url"
class=
"redirect-url form-control"
type=
"text"
size=
"30"
value=
""
>
<input
name=
"redirect-url"
class=
"redirect-url form-control"
type=
"text"
size=
"30"
value=
""
>
</label>
</label>
</div>
</div>
<button
name=
"load-zip-contents"
class=
"load-zip-contents btn btn-default"
type=
"submit"
>
Import from URL
</button>
<button
name=
"load-zip-contents"
class=
"load-zip-contents btn btn-default"
type=
"submit"
>
Import from URL
</button>
</form>
</form>
</div>
</div>
<div
class=
"nav_content container"
>
<div
class=
"nav_content container"
>
...
@@ -49,24 +57,32 @@
...
@@ -49,24 +57,32 @@
<h3>
Import from zip File
</h3>
<h3>
Import from zip File
</h3>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Zip File:
<label>
Zip File:
<input
name=
"load-zip-file"
class=
"load-zip-file form-control"
type=
"file"
size=
"30"
></label>
<input
name=
"load-zip-file"
class=
"load-zip-file form-control"
type=
"file"
size=
"30"
></label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
Path in Zip:
<label>
Path in Zip:
<input
name=
"load-zip-path"
class=
"load-from-zip-path form-control"
type=
"text"
size=
"30"
value=
"/"
>
<input
name=
"load-zip-path"
class=
"load-from-zip-path form-control"
type=
"text"
size=
"30"
value=
""
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
to path:
<label>
to path:
<input
name=
"load-zip-to-path"
class=
"load-zip-to-path form-control"
type=
"text"
size=
"30"
value=
"/"
>
<input
name=
"load-zip-to-path"
class=
"load-zip-to-path form-control"
type=
"text"
size=
"30"
value=
""
>
</label>
</label>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label>
And redirect to:
<label>
And redirect to:
<input
name=
"redirect-url"
class=
"redirect-url form-control"
type=
"text"
size=
"30"
value=
""
>
<input
name=
"redirect-url"
class=
"redirect-url form-control"
type=
"text"
size=
"30"
value=
""
>
</label>
</label>
</div>
</div>
<button
name=
"load-zip-contents"
class=
"load-zip-contents btn btn-default"
type=
"submit"
>
Import from File
</button>
<button
name=
"load-zip-contents"
class=
"load-zip-contents btn btn-default"
type=
"submit"
>
Import from File
</button>
</form>
</form>
</div>
</div>
...
...
gadget/gadget_zip_loader.js
View file @
097e1705
...
@@ -98,8 +98,6 @@
...
@@ -98,8 +98,6 @@
}
}
if
(
params
.
hasOwnProperty
(
"
to_path
"
)
)
{
if
(
params
.
hasOwnProperty
(
"
to_path
"
)
)
{
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-zip-to-path
"
).
value
=
params
.
to_path
;
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-zip-to-path
"
).
value
=
params
.
to_path
;
}
else
{
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-zip-to-path
"
).
value
=
site
;
}
}
if
(
params
.
hasOwnProperty
(
"
zip_url
"
)
)
{
if
(
params
.
hasOwnProperty
(
"
zip_url
"
)
)
{
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-zip-url
"
).
value
=
params
.
zip_url
;
gadget
.
props
.
element
.
querySelector
(
"
form.crib-load-from-zip-url .load-zip-url
"
).
value
=
params
.
zip_url
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment