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
d8d94128
Commit
d8d94128
authored
Oct 02, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CribEnable Validator: Add Gadget to validate crib gadget
parent
d759f54c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
gadget/crib_enable_validator.html
gadget/crib_enable_validator.html
+25
-0
gadget/crib_enable_validator.js
gadget/crib_enable_validator.js
+29
-0
No files found.
gadget/crib_enable_validator.html
0 → 100644
View file @
d8d94128
<!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>
<!-- Custom -->
<script
src=
"./crib_enable_validator.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"interface_validator"
>
<h4>
Testing Crib Enable Interface
</h4>
<p>
Tested URL is:
<a
href=
""
></a></p>
<div
data-gadget-url=
"./gadget_interface.html"
data-gadget-scope=
"interface_validator"
data-gadget-sandbox=
"public"
></div>
</div>
</body>
</html>
\ No newline at end of file
gadget/crib_enable_validator.js
0 → 100644
View file @
d8d94128
/*global window, rJS, loopEventListener, RSVP */
/*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
();
});
})
.
declareMethod
(
'
validateCribEnableGadgetUrl
'
,
function
(
editor_gadget_url
)
{
var
gadget_validator
,
gadget
=
this
,
link
=
gadget
.
props
.
element
.
querySelector
(
"
.interface_validator a
"
);
link
.
href
=
editor_gadget_url
;
link
.
innerHTML
=
editor_gadget_url
;
return
gadget
.
getDeclaredGadget
(
"
interface_validator
"
)
.
push
(
function
(
result
)
{
gadget_validator
=
result
;
return
gadget_validator
.
render
({
gadget_to_check_url
:
editor_gadget_url
,
required_interface_list
:
[
"
crib-enable-interface.html
"
]
});
});
});
}(
window
,
rJS
,
loopEventListener
));
\ No newline at end of file
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