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
67486af2
Commit
67486af2
authored
Mar 17, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update static version
parent
db75d68f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
dream/platform/static/fieldset/fieldset.js
dream/platform/static/fieldset/fieldset.js
+3
-0
dream/platform/static/integer_field/index.html
dream/platform/static/integer_field/index.html
+18
-0
dream/platform/static/integer_field/integerfield.js
dream/platform/static/integer_field/integerfield.js
+22
-0
No files found.
dream/platform/static/fieldset/fieldset.js
View file @
67486af2
...
...
@@ -42,6 +42,9 @@
if
(
property_definition
.
type
===
"
number
"
)
{
return
gadget
.
declareGadget
(
"
../number_field/index.html
"
);
}
if
(
property_definition
.
type
===
"
integer
"
)
{
return
gadget
.
declareGadget
(
"
../integer_field/index.html
"
);
}
if
(
property_definition
.
enum
)
{
return
gadget
.
declareGadget
(
"
../list_field/index.html
"
);
}
...
...
dream/platform/static/integer_field/index.html
0 → 100644
View file @
67486af2
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
Number field
</title>
<!-- renderjs -->
<script
src=
"../lib/rsvp.min.js"
></script>
<script
src=
"../lib/renderjs.min.js"
></script>
<!-- custom script -->
<script
src=
"integerfield.js"
type=
"text/javascript"
></script>
</head>
<body>
<input
type=
'number'
step=
"1"
data-mini=
"true"
/>
</body>
</html>
dream/platform/static/integer_field/integerfield.js
0 → 100644
View file @
67486af2
/*global window, rJS */
(
function
(
window
,
rJS
)
{
"
use strict
"
;
rJS
(
window
).
ready
(
function
(
gadget
)
{
return
gadget
.
getElement
().
push
(
function
(
element
)
{
gadget
.
element
=
element
;
});
}).
declareMethod
(
"
render
"
,
function
(
options
)
{
var
input
=
this
.
element
.
querySelector
(
"
input
"
);
input
.
setAttribute
(
"
value
"
,
options
.
value
);
input
.
setAttribute
(
"
name
"
,
options
.
key
);
input
.
setAttribute
(
"
title
"
,
options
.
property_definition
.
description
);
}).
declareMethod
(
"
getContent
"
,
function
()
{
var
input
=
this
.
element
.
querySelector
(
"
input
"
),
result
=
{};
if
(
input
.
value
!==
""
)
{
result
[
input
.
getAttribute
(
"
name
"
)]
=
parseFloat
(
input
.
value
);
}
else
{
result
[
input
.
getAttribute
(
"
name
"
)]
=
null
;
}
return
result
;
});
})(
window
,
rJS
);
\ No newline at end of file
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