Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cribjs
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
cribjs
Commits
58690863
Commit
58690863
authored
Jun 08, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment on crib-enable.js
parent
94eb66ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
crib-enable.js
crib-enable.js
+27
-0
No files found.
crib-enable.js
View file @
58690863
...
...
@@ -109,6 +109,12 @@
}
})
/**
* allDocs return the list of document in the cache
*
* @params {Object} Not taken into account
* @return {} Return the data url of the document
*/
.
declareMethod
(
'
allDocs
'
,
function
(
params
)
{
if
(
params
&&
params
.
cached_only
)
{
return
new
RSVP
.
Queue
()
...
...
@@ -126,6 +132,13 @@
});
})
/**
* get Return a data url. Cannot return a blob as the data
* is transmitted through an iFrame
*
* @url {string} url of the document to retrieve
* @return {data_url} Return the data url of the document
*/
.
declareMethod
(
'
get
'
,
function
(
url
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -144,6 +157,14 @@
});
})
/**
* put Return a data url. Cannot provide a blob as the data
* is transmitted through an iFrame
*
* @url {string} url of the document to update
* @parameter {data_url} data url of the document to put, it will be transformed in a blob
* @return {data_url} Return the data url of the document
*/
.
declareMethod
(
'
put
'
,
function
(
url
,
parameter
)
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
...
...
@@ -159,6 +180,12 @@
}).
fail
(
setStatus
);
})
/**
* Remove an url from the cache
*
* @url {string} url of the document to remove
* @return {}
*/
.
declareMethod
(
'
remove
'
,
function
(
url
)
{
return
new
RSVP
.
Queue
()
.
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