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
f49e15de
Commit
f49e15de
authored
Oct 07, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tool Pages: Start displaying current Scope
parent
47877c45
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
9 deletions
+28
-9
gadget/gadget_cribjs_page_crib_loader.html
gadget/gadget_cribjs_page_crib_loader.html
+1
-2
gadget/gadget_cribjs_page_crib_loader.js
gadget/gadget_cribjs_page_crib_loader.js
+14
-3
gadget/gadget_cribjs_page_tools.html
gadget/gadget_cribjs_page_tools.html
+1
-0
gadget/gadget_cribjs_page_tools.js
gadget/gadget_cribjs_page_tools.js
+9
-1
gadget/gadget_zip_loader.html
gadget/gadget_zip_loader.html
+3
-3
No files found.
gadget/gadget_cribjs_page_crib_loader.html
View file @
f49e15de
...
...
@@ -20,8 +20,7 @@
<body>
<div
class=
"nav_content save_load container"
>
<div
class=
"nav_content container"
>
<h1>
CribJS Loader
</h1>
<p>
Update or Load CribJS from here
</p>
<h2>
Update or Load:
<a
class=
"url-list-scope"
href=
""
></a></h2>
</div>
<div
data-gadget-url=
"./gadget_zip_loader.html"
data-gadget-scope=
"zip_loader"
...
...
gadget/gadget_cribjs_page_crib_loader.js
View file @
f49e15de
...
...
@@ -27,6 +27,7 @@
.
allowPublicAcquisition
(
"
crib_sw_put
"
,
function
(
argument_list
)
{
return
this
.
crib_sw_put
(
argument_list
[
0
],
argument_list
[
1
]);
})
.
declareAcquiredMethod
(
"
crib_sw_getScope
"
,
"
crib_sw_getScope
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
gadget
=
this
;
if
(
options
===
undefined
)
...
...
@@ -37,10 +38,20 @@
return
gadget
.
props
.
start_deferred
.
resolve
();
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
zip_loader
"
);
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
"
zip_loader
"
),
gadget
.
crib_sw_getScope
()
]);
})
.
push
(
function
(
zip_loader
)
{
return
zip_loader
.
render
();
.
push
(
function
(
result_list
)
{
var
url_list_scope_link
=
gadget
.
props
.
element
.
querySelector
(
"
a.url-list-scope
"
);
gadget
.
props
.
scope
=
result_list
[
1
];
url_list_scope_link
.
href
=
gadget
.
props
.
scope
;
url_list_scope_link
.
innerHTML
=
gadget
.
props
.
scope
.
split
(
"
//
"
)[
1
].
split
(
"
.
"
)[
0
];
return
result_list
[
0
].
render
();
});
});
}(
window
,
rJS
));
\ No newline at end of file
gadget/gadget_cribjs_page_tools.html
View file @
f49e15de
...
...
@@ -16,6 +16,7 @@
</head>
<body>
<div
class=
"nav_content cribjs container"
>
<h3>
Editing:
<a
class=
"url-list-scope"
href=
""
></a></h3>
<ul>
<li><a
class=
"grep"
href=
"#page=grep"
>
Grep
</a>
among js and html files
</li>
<li><a
class=
"jslint"
href=
"#page=jslint"
>
JSLint
</a></li>
...
...
gadget/gadget_cribjs_page_tools.js
View file @
f49e15de
...
...
@@ -20,6 +20,7 @@
// acquired methods
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
crib_sw_getScope
"
,
"
crib_sw_getScope
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
gadget
=
this
,
page_list
=
[
"
select_site
"
,
"
jslint
"
,
"
mass_remove
"
,
"
grep
"
,
...
...
@@ -29,15 +30,22 @@
page_list
.
forEach
(
function
(
page
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
page
:
page
}));
});
promise_list
.
push
(
gadget
.
crib_sw_getScope
());
// Handle main title
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
link_list
)
{
for
(
var
i
=
0
;
i
<
link_list
.
length
;
i
++
)
{
var
url_list_scope_link
=
gadget
.
props
.
element
.
querySelector
(
"
a.url-list-scope
"
);
for
(
var
i
=
0
;
i
<
page_list
.
length
;
i
++
)
{
gadget
.
props
.
element
.
querySelector
(
"
.
"
+
page_list
[
i
]).
href
=
link_list
[
i
];
}
gadget
.
props
.
scope
=
link_list
[
link_list
.
length
-
1
];
url_list_scope_link
.
href
=
gadget
.
props
.
scope
;
url_list_scope_link
.
innerHTML
=
gadget
.
props
.
scope
.
split
(
"
//
"
)[
1
].
split
(
"
.
"
)[
0
];
});
});
...
...
gadget/gadget_zip_loader.html
View file @
f49e15de
...
...
@@ -20,9 +20,9 @@
data-gadget-sandbox=
"public"
></div>
<div
class=
"nav_content container"
>
<form
class=
"crib-load-from-zip-url form-inline"
>
<h3>
Fill
This site
from a zip URL
</h3>
<p>
Leaving the Default parameter and validating will update
CribJS Editor to the
latest version.
<br/><span>
⚠️
</span>
This will erase your changes to
CribJS Editor
</p>
<h3>
Fill from a zip URL
</h3>
<p>
Leaving the Default parameter and validating will update
to the CribJS Editor
latest version.
<br/><span>
⚠️
</span>
This will erase your changes to
your app.
</p>
<div
class=
"form-group"
>
<label>
Zip Url:
<input
name=
"load-zip-url"
class=
"load-zip-url form-control"
...
...
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