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
059580ec
Commit
059580ec
authored
Sep 18, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Crib Loader out of the homepage
parent
635b83cd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
12 deletions
+79
-12
gadget/gadget_cribjs_page_crib_loader.html
gadget/gadget_cribjs_page_crib_loader.html
+31
-0
gadget/gadget_cribjs_page_crib_loader.js
gadget/gadget_cribjs_page_crib_loader.js
+46
-0
gadget/gadget_cribjs_page_cribjs_home.html
gadget/gadget_cribjs_page_cribjs_home.html
+0
-7
gadget/gadget_cribjs_page_cribjs_home.js
gadget/gadget_cribjs_page_cribjs_home.js
+2
-5
No files found.
gadget/gadget_cribjs_page_crib_loader.html
0 → 100644
View file @
059580ec
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
CribJS Header
</title>
<!-- renderjs -->
<script
src=
"../lib/rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/jszip.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/mimetype.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/webtorrent.min.js"
type=
"text/javascript"
></script>
<script
src=
"./gadget_global.js"
type=
"text/javascript"
></script>
<!-- Custom -->
<script
src=
"./gadget_cribjs_page_crib_loader.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"nav_content save_load container"
>
<div
class=
"nav_content container"
>
<h1>
CribJS Loader
</h1>
<p>
Load your Crib from here
</p>
</div>
<div
data-gadget-url=
"./gadget_zip_loader.html"
data-gadget-scope=
"zip_loader"
data-gadget-sandbox=
"public"
></div>
</div>
</body>
</html>
\ No newline at end of file
gadget/gadget_cribjs_page_crib_loader.js
0 → 100644
View file @
059580ec
/*global window, rJS, RSVP, console */
/*jslint nomen: true, indent: 2, maxerr: 3*/
(
function
(
window
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
g
.
props
.
start_deferred
=
RSVP
.
defer
();
});
})
//////////////////////////////////////////////
// acquired methods
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
allowPublicAcquisition
(
"
getUrlFor
"
,
function
(
argument_list
)
{
return
this
.
getUrlFor
(
argument_list
[
0
]);
})
.
declareAcquiredMethod
(
"
crib_sw_get
"
,
"
crib_sw_get
"
)
.
allowPublicAcquisition
(
"
crib_sw_get
"
,
function
(
argument_list
)
{
return
this
.
crib_sw_get
(
argument_list
[
0
]);
})
.
declareAcquiredMethod
(
"
crib_sw_put
"
,
"
crib_sw_put
"
)
.
allowPublicAcquisition
(
"
crib_sw_put
"
,
function
(
argument_list
)
{
return
this
.
crib_sw_put
(
argument_list
[
0
],
argument_list
[
1
]);
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
gadget
=
this
;
if
(
options
===
undefined
)
options
=
{};
gadget
.
props
.
options
=
options
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
props
.
start_deferred
.
resolve
();
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
zip_loader
"
);
})
.
push
(
function
(
zip_loader
)
{
return
zip_loader
.
render
();
});
});
}(
window
,
rJS
));
\ No newline at end of file
gadget/gadget_cribjs_page_cribjs_home.html
View file @
059580ec
...
@@ -32,13 +32,6 @@
...
@@ -32,13 +32,6 @@
data-gadget-scope=
"app_list"
data-gadget-scope=
"app_list"
data-gadget-sandbox=
"public"
></div>
data-gadget-sandbox=
"public"
></div>
</div>
</div>
<div
class=
"nav_content container"
>
<h1>
CribJS Loader
</h1>
<p>
Load your Crib from here
</p>
</div>
<div
data-gadget-url=
"./gadget_zip_loader.html"
data-gadget-scope=
"zip_loader"
data-gadget-sandbox=
"public"
></div>
<div
class=
"nav_content container"
>
<div
class=
"nav_content container"
>
<h2>
Start Editing this Site In another Crib
</h2>
<h2>
Start Editing this Site In another Crib
</h2>
<a
class=
"edit-url btn btn-primary"
type=
"text"
size=
"60"
href=
""
>
Start Editing This Site Now
</a>
<a
class=
"edit-url btn btn-primary"
type=
"text"
size=
"60"
href=
""
>
Start Editing This Site Now
</a>
...
...
gadget/gadget_cribjs_page_cribjs_home.js
View file @
059580ec
...
@@ -53,7 +53,6 @@
...
@@ -53,7 +53,6 @@
encodeURIComponent
(
edit_base
+
"
#page=editor&url=
"
+
encodeURIComponent
(
edit_base
+
"
#page=editor&url=
"
+
"
index.html
"
+
"
&crib_enable_url=
"
+
site
+
"
/crib-enable.html
"
);
"
index.html
"
+
"
&crib_enable_url=
"
+
site
+
"
/crib-enable.html
"
);
gadget
.
props
.
element
.
querySelector
(
"
a.edit-url
"
).
href
=
edit_url
;
gadget
.
props
.
element
.
querySelector
(
"
a.edit-url
"
).
href
=
edit_url
;
// Handle main title
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
return
gadget
.
getUrlFor
({
...
@@ -64,14 +63,12 @@
...
@@ -64,14 +63,12 @@
.
push
(
function
(
link
)
{
.
push
(
function
(
link
)
{
gadget
.
props
.
element
.
querySelector
(
"
.edit-this
"
).
href
=
link
;
gadget
.
props
.
element
.
querySelector
(
"
.edit-this
"
).
href
=
link
;
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
"
app_list
"
),
gadget
.
getDeclaredGadget
(
"
app_list
"
)
gadget
.
getDeclaredGadget
(
"
zip_loader
"
)
]);
]);
})
})
.
push
(
function
(
gadget_list
)
{
.
push
(
function
(
gadget_list
)
{
return
RSVP
.
all
([
return
RSVP
.
all
([
gadget_list
[
0
].
render
(),
gadget_list
[
0
].
render
()
gadget_list
[
1
].
render
()
]);
]);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
...
...
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