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
96f49432
Commit
96f49432
authored
Sep 30, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crib-enable: Add Back comments on methods
parent
e876944a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
crib-enable.js
crib-enable.js
+30
-0
No files found.
crib-enable.js
View file @
96f49432
...
...
@@ -95,6 +95,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
)
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
return
storage
.
getAttachment
(
this
.
state_parameter_dict
.
default_document
,
url
)
...
...
@@ -105,6 +112,15 @@
return
e
.
target
.
result
;
});
})
/**
* 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
,
data_uri
)
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
data_uri
=
jIO
.
util
.
dataURItoBlob
(
data_uri
);
...
...
@@ -114,6 +130,13 @@
data_uri
);
})
/**
* 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
()
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
return
storage
.
allAttachments
(
this
.
state_parameter_dict
.
default_document
)
...
...
@@ -121,6 +144,13 @@
return
result
;
});
})
/**
* Remove an url from the cache
*
* @url {string} url of the document to remove
* @return {}
*/
.
declareMethod
(
'
remove
'
,
function
(
url
)
{
var
storage
=
this
.
state_parameter_dict
.
jio_storage
;
return
storage
.
removeAttachment
(
...
...
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