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
8fd30c47
Commit
8fd30c47
authored
Sep 09, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: update static version
parent
ad68662d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
6 deletions
+36
-6
dream/platform/static/dream/InputModule_viewAddDocumentDialog.html
...tform/static/dream/InputModule_viewAddDocumentDialog.html
+3
-0
dream/platform/static/dream/InputModule_viewAddDocumentDialog.js
...latform/static/dream/InputModule_viewAddDocumentDialog.js
+30
-3
dream/platform/static/dream/Input_viewSimulation.js
dream/platform/static/dream/Input_viewSimulation.js
+1
-1
dream/platform/static/dream/index.js
dream/platform/static/dream/index.js
+1
-1
dream/platform/static/fieldset/fieldset.js
dream/platform/static/fieldset/fieldset.js
+1
-1
No files found.
dream/platform/static/dream/InputModule_viewAddDocumentDialog.html
View file @
8fd30c47
...
...
@@ -16,5 +16,8 @@
name=
"dream_import"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline ui-icon-plus ui-btn-icon-right"
>
Import
</button>
</form>
<form
class=
"create_new_form"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline ui-icon-plus ui-btn-icon-right"
>
Create New Empty
</button>
</form>
</body>
</html>
\ No newline at end of file
dream/platform/static/dream/InputModule_viewAddDocumentDialog.js
View file @
8fd30c47
/*global rJS, RSVP, promiseEventListener, promiseReadAsText,
initGadgetMixin */
initGadgetMixin
, prompt
*/
(
function
(
window
,
rJS
,
RSVP
,
promiseEventListener
,
promiseReadAsText
,
initGadgetMixin
)
{
"
use strict
"
;
function
createDocument
(
gadget
,
name
)
{
...
...
@@ -38,12 +38,39 @@
});
});
}
function
waitForCreateNew
(
gadget
)
{
var
json_data
,
name
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
return
promiseEventListener
(
gadget
.
props
.
element
.
getElementsByClassName
(
"
create_new_form
"
)[
0
],
"
submit
"
,
false
);
}).
push
(
function
(
evt
)
{
// Prevent double click
evt
.
target
.
getElementsByClassName
(
"
ui-btn
"
)[
0
].
disabled
=
true
;
return
gadget
.
aq_ajax
({
url
:
"
../DefaultConfiguration.json
"
,
type
:
"
GET
"
});
}).
push
(
function
(
evt
)
{
name
=
prompt
(
"
Name for this model
"
);
var
data
=
JSON
.
parse
(
evt
.
target
.
responseText
);
data
.
general
.
name
=
name
;
json_data
=
JSON
.
stringify
(
data
);
return
createDocument
(
gadget
,
name
);
}).
push
(
function
(
jio_document
)
{
// Add JSON as attachment
return
gadget
.
aq_putAttachment
({
_id
:
jio_document
.
id
,
_attachment
:
"
body.json
"
,
_data
:
json_data
,
_mimetype
:
"
application/json
"
});
});
}
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
.
declareAcquiredMethod
(
"
aq_post
"
,
"
jio_post
"
).
declareAcquiredMethod
(
"
aq_putAttachment
"
,
"
jio_putAttachment
"
).
declareAcquiredMethod
(
"
pleaseRedirectMyHash
"
,
"
pleaseRedirectMyHash
"
).
declareAcquiredMethod
(
"
whoWantsToDisplayThisDocument
"
,
"
whoWantsToDisplayThisDocument
"
).
declareMethod
(
"
startService
"
,
function
()
{
gadget_klass
.
declareAcquiredMethod
(
"
aq_post
"
,
"
jio_post
"
).
declareAcquiredMethod
(
"
aq_
ajax
"
,
"
jio_ajax
"
).
declareAcquiredMethod
(
"
aq_
putAttachment
"
,
"
jio_putAttachment
"
).
declareAcquiredMethod
(
"
pleaseRedirectMyHash
"
,
"
pleaseRedirectMyHash
"
).
declareAcquiredMethod
(
"
whoWantsToDisplayThisDocument
"
,
"
whoWantsToDisplayThisDocument
"
).
declareMethod
(
"
startService
"
,
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
().
push
(
function
()
{
return
waitForImport
(
gadget
);
return
RSVP
.
any
([
waitForImport
(
gadget
),
waitForCreateNew
(
gadget
)
]
);
}).
push
(
function
(
result
)
{
return
gadget
.
whoWantsToDisplayThisDocument
(
result
.
id
);
}).
push
(
function
(
url
)
{
...
...
dream/platform/static/dream/Input_viewSimulation.js
View file @
8fd30c47
/*global rJS, RSVP, jQuery, promiseEventListener, initGadgetMixin */
/*global rJS, RSVP, jQuery, promiseEventListener, initGadgetMixin
, alert
*/
/*jslint nomen: true */
(
function
(
window
,
rJS
,
RSVP
,
$
,
promiseEventListener
,
initGadgetMixin
)
{
"
use strict
"
;
...
...
dream/platform/static/dream/index.js
View file @
8fd30c47
/*global console, jQuery, rJS, RSVP, alert, Handlebars, initGadgetMixin, confirm */
/*global console, jQuery, rJS, RSVP, alert, Handlebars, initGadgetMixin, confirm
, alert
*/
/*jslint nomen: true */
(
function
(
window
,
$
,
rJS
,
RSVP
,
Handlebars
,
initGadgetMixin
)
{
"
use strict
"
;
...
...
dream/platform/static/fieldset/fieldset.js
View file @
8fd30c47
...
...
@@ -72,7 +72,7 @@
// 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
"
;
gadget
.
props
.
fieldset_element
.
style
.
padding
=
"
1px
"
;
}
if
(
node_id
)
{
addField
(
"
id
"
,
options
.
property_definition
.
properties
.
id
||
{
...
...
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