Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
ebf4fa43
Commit
ebf4fa43
authored
9 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-2435 : More Polishing
SVN: 34783
parent
8ae0a5f7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/core-plugins/dataset-uploader/1/as/webapps/dataset-uploader/html/js/DataSetFormController.js
+17
-17
17 additions, 17 deletions
...webapps/dataset-uploader/html/js/DataSetFormController.js
with
17 additions
and
17 deletions
openbis/source/core-plugins/dataset-uploader/1/as/webapps/dataset-uploader/html/js/DataSetFormController.js
+
17
−
17
View file @
ebf4fa43
...
@@ -15,24 +15,24 @@
...
@@ -15,24 +15,24 @@
*/
*/
function
DataSetFormController
()
{
function
DataSetFormController
()
{
this
.
_
container
=
null
;
var
container
=
null
;
this
.
_
sampleOrExperiment
=
null
;
var
sampleOrExperiment
Copy
=
null
;
this
.
_
dataSetFormModel
=
null
;
var
dataSetFormModel
=
null
;
this
.
_
dataSetFormView
=
null
;
var
dataSetFormView
=
null
;
this
.
init
=
function
(
$container
,
sampleOrExperiment
)
{
this
.
init
=
function
(
$container
,
sampleOrExperiment
)
{
this
.
_
container
=
$container
;
container
=
$container
;
this
.
_
sampleOrExperiment
=
sampleOrExperiment
;
sampleOrExperiment
Copy
=
$
.
extend
({},
sampleOrExperiment
)
;
this
.
_
dataSetFormModel
=
new
DataSetFormModel
(
sampleOrExperiment
);
dataSetFormModel
=
new
DataSetFormModel
(
sampleOrExperiment
Copy
);
this
.
_
dataSetFormView
=
new
DataSetFormView
(
this
,
this
.
_
dataSetFormModel
);
dataSetFormView
=
new
DataSetFormView
(
this
,
dataSetFormModel
);
var
_this
=
this
;
var
_this
=
this
;
openBIS
.
listDataStores
(
function
(
datastoresData
)
{
openBIS
.
listDataStores
(
function
(
datastoresData
)
{
_this
.
_
dataSetFormModel
.
dataStores
=
datastoresData
.
result
;
dataSetFormModel
.
dataStores
=
datastoresData
.
result
;
openBIS
.
listDataSetTypes
(
openBIS
.
listDataSetTypes
(
function
(
datasetsData
)
{
function
(
datasetsData
)
{
_this
.
_
dataSetFormModel
.
dataSetTypes
=
datasetsData
.
result
;
dataSetFormModel
.
dataSetTypes
=
datasetsData
.
result
;
_this
.
_
dataSetFormView
.
repaint
(
$container
);
dataSetFormView
.
repaint
(
$container
);
}
}
);
);
});
});
...
@@ -44,7 +44,7 @@ function DataSetFormController() {
...
@@ -44,7 +44,7 @@ function DataSetFormController() {
this
.
submit
=
function
()
{
this
.
submit
=
function
()
{
Util
.
blockUI
();
Util
.
blockUI
();
var
_this
=
this
;
var
_this
=
this
;
var
metadata
=
this
.
_
dataSetFormModel
.
dataSet
.
properties
;
var
metadata
=
dataSetFormModel
.
dataSet
.
properties
;
var
isZipDirectoryUpload
=
$
(
"
#isZipDirectoryUpload
"
+
"
:checked
"
).
val
()
===
"
on
"
;
var
isZipDirectoryUpload
=
$
(
"
#isZipDirectoryUpload
"
+
"
:checked
"
).
val
()
===
"
on
"
;
...
@@ -63,7 +63,7 @@ function DataSetFormController() {
...
@@ -63,7 +63,7 @@ function DataSetFormController() {
"
method
"
:
method
,
"
method
"
:
method
,
//Identification Info
//Identification Info
"
dataSetType
"
:
dataSetTypeCode
,
"
dataSetType
"
:
dataSetTypeCode
,
"
filenames
"
:
_this
.
_
dataSetFormModel
.
files
,
"
filenames
"
:
dataSetFormModel
.
files
,
"
folderName
"
:
folderName
,
"
folderName
"
:
folderName
,
"
isZipDirectoryUpload
"
:
isZipDirectoryUpload
,
"
isZipDirectoryUpload
"
:
isZipDirectoryUpload
,
//Metadata
//Metadata
...
@@ -73,15 +73,15 @@ function DataSetFormController() {
...
@@ -73,15 +73,15 @@ function DataSetFormController() {
"
openBISURL
"
:
openBIS
.
_internal
.
openbisUrl
"
openBISURL
"
:
openBIS
.
_internal
.
openbisUrl
};
};
var
sampleOrExperimentIdentifier
=
this
.
_
dataSetFormModel
.
sampleOrExperiment
.
identifier
;
var
sampleOrExperimentIdentifier
=
dataSetFormModel
.
sampleOrExperiment
.
identifier
;
if
(
sampleOrExperimentIdentifier
.
split
(
"
/
"
).
length
===
3
)
{
if
(
sampleOrExperimentIdentifier
.
split
(
"
/
"
).
length
===
3
)
{
parameters
[
"
sampleIdentifier
"
]
=
sampleOrExperimentIdentifier
;
parameters
[
"
sampleIdentifier
"
]
=
sampleOrExperimentIdentifier
;
}
else
if
(
sampleOrExperimentIdentifier
.
split
(
"
/
"
).
length
===
4
)
{
}
else
if
(
sampleOrExperimentIdentifier
.
split
(
"
/
"
).
length
===
4
)
{
parameters
[
"
experimentIdentifier
"
]
=
sampleOrExperimentIdentifier
;
parameters
[
"
experimentIdentifier
"
]
=
sampleOrExperimentIdentifier
;
}
}
if
(
this
.
_
dataSetFormModel
.
dataStores
.
length
>
0
)
{
if
(
dataSetFormModel
.
dataStores
.
length
>
0
)
{
openBIS
.
createReportFromAggregationService
(
this
.
_
dataSetFormModel
.
dataStores
[
0
].
code
,
"
dataset-uploader-api
"
,
parameters
,
function
(
response
)
{
openBIS
.
createReportFromAggregationService
(
dataSetFormModel
.
dataStores
[
0
].
code
,
"
dataset-uploader-api
"
,
parameters
,
function
(
response
)
{
if
(
response
.
error
)
{
//Error Case 1
if
(
response
.
error
)
{
//Error Case 1
Util
.
showError
(
response
.
error
.
message
,
function
()
{
Util
.
unblockUI
();});
Util
.
showError
(
response
.
error
.
message
,
function
()
{
Util
.
unblockUI
();});
}
else
if
(
response
.
result
.
columns
[
1
].
title
===
"
Error
"
)
{
//Error Case 2
}
else
if
(
response
.
result
.
columns
[
1
].
title
===
"
Error
"
)
{
//Error Case 2
...
@@ -101,7 +101,7 @@ function DataSetFormController() {
...
@@ -101,7 +101,7 @@ function DataSetFormController() {
}
else
if
(
response
.
result
.
columns
[
0
].
title
===
"
STATUS
"
&&
response
.
result
.
rows
[
0
][
0
].
value
===
"
OK
"
)
{
//Success Case
}
else
if
(
response
.
result
.
columns
[
0
].
title
===
"
STATUS
"
&&
response
.
result
.
rows
[
0
][
0
].
value
===
"
OK
"
)
{
//Success Case
Util
.
showSuccess
(
"
DataSet Created.
"
,
function
()
{
Util
.
showSuccess
(
"
DataSet Created.
"
,
function
()
{
Util
.
unblockUI
();
Util
.
unblockUI
();
_this
.
init
(
_this
.
_
container
,
_this
.
_
sampleOrExperiment
);
_this
.
init
(
container
,
sampleOrExperiment
Copy
);
});
});
}
else
{
//This should never happen
}
else
{
//This should never happen
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment