Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos.core
Commits
7270b9ba
Commit
7270b9ba
authored
Mar 18, 2015
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_web: Also trigger submit.
parent
817c0456
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
23 deletions
+30
-23
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_parameter_form_js.xml
...lateItem/web_page_module/rjs_slapos_parameter_form_js.xml
+23
-13
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_request_form_js.xml
...mplateItem/web_page_module/rjs_slapos_request_form_js.xml
+7
-10
No files found.
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_parameter_form_js.xml
View file @
7270b9ba
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
/*jslint nomen: true, maxlen: 200, indent: 2*/\n
/*jslint nomen: true, maxlen: 200, indent: 2*/\n
/*global rJS, console, window, document, loopEventListener, $, XMLSerializer, jQuery, URI, vkbeautify */\n
/*global rJS, console, window, document, loopEventListener, $, XMLSerializer, jQuery, URI, vkbeautify */\n
\n
\n
(function (window, document, rJS, loopEventListener, $, XMLSerializer, jQuery,
URI,
vkbeautify) {\n
(function (window, document, rJS, loopEventListener, $, XMLSerializer, jQuery, vkbeautify) {\n
"use strict";\n
"use strict";\n
\n
\n
var gk = rJS(window);\n
var gk = rJS(window);\n
...
@@ -197,6 +197,10 @@
...
@@ -197,6 +197,10 @@
function validateForm(gadget, json_url) {\n
function validateForm(gadget, json_url) {\n
return gadget.processValidation(json_url);\n
return gadget.processValidation(json_url);\n
}\n
}\n
\n
function submitForm(gadget, json_url) {\n
return gadget.processValidation(json_url);\n
}\n
\n
\n
//function getSoftwareTypeFromForm(element) {\n
//function getSoftwareTypeFromForm(element) {\n
// var software_type;\n
// var software_type;\n
...
@@ -299,7 +303,9 @@
...
@@ -299,7 +303,9 @@
input,\n
input,\n
div_input,\n
div_input,\n
span_error,\n
span_error,\n
promise_list = [],\n
span_info,\n
span_info,\n
fieldset_list = g.props.element.querySelectorAll(\'fieldset\'),\n
fieldset = document.createElement("fieldset"),\n
fieldset = document.createElement("fieldset"),\n
fieldset_optional = document.createElement("fieldset");\n
fieldset_optional = document.createElement("fieldset");\n
\n
\n
...
@@ -333,21 +339,25 @@
...
@@ -333,21 +339,25 @@
} else {\n
} else {\n
fieldset.appendChild(div);\n
fieldset.appendChild(div);\n
}\n
}\n
loopEventListener(\n
promise_list.push(
loopEventListener(\n
input,\n
input,\n
\'change\',\n
\'change\',\n
false,\n
false,\n
validateForm.bind(g, g, json_url)\n
validateForm.bind(g, g, json_url)\n
);\n
));\n
promise_list.push(loopEventListener(\n
input,\n
\'submit\',\n
false,\n
submitForm.bind(g, g, json_url)\n
));\n
}\n
}\n
}\n
}\n
return [fieldset, fieldset_optional];\n
$(fieldset_list[1]).replaceWith(fieldset);\n
}).push(function (new_fieldset_list) {\n
$(fieldset_list[2]).replaceWith(fieldset_optional);\n
var fieldset_list = g.props.element.querySelectorAll(\'fieldset\');\n
return RSVP.all(promise_list);\n
\n
}).push(function () {\n
$(fieldset_list[1]).replaceWith(new_fieldset_list[0]);\n
console.log("LOADED All Promises")\n
$(fieldset_list[2]).replaceWith(new_fieldset_list[1]);\n
return fieldset_list;\n
});\n
});\n
})\n
})\n
\n
\n
...
@@ -477,7 +487,7 @@
...
@@ -477,7 +487,7 @@
});\n
});\n
});\n
});\n
\n
\n
}(window, document, rJS, loopEventListener, $, XMLSerializer, jQuery,
URI,
vkbeautify));
}(window, document, rJS, loopEventListener, $, XMLSerializer, jQuery, vkbeautify));
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
...
@@ -614,7 +624,7 @@
...
@@ -614,7 +624,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
941.4
6904.21655.48418
</string>
</value>
<value>
<string>
941.4
7120.44131.43212
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -632,7 +642,7 @@
...
@@ -632,7 +642,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1426
596317.01
</float>
<float>
1426
618698.56
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_web/PathTemplateItem/web_page_module/rjs_slapos_request_form_js.xml
View file @
7270b9ba
...
@@ -108,11 +108,8 @@
...
@@ -108,11 +108,8 @@
json_url = "sample_schema.json";\n
json_url = "sample_schema.json";\n
\n
\n
gk.declareMethod(\'render\', function (options) {\n
gk.declareMethod(\'render\', function (options) {\n
//if (options.parameter.software_release_url === undefined) {\n
\n
// throw new Error("undefined software_release_url");\n
var g = this;\n
//}\n
var g = this,\n
element = g.__element.getElementsByTagName(\'form\')[0];\n
\n
\n
options.json_url = "../../renderjs/slapos_load_schema_software_type.json";\n
options.json_url = "../../renderjs/slapos_load_schema_software_type.json";\n
options.parameter = {};\n
options.parameter = {};\n
...
@@ -136,11 +133,11 @@
...
@@ -136,11 +133,11 @@
\n
\n
return g.getDeclaredGadget(\'parameter\')\n
return g.getDeclaredGadget(\'parameter\')\n
.push(function (gadget) {\n
.push(function (gadget) {\n
return gadget.render(options);\n
return gadget.render(options).push(function () {\n
console.log("FINISH TO LOADED");\n
});\n
});\n
});\n
\n
});\n
});\n
console.log("LOADED");\n
\n
\n
}(window, rJS, $, loopEventListener));
</string>
</value>
}(window, rJS, $, loopEventListener));
</string>
</value>
</item>
</item>
...
@@ -277,7 +274,7 @@
...
@@ -277,7 +274,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
941.4
2676.28317.52480
</string>
</value>
<value>
<string>
941.4
7267.50185.4608
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -295,7 +292,7 @@
...
@@ -295,7 +292,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1426
343134.63
</float>
<float>
1426
617885.75
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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