Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
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
Boris Kocherov
jio
Commits
81842844
Commit
81842844
authored
Jul 18, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gidstorage metadata actions upgrade
parent
66f3169d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
src/jio.storage/gidstorage.js
src/jio.storage/gidstorage.js
+17
-4
No files found.
src/jio.storage/gidstorage.js
View file @
81842844
...
...
@@ -70,10 +70,13 @@
return
value
;
},
/**
* Returns the metadata if
it
is a string
* Returns the metadata if
there
is a string
*/
string
:
function
(
value
)
{
if
(
typeof
value
===
'
string
'
)
{
if
(
!
Array
.
isArray
(
value
))
{
if
(
typeof
value
===
'
object
'
)
{
return
value
.
content
;
}
return
value
;
}
},
...
...
@@ -96,10 +99,20 @@
return
value
;
},
/**
* Returns the metadata if
it
is a string equal to a DCMIType
* Returns the metadata if
there
is a string equal to a DCMIType
*/
DCMIType
:
function
(
value
)
{
return
dcmi_types
[
value
];
var
i
;
if
(
!
Array
.
isArray
(
value
))
{
value
=
[
value
];
}
for
(
i
=
0
;
i
<
value
.
length
;
i
+=
1
)
{
if
(
typeof
value
[
i
]
===
'
object
'
&&
dcmi_types
[
value
[
i
].
content
])
{
return
value
[
i
].
content
;
}
else
if
(
dcmi_types
[
value
[
i
]])
{
return
value
[
i
];
}
}
},
/**
* Returns the metadata content type if exist
...
...
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