new intro-page, inputList and add new model are present in the same page....

new intro-page, inputList and add new model are present in the same page. Default getConfigurateion from server not updated yet. Buggy back to parrent as list does not update correctly. Storing lastSession in local storage. DreamInstance document to be dropped
parent 074c85c8
......@@ -29,7 +29,11 @@
/////////////////////////////////////////////////////////////////
.declareMethod("render", function () {
var gadget = this;
return gadget.aq_allDocs({"select_list": ["title", "modified"]})
return gadget.aq_allDocs({
"include_docs": true,
"query": 'type:= "Dream"',
"select_list": ["title", "modified"]
})
.push(function (document_list) {
var result_list = [],
doc,
......@@ -71,7 +75,6 @@
parameter_list.sort(function (a, b) {
return b.date - a.date;
});
// gadget.props.element.querySelector('a').href = document_list[0];
gadget.props.element.querySelector('.document_list').innerHTML =
......@@ -80,4 +83,4 @@
});
});
});
}(window, rJS, RSVP, Handlebars, initGadgetMixin));
}(window, rJS, RSVP, Handlebars, initGadgetMixin));
\ No newline at end of file
......@@ -18,8 +18,9 @@
<script id="panel-template" type="text/x-handlebars-template">
<ul data-role="listview">
<li><a class="home_link ui-btn ui-icon-home ui-btn-icon-left" data-icon="home">Documents</a></li>
<li><a class="fast_input_link ui-btn ui-icon-plus ui-btn-icon-left" data-icon="plus">New Document</a></li>
<li><a class="pre_input_link ui-btn ui-icon-grid ui-btn-icon-left" data-icon="grid">Documents</a></li>
<!--li><a class="home_link ui-btn ui-icon-home ui-btn-icon-left" data-icon="home">Documents</a></li-->
<!--li><a class="fast_input_link ui-btn ui-icon-plus ui-btn-icon-left" data-icon="plus">New Document</a></li-->
{{#navigationlist}}
<li><a href="{{link}}">{{title}}</a></li>
{{/navigationlist}}
......
This diff is collapsed.
/* ====================== listview checkbox ======================== */
/* allow checkbox and radio in split listview */
html body .ui-listview li.ui-li-has-checkbox {
padding-right: 2.25em;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
html body .ui-listview li.ui-li-has-checkbox label {
border-left-width: 0px;
-moz-box-sizing: border-box;
}
html .ui-listview li.ui-li-has-alt a.ui-btn.ui-icon-caret-right:after,
html .ui-listview li.ui-li-has-alt a.ui-btn.ui-icon-carat-r:after {
content: "";
}
html .ui-listview li div.ui-radio,
html .ui-listview li div.ui-checkbox {
height: 100%;
margin: 0;
padding: 0;
position: absolute;
right: 0;
top: 0;
width: 2.5em;
z-index: 2;
}
html body .ui-listview li div.ui-radio label.ui-btn,
html body .ui-listview li div.ui-checkbox label.ui-btn {
border-radius: .375em;
height: 100%;
min-height: 1em;
padding: 0;
width: auto;
}
html body .ui-listview li div.ui-radio,
html body .ui-listview li div.ui-radio label.ui-btn,
html body .ui-listview li div.ui-checkbox,
html body .ui-listview li div.ui-checkbox label.ui-btn {
box-shadow: 0;
-webkit-box-shadow: 0;
border-radius: 0;
-webkit-border-radius: 0;
}
html body .ui-listview li.ui-first-child div.ui-radio,
html body .ui-listview li.ui-first-child div.ui-radio label.ui-btn,
html body .ui-listview li.ui-first-child div.ui-checkbox,
html body .ui-listview li.ui-first-child div.ui-checkbox label.ui-btn {
border-top-right-radius: .375em;
-webkit-border-top-right-radius: .375em;
}
html body .ui-listview li.ui-last-child div.ui-radio,
html body .ui-listview li.ui-last-child div.ui-radio label,
html body .ui-listview li.ui-last-child div.ui-checkbox,
html body .ui-listview li.ui-last-child div.ui-checkbox label {
border-bottom-right-radius: .375em;
-webkit-border-bottom-right-radius: .375em;
border-bottom-width: 1px;
margin-bottom: -1px;
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Choose Instance</title>
<link rel="stylesheet" href="inputModule_viewAddInstanceDefinitionDialog.css" />
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="mixin_gadget.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script>
<script src="InputModule_viewAddInstanceDefinitionDialog.js" type="text/javascript"></script>
<!--script id="table-template" type="text/x-handlebars-template">
<ul data-role="listview" data-inset="true" class="document-listview">
{{#documentlist}}
<li><a href="{{link}}">{{title}}</a></li>
{{/documentlist}}
</ul>
</script-->
</head>
<body>
<div class="ui-grid-a ui-responsive">
<div class="ui-block-a">
<form class="new_form">
<button type="submit" class="ui-btn ui-btn ui-btn-inline ui-icon-plus ui-btn-icon-right">Default</button>
</form>
<form class="import_form">
<input id="dream_import" type="file" required=""
name="dream_import" class="ui-btn ui-btn-b ui-btn-inline">
<button type="submit" class="ui-btn ui-btn ui-btn-inline ui-icon-plus ui-btn-icon-right">Import</button>
</form>
</div>
<div class="ui-block-b">
<!--section class="document_list"></section-->
<form method="post" action="#">
<input type="hidden" name="method" value="delete_status" ></input>
<ul data-role="listview" class="document-list" data-inset="true"></ul>
<div class="ui-input-btn ui-btn ui-icon-delete ui-btn-inline ui-btn-icon-left">
Delete
<input type="submit" data-enhanced="true" value="Delete">
</div>
</form>
</div>
</div>
</body>
</html>
/*global window, document, RSVP, rJS, initGadgetMixin*/
/*global window, document, RSVP, rJS, initGadgetMixin, console*/
(function (window, document, RSVP, rJS, initGadgetMixin) {
"use strict";
......@@ -38,21 +38,31 @@
tools_container = document.createElement('div');
/* display all nodes in the palette.
*/
console.log("RENDERING TOOLBOX");
tools_container.className = 'tools-container';
Object.keys(data.class_definition).forEach(function (key) {
var _class = data.class_definition[key], tool;
var _class_object = data.class_definition[key], tool;
// XXX "expand" the json schema "allOF" etc
if (_class._class === 'node') {
tool = document.createElement('div');
// XXX maybe allow to configure the class name ?
tool.className = "tool " + key;
tool.textContent = _class.name || key;
tool.draggable = true;
tool.dataset.class_name = JSON.stringify(key);
Object.keys(_class.css || {}).forEach(function (k) {
tool.style[k] = _class.css[k];
});
tools_container.appendChild(tool);
console.log(_class_object);
if (_class_object.allOf) {
console.log("yupi");
if (_class_object.allOf[0].$ref === "#/class_definition/node") {
console.log("yupi2");
tool = document.createElement('div');
// XXX maybe allow to configure the class name ?
tool.className = "tool " + key;
console.log("..");
console.log(tool.className);
tool.textContent = _class_object.name || key;
console.log(tool.textContent);
tool.draggable = true;
tool.dataset.class_name = JSON.stringify(key);
console.log(tool.dataset.class_name);
Object.keys(_class_object.css || {}).forEach(function (k) {
tool.style[k] = _class_object.css[k];
});
tools_container.appendChild(tool);
}
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment