Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
jio
Commits
8e35d3a6
Commit
8e35d3a6
authored
Dec 24, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JIO Basic Storage revision managing removed! Improving modularity!
parent
3fd058c3
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
7 additions
and
822 deletions
+7
-822
src/jio.storage/intro.js
src/jio.storage/intro.js
+0
-375
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+1
-1
src/jio/commands/_allDocsCommand.js
src/jio/commands/_allDocsCommand.js
+0
-24
src/jio/commands/_getCommand.js
src/jio/commands/_getCommand.js
+0
-32
src/jio/commands/_postCommand.js
src/jio/commands/_postCommand.js
+0
-18
src/jio/commands/_putAttachmentCommand.js
src/jio/commands/_putAttachmentCommand.js
+0
-27
src/jio/commands/_putCommand.js
src/jio/commands/_putCommand.js
+0
-26
src/jio/commands/_removeCommand.js
src/jio/commands/_removeCommand.js
+0
-16
src/jio/commands/command.js
src/jio/commands/command.js
+0
-6
src/jio/commands/putCommand.js
src/jio/commands/putCommand.js
+0
-8
src/jio/storages/storage.js
src/jio/storages/storage.js
+6
-289
No files found.
src/jio.storage/intro.js
View file @
8e35d3a6
This diff is collapsed.
Click to expand it.
src/jio.storage/localstorage.js
View file @
8e35d3a6
src/jio/commands/_allDocsCommand.js
deleted
100644 → 0
View file @
3fd058c3
var
_allDocsCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
// Methods //
that
.
getLabel
=
function
()
{
return
'
_allDocs
'
;
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
_allDocs
(
that
);
};
that
.
canBeRestored
=
function
()
{
return
false
;
};
that
.
validateState
=
function
()
{
return
true
;
};
return
that
;
};
src/jio/commands/_getCommand.js
deleted
100644 → 0
View file @
3fd058c3
var
_getCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
// Methods //
that
.
getLabel
=
function
()
{
return
'
_get
'
;
};
that
.
validateState
=
function
()
{
if
(
!
that
.
getDocId
())
{
that
.
error
({
status
:
20
,
statusText
:
'
Document Id Required
'
,
error
:
'
document_id_required
'
,
message
:
'
No document id.
'
,
reason
:
'
no document id
'
});
return
false
;
}
return
true
;
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
_get
(
that
);
};
that
.
canBeRestored
=
function
()
{
return
false
;
};
return
that
;
};
src/jio/commands/_postCommand.js
deleted
100644 → 0
View file @
3fd058c3
var
_postCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
var
priv
=
{};
// Methods //
that
.
getLabel
=
function
()
{
return
'
_post
'
;
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
_post
(
that
);
};
return
that
;
};
src/jio/commands/_putAttachmentCommand.js
deleted
100644 → 0
View file @
3fd058c3
var
_putAttachmentCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
// Methods //
that
.
getLabel
=
function
()
{
return
'
_putAttachment
'
;
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
_putAttachment
(
that
);
};
that
.
validateState
=
function
()
{
if
(
typeof
that
.
getContent
()
!==
'
string
'
)
{
that
.
error
({
status
:
22
,
statusText
:
'
Content Required
'
,
error
:
'
content_required
'
,
message
:
'
No data to put.
'
,
reason
:
'
no data to put
'
});
return
false
;
}
return
true
;
};
return
that
;
};
src/jio/commands/_putCommand.js
deleted
100644 → 0
View file @
3fd058c3
var
_putCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
var
priv
=
{};
// Methods //
that
.
getLabel
=
function
()
{
return
'
_put
'
;
};
/**
* Validates the storage handler.
* @param {object} handler The storage handler
*/
that
.
validate
=
function
()
{
return
that
.
validateState
();
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
_put
(
that
);
};
return
that
;
};
src/jio/commands/_removeCommand.js
deleted
100644 → 0
View file @
3fd058c3
var
_removeCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
// Methods //
that
.
getLabel
=
function
()
{
return
'
_remove
'
;
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
_remove
(
that
);
};
return
that
;
};
src/jio/commands/command.js
View file @
8e35d3a6
...
...
@@ -11,12 +11,6 @@ var command = function(spec, my) {
'
remove
'
:
removeCommand
,
'
allDocs
'
:
allDocsCommand
,
'
putAttachment
'
:
putAttachmentCommand
'
_post
'
:
_postCommand
,
'
_put
'
:
_putCommand
,
'
_get
'
:
_getCommand
,
'
_remove
'
:
_removeCommand
,
'
_allDocs
'
:
_allDocsCommand
,
'
_putAttachment
'
:
_putAttachmentCommand
};
// creates the good command thanks to his label
if
(
spec
.
label
&&
priv
.
commandlist
[
spec
.
label
])
{
...
...
src/jio/commands/putCommand.js
View file @
8e35d3a6
...
...
@@ -10,14 +10,6 @@ var putCommand = function(spec, my) {
return
'
put
'
;
};
/**
* Validates the storage handler.
* @param {object} handler The storage handler
*/
that
.
validate
=
function
()
{
return
that
.
validateState
();
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
put
(
that
);
};
...
...
src/jio/storages/storage.js
View file @
8e35d3a6
This diff is collapsed.
Click to expand it.
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