Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
nexedi
dream
Commits
0bd2b7f2
Commit
0bd2b7f2
authored
Sep 08, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: update static version
parent
6f4e8f40
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
11 deletions
+65
-11
dream/platform/static/dream/Input_viewSimulation.js
dream/platform/static/dream/Input_viewSimulation.js
+3
-5
dream/platform/static/dream/index.js
dream/platform/static/dream/index.js
+8
-2
dream/platform/static/expandable_field/expandablefield.js
dream/platform/static/expandable_field/expandablefield.js
+4
-3
dream/platform/static/fieldset/fieldset.js
dream/platform/static/fieldset/fieldset.js
+2
-0
dream/platform/static/manifest.appcache
dream/platform/static/manifest.appcache
+48
-1
No files found.
dream/platform/static/dream/Input_viewSimulation.js
View file @
0bd2b7f2
...
...
@@ -70,14 +70,12 @@
_attachment
:
"
body.json
"
,
_data
:
JSON
.
stringify
(
data
,
null
,
2
),
_mimetype
:
"
application/json
"
}).
fail
(
function
(
reason
)
{
alert
(
"
Could not save simulation results.Please check the simulation parameters or try to delete some models.
\n\n
Error was:
"
+
reason
);
return
gadget
.
whoWantsToDisplayThisDocument
(
gadget
.
props
.
jio_key
,
"
view
"
);
});
}).
push
(
function
()
{
return
gadget
.
whoWantsToDisplayThisDocument
(
gadget
.
props
.
jio_key
,
"
view_result
"
);
},
function
(
reason
)
{
// Very likely, we exceeded the quota of the local storage.
// Let's handle it with a more informative message.
alert
(
"
Could not save simulation results.Please check the simulation parameters or try to delete some models.
\n\n
Error was:
"
+
reason
);
return
gadget
.
whoWantsToDisplayThisDocument
(
gadget
.
props
.
jio_key
,
"
view
"
);
}).
push
(
function
(
url
)
{
return
gadget
.
pleaseRedirectMyHash
(
url
);
});
...
...
dream/platform/static/dream/index.js
View file @
0bd2b7f2
...
...
@@ -12,7 +12,11 @@
// Prompt user to reload after manifest update.
// from http://www.html5rocks.com/en/tutorials/appcache/beginner/#toc-updating-cache
window
.
addEventListener
(
"
load
"
,
function
()
{
var
updating
=
false
;
if
(
window
.
applicationCache
)
{
window
.
applicationCache
.
addEventListener
(
"
downloading
"
,
function
()
{
updating
=
true
;
},
false
);
window
.
applicationCache
.
addEventListener
(
"
updateready
"
,
function
()
{
if
(
window
.
applicationCache
.
status
===
window
.
applicationCache
.
UPDATEREADY
)
{
// Browser downloaded a new app cache.
...
...
@@ -24,8 +28,10 @@
}
},
false
);
window
.
applicationCache
.
addEventListener
(
"
error
"
,
function
()
{
alert
(
"
Fatal error while updating, retrying
"
);
window
.
location
.
reload
();
if
(
updating
)
{
alert
(
"
Fatal error while updating, retrying
"
);
window
.
location
.
reload
();
}
},
false
);
}
},
false
);
...
...
dream/platform/static/expandable_field/expandablefield.js
View file @
0bd2b7f2
...
...
@@ -9,7 +9,7 @@
// Precompile the templates while loading the first gadget instance
var
gadget_klass
=
rJS
(
window
),
label_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
expand-label-template
"
).
innerHTML
,
label_template
=
Handlebars
.
compile
(
label_source
),
option_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
expand-option-template
"
).
innerHTML
,
option_template
=
Handlebars
.
compile
(
option_source
),
selected_option_source
=
gadget_klass
.
__template_element
.
getElementById
(
"
selected-expand-option-template
"
).
innerHTML
,
selected_option_template
=
Handlebars
.
compile
(
selected_option_source
);
function
syncField
(
gadget
)
{
var
i
,
properties_dict
,
sub_title
,
sub_type
,
in_type
,
default_value
,
previous_value
,
labels
=
[],
lbls
,
inps
=
[],
inputs
,
j
,
index
,
corresponding_input
,
sub_gadget_list
=
[],
old_title
,
recent_occupied
=
[],
recent_occupied_labels
=
[],
prop_name
=
gadget
.
props
.
definition
.
property_def
.
title
;
var
i
,
properties_dict
,
sub_title
_name
,
sub_title
,
sub_type
,
in_type
,
default_value
,
previous_value
,
labels
=
[],
lbls
,
inps
=
[],
inputs
,
j
,
index
,
corresponding_input
,
sub_gadget_list
=
[],
old_title
,
recent_occupied
=
[],
recent_occupied_labels
=
[],
prop_name
=
gadget
.
props
.
definition
.
property_def
.
title
;
console
.
log
(
"
for prop_name syncField
"
);
console
.
log
(
prop_name
);
// set the title of the field
...
...
@@ -32,7 +32,7 @@
}
}
// un-hide the title of the field
gadget
.
props
.
element
.
children
[
1
].
style
.
display
=
""
;
// gadget.props.element.children[1].style.display = ''
;
// if the gadget has properties defined (is an object with properties)
if
(
gadget
.
props
.
definition
.
property_def
.
properties
)
{
properties_dict
=
gadget
.
props
.
definition
.
property_def
.
properties
;
...
...
@@ -94,6 +94,7 @@
previous_value
=
gadget
.
props
.
options
.
value
[
prop_name
][
sub_title
];
}
}
sub_title_name
=
properties_dict
[
sub_title
].
name
||
sub_title
;
for
(
j
=
0
;
j
<=
inps
.
length
-
1
;
j
+=
1
)
{
// check if the input is one of a sub-gadget
// do not proceed if yes
...
...
@@ -116,7 +117,7 @@
inps
[
j
].
setAttribute
(
"
value
"
,
previous_value
===
undefined
?
default_value
:
previous_value
);
recent_occupied
.
push
(
inps
[
j
]);
// find the label for that input
inps
[
j
].
parentNode
.
parentNode
.
previousSibling
.
previousSibling
.
innerHTML
=
sub_title
;
inps
[
j
].
parentNode
.
parentNode
.
previousSibling
.
previousSibling
.
innerHTML
=
sub_title
_name
;
inps
[
j
].
parentNode
.
parentNode
.
previousSibling
.
previousSibling
.
setAttribute
(
"
for
"
,
sub_title
);
recent_occupied_labels
.
push
(
inps
[
j
].
parentNode
.
parentNode
.
previousSibling
.
previousSibling
);
// present them
...
...
dream/platform/static/fieldset/fieldset.js
View file @
0bd2b7f2
...
...
@@ -71,6 +71,8 @@
if
(
gadget
.
props
.
key
)
{
// style only recursive fieldsets
gadget
.
props
.
fieldset_element
.
style
[
"
border-width
"
]
=
"
1px
"
;
gadget
.
props
.
fieldset_element
.
style
[
"
border-radius
"
]
=
"
5px
"
;
gadget
.
props
.
fieldset_element
.
style
[
"
padding
"
]
=
"
1px
"
;
}
if
(
node_id
)
{
addField
(
"
id
"
,
options
.
property_definition
.
properties
.
id
||
{
...
...
dream/platform/static/manifest.appcache
View file @
0bd2b7f2
CACHE MANIFEST
# This manifest was generated by grunt-manifest HTML5 Cache Manifest Generator
# Time:
Fri Sep 04 2015 11:12:34
GMT+0200 (CEST)
# Time:
Tue Sep 08 2015 15:21:59
GMT+0200 (CEST)
CACHE:
daff/index.html
dream/InputModule_viewAddDocumentDialog.html
dream/InputModule_viewInputList.html
dream/Input_viewAttachDocument.html
dream/Input_viewDebugJson.html
dream/Input_viewDocumentManagement.html
dream/Input_viewProductionLine.html
dream/Input_viewResultComparison.html
dream/Input_viewResultList.html
dream/Input_viewSimulation.html
dream/Input_viewSpreadsheet.html
dream/Output_viewBottleneckGraph.html
dream/Output_viewCalendar.html
dream/Output_viewDownloadFile.html
dream/Output_viewExitStatistics.html
dream/Output_viewGantt.html
dream/Output_viewGraph.html
dream/Output_viewSpreadsheet.html
dream/Output_viewSpreadsheetComparison.html
dream/index.html
expandable_field/index.html
fieldset/index.html
handsontable/index.html
handsontable/test.html
integer_field/index.html
jio_bridge/index.html
jsplumb/index.html
jsplumb/test.html
list_field/index.html
number_field/index.html
string_field/index.html
toolbox/index.html
lib/images/ajax-loader.gif
lib/images/animated-overlay.gif
lib/images/ui-bg_flat_0_aaaaaa_40x100.png
lib/images/ui-bg_flat_75_ffffff_40x100.png
lib/images/ui-bg_glass_55_fbf9ee_1x400.png
lib/images/ui-bg_glass_65_ffffff_1x400.png
lib/images/ui-bg_glass_75_dadada_1x400.png
lib/images/ui-bg_glass_75_e6e6e6_1x400.png
lib/images/ui-bg_glass_95_fef1ec_1x400.png
lib/images/ui-bg_highlight-soft_75_cccccc_1x100.png
lib/images/ui-icons_222222_256x240.png
lib/images/ui-icons_2e83ff_256x240.png
lib/images/ui-icons_454545_256x240.png
lib/images/ui-icons_888888_256x240.png
lib/images/ui-icons_cd0a0a_256x240.png
daff/daff.js
dream/InputModule_viewAddDocumentDialog.js
dream/InputModule_viewInputList.js
...
...
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