Commit a9d31fd3 authored by Romain Courteaud's avatar Romain Courteaud Committed by Jérome Perrin

Update static version.

parent 1bc8307f
......@@ -6,34 +6,37 @@
var key = this.props.jio_key, gadget = this;
return new RSVP.Queue().push(function() {
// XXX Conditional simulation menu
return RSVP.all([ gadget.whoWantToDisplayThisDocumentPage("edit_table", key), gadget.whoWantToDisplayThisDocumentPage("run_simulation", key), gadget.whoWantToDisplayThisDocumentPage("manage_document", key), gadget.whoWantToDisplayThisDocumentPage("station_utilisation_graph", key), gadget.whoWantToDisplayThisDocumentPage("queue_stat_graph", key), gadget.whoWantToDisplayThisDocumentPage("exit_stat", key), gadget.whoWantToDisplayThisDocumentPage("job_gantt", key), gadget.whoWantToDisplayThisDocumentPage("job_schedule_spreadsheet", key), gadget.whoWantToDisplayThisDocumentPage("debug_json", key) ]);
return RSVP.all([ gadget.whoWantToDisplayThisDocumentPage("production_line", key), gadget.whoWantToDisplayThisDocumentPage("edit_table", key), gadget.whoWantToDisplayThisDocumentPage("run_simulation", key), gadget.whoWantToDisplayThisDocumentPage("manage_document", key), gadget.whoWantToDisplayThisDocumentPage("station_utilisation_graph", key), gadget.whoWantToDisplayThisDocumentPage("queue_stat_graph", key), gadget.whoWantToDisplayThisDocumentPage("exit_stat", key), gadget.whoWantToDisplayThisDocumentPage("job_gantt", key), gadget.whoWantToDisplayThisDocumentPage("job_schedule_spreadsheet", key), gadget.whoWantToDisplayThisDocumentPage("debug_json", key) ]);
}).push(function(result_list) {
return [ {
link: result_list[0],
title: "Edit table"
title: "Production line"
}, {
link: result_list[1],
title: "Run simulation"
title: "Edit table"
}, {
link: result_list[2],
title: "Manage document"
title: "Run simulation"
}, {
link: result_list[3],
title: "Stations Utilization"
title: "Manage document"
}, {
link: result_list[4],
title: "Queues Statistics"
title: "Stations Utilization"
}, {
link: result_list[5],
title: "Exit Statistics"
title: "Queues Statistics"
}, {
link: result_list[6],
title: "Job Gantt"
title: "Exit Statistics"
}, {
link: result_list[7],
title: "Job Schedule"
title: "Job Gantt"
}, {
link: result_list[8],
title: "Job Schedule"
}, {
link: result_list[9],
title: "Debug JSON"
} ];
});
......
@media (min-width:35em){.jqm-navmenu-panel.ui-panel-closed{visibility:visible!important;width:17em;-webkit-transition:none!important;-moz-transition:none!important;transition:none!important;-webkit-transform:none!important;-moz-transform:none!important;transform:none!important;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;height:100%;position:absolute;display:block}.ui-panel-page-content-open{width:auto}.ui-panel-page-content-open.ui-panel-page-content-position-left{margin-right:17em}.ui-panel-dismiss,.menu_link{display:none!important}.gadget_container,header{margin-left:17em}.close-entry{display:none!important}.gadget_container{padding:1em}}
\ No newline at end of file
@media (min-width:35em){.jqm-navmenu-panel.ui-panel-closed{visibility:visible!important;width:17em;-webkit-transition:none!important;-moz-transition:none!important;transition:none!important;-webkit-transform:none!important;-moz-transform:none!important;transform:none!important;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;height:100%;position:absolute;display:block}.ui-panel-page-content-open{width:auto}.ui-panel-page-content-open.ui-panel-page-content-position-left{margin-right:17em}.ui-panel-dismiss,.menu_link{display:none!important}.gadget_container,header{margin-left:17em}.close-entry{display:none!important}.gadget_container{padding:1em}}[data-gadget-scope=productionline] #main{position:relative;margin:20px auto;font-size:80%;border:1px solid #999;width:100%;height:600px;overflow:hidden;border-radius:10px;background-color:#eaedef;text-align:center}[data-gadget-scope=productionline] .selected{color:#bd0b0b!important}[data-gadget-scope=productionline] .window,[data-gadget-scope=productionline] .label{background-color:#fff;text-align:center;z-index:23;cursor:pointer;box-shadow:2px 2px 19px #aaa;-o-box-shadow:2px 2px 19px #aaa;-webkit-box-shadow:2px 2px 19px #aaa;-moz-box-shadow:2px 2px 19px #aaa}[data-gadget-scope=productionline] path,[data-gadget-scope=productionline] ._jsPlumb_endpoint{cursor:pointer}[data-gadget-scope=productionline] ._jsPlumb_endpoint_drop_allowed{border:4px solid #123456;box-shadow:6px 6px 19px #444;-o-box-shadow:6px 6px 19px #444;-webkit-box-shadow:6px 6px 19px #444;-moz-box-shadow:6px 6px 19px #444}[data-gadget-scope=productionline] ._jsPlumb_connector{z-index:18}[data-gadget-scope=productionline] ._jsPlumb_endpoint{z-index:19}[data-gadget-scope=productionline] ._jsPlumb_overlay{z-index:23}[data-gadget-scope=productionline] ._jsPlumb_connector._jsPlumb_hover{z-index:21!important}[data-gadget-scope=productionline] ._jsPlumb_endpoint._jsPlumb_hover{z-index:22!important}[data-gadget-scope=productionline] ._jsPlumb_overlay{border:1px solid #346789;opacity:.8;filter:alpha(opacity=80);background-color:#fff;color:#000;font-family:helvetica;padding:.5em}[data-gadget-scope=productionline] .Dream-Source,[data-gadget-scope=productionline] .Dream-BatchSource{border:1px solid #bbc;background-color:#ffe;background-image:linear-gradient(to bottom,#ffe 0,#dde 100%)}[data-gadget-scope=productionline] .Dream-Machine,[data-gadget-scope=productionline] .Dream-MachineJobShop,[data-gadget-scope=productionline] .Dream-BatchScrapMachine,[data-gadget-scope=productionline] .Dream-MachineManagedJob,[data-gadget-scope=productionline] .Dream-MouldAssembly{border:1px solid #cbc;background-color:#fef;background-image:linear-gradient(to bottom,#fef 0,#ede 100%)}[data-gadget-scope=productionline] .Dream-Queue,[data-gadget-scope=productionline] .Dream-QueueJobShop,[data-gadget-scope=productionline] .Dream-LineClearance,[data-gadget-scope=productionline] .Dream-QueueManagedJob,[data-gadget-scope=productionline] .Dream-ConditionalBuffer,[data-gadget-scope=productionline] .Dream-OrderDecomposition,[data-gadget-scope=productionline] .Dream-MouldAssemblyBuffer{border:1px solid #bcc;background-color:#eff;background-image:linear-gradient(to bottom,#eff 0,#dee 100%)}[data-gadget-scope=productionline] .Dream-Exit,[data-gadget-scope=productionline] .Dream-ExitJobShop{border:1px solid #ccb;background-color:#eef;background-image:linear-gradient(to bottom,#eef 0,#dde 100%)}[data-gadget-scope=productionline] .Dream-EventGenerator{border:1px solid #cba;background-color:#fdc;background-image:linear-gradient(to bottom,#fdc 0,#ecb 100%)}[data-gadget-scope=productionline] .Dream-BatchDecomposition,[data-gadget-scope=productionline] .Dream-BatchDecompositionStartTime,[data-gadget-scope=productionline] .Dream-BatchReassembly{border:1px solid #bcb;background-color:#dfd;background-image:linear-gradient(to bottom,#dfd 0,#cec 100%)}[data-gadget-scope=productionline] .Dream-Repairman{border:1px solid #cbb;background-color:#fdd;background-image:linear-gradient(to bottom,#fdd 0,#dcc 100%)}[data-gadget-scope=productionline] .window,[data-gadget-scope=productionline] .dummy_window{border:1px solid #d3d3d3;width:100px;height:64px;position:absolute;color:#000;font-family:serif;font-style:italic;padding-top:.9em;font-size:.9em;cursor:move;font-size:11px;-webkit-transition:background-color .1s ease-in;-moz-transition:background-color .1s ease-in;transition:background-color .1s ease-in;border-radius:5px}[data-gadget-scope=productionline] .window:hover{background-color:#5c96bc;background-image:none;color:#fff}[data-gadget-scope=productionline] .dummy_window{position:absolute;top:0;left:0;visibility:hidden}[data-gadget-scope=productionline] .ep{position:absolute;bottom:37%;right:5px;width:1em;height:1em;background-color:orange;cursor:pointer;box-shadow:0 0 2px #000;-webkit-transition:-webkit-box-shadow .25s ease-in;-moz-transition:-moz-box-shadow .25s ease-in;transition:box-shadow .25s ease-in}[data-gadget-scope=productionline] ._jsPlumb_source_hover,[data-gadget-scope=productionline] ._jsPlumb_target_hover,[data-gadget-scope=productionline] .dragHover{background-color:#1e8151;background-image:none;color:#fff}[data-gadget-scope=productionline] path{cursor:pointer}
\ 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>Edit table</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="document_page_mixin.js" type="text/javascript"></script>
<script src="production_line.js" type="text/javascript"></script>
</head>
<body>
<div data-gadget-url="../jsplumb/index.html"
data-gadget-scope="productionline"></div>
</body>
</html>
/*global window, rJS, RSVP, initDocumentPageMixin */
/*jslint nomen: true */
(function(window, rJS, RSVP, initDocumentPageMixin) {
"use strict";
var gadget_klass = rJS(window);
initDocumentPageMixin(gadget_klass);
gadget_klass.ready(function(g) {
g.props = {};
}).ready(function(g) {
return g.getElement().push(function(element) {
g.props.element = element;
});
}).declareAcquiredMethod("aq_getAttachment", "jio_getAttachment").declareMethod("render", function(options) {
var jio_key = options.id, gadget = this;
gadget.props.jio_key = jio_key;
return new RSVP.Queue().push(function() {
return RSVP.all([ gadget.aq_getAttachment({
_id: jio_key,
_attachment: "body.json"
}), gadget.getDeclaredGadget("productionline") ]);
}).push(function(result_list) {
return result_list[1].render(result_list[0]);
});
}).declareMethod("startService", function() {
return this.getDeclaredGadget("productionline").push(function(productionline) {
return productionline.startService();
});
});
})(window, rJS, RSVP, initDocumentPageMixin);
\ No newline at end of file
......@@ -6,13 +6,22 @@
<title>Run Simulation</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="../lib/handlebars.min.js" type="text/javascript"></script>
<script src="../lib/jquery.js" type="text/javascript"></script>
<script src="../lib/jquerymobile.js" type="text/javascript"></script>
<script id="label-template" type="text/x-handlebars-template">
<label>{{label}}</label>
</script>
<script src="document_page_mixin.js" type="text/javascript"></script>
<script src="run_simulation.js" type="text/javascript"></script>
</head>
<body>
<form>
<fieldset class="simulation_parameters">
</fieldset>
</form>
<form class="run_form">
<button type="submit" class="ui-btn ui-btn-b ui-btn-inline
ui-icon-refresh ui-btn-icon-right">Run Simulation</button>
......
/*global console, rJS, RSVP, initDocumentPageMixin, jQuery */
(function(window, rJS, RSVP, initDocumentPageMixin, $) {
/*global rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars */
/*jslint nomen: true, maxlen: 200 */
(function(window, rJS, RSVP, initDocumentPageMixin, $, Handlebars) {
"use strict";
function promiseEventListener(target, type, useCapture) {
//////////////////////////
......@@ -22,7 +23,11 @@
}
return new RSVP.Promise(resolver, canceller);
}
var gadget_klass = rJS(window);
/////////////////////////////////////////////////////////////////
// Handlebars
/////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance
var gadget_klass = rJS(window), source = gadget_klass.__template_element.getElementById("label-template").innerHTML, label_template = Handlebars.compile(source);
initDocumentPageMixin(gadget_klass);
gadget_klass.ready(function(g) {
g.props = {};
......@@ -31,7 +36,45 @@
g.props.element = element;
});
}).declareAcquiredMethod("aq_getAttachment", "jio_getAttachment").declareAcquiredMethod("aq_putAttachment", "jio_putAttachment").declareAcquiredMethod("aq_ajax", "jio_ajax").declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash").declareAcquiredMethod("whoWantToDisplayThisDocumentPage", "whoWantToDisplayThisDocumentPage").declareMethod("render", function(options) {
var i, gadget = this, property, parent_element = gadget.props.element.querySelector(".simulation_parameters"), value, queue, data, property_list = options.configuration_dict["Dream-Configuration"].property_list;
this.props.jio_key = options.id;
queue = gadget.aq_getAttachment({
_id: gadget.props.jio_key,
_attachment: "body.json"
}).push(function(json) {
data = JSON.parse(json).general;
});
function addField(property, value) {
var sub_gadget;
queue.push(function() {
parent_element.insertAdjacentHTML("beforeend", label_template({
label: property.name || property.id
}));
return gadget.declareGadget("../string_field/index.html");
}).push(function(gg) {
sub_gadget = gg;
value = data[property.id] || value;
return sub_gadget.render({
field_json: {
title: property.description || "",
key: property.id,
value: value
}
});
}).push(function() {
return sub_gadget.getElement();
}).push(function(sub_element) {
parent_element.appendChild(sub_element);
});
}
for (i = 0; i < property_list.length; i += 1) {
property = property_list[i];
if (property._class === "Dream.Property") {
value = property._default || "";
addField(property, value);
}
}
return queue;
}).declareMethod("startService", function() {
var gadget = this;
return new RSVP.Queue().push(function() {
......@@ -76,4 +119,4 @@
return gadget.pleaseRedirectMyHash(url);
});
});
})(window, rJS, RSVP, initDocumentPageMixin, jQuery);
\ No newline at end of file
})(window, rJS, RSVP, initDocumentPageMixin, jQuery, Handlebars);
\ No newline at end of file
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!--link rel="stylesheet" href="lib/jquery-ui.css"-->
<!--script src="curl.jquery.relative_dest %>"></script-->
<!--script src="curl.jqueryuijs.relative_dest %>"></script-->
<script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="../lib/jquery.jsplumb.min.js" type="text/javascript"></script>
<script src="jsplumb.js"></script>
</head>
<body>
<div id="main"></div>
<div class="dummy_window"></div>
</body>
</html>
body {
padding:0;
margin:0;
background-color:white;
font-family:'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
text-align:center;
}
#headerWrapper {
display:none;
width:100%;
background-color:black;
position:fixed;
top:0;
left:0;
height:44px;
padding:0;
border-bottom:1px solid #999;
box-shadow: 0px 2px 19px #aaa;
-o-box-shadow: 0px 2px 19px #aaa;
-webkit-box-shadow: 0px 2px 19px #aaa;
-moz-box-shadow: 0px 2px 19px #aaa;
opacity:0.8;
}
#intro {
margin-top:59px;
}
#main {
/* these two margins settings are here just to ensure that jsPlumb handles
margins properly.*/
position: relative;
margin:20px auto;
font-size: 80%;
border: 1px solid #999;
width: 100%;
height: 600px;
overflow: hidden;
border-radius: 10px;
background-color:#eaedef;
text-align: center;
}
/* Setting for dialog */
label, input {
display:block;
}
input.text, select {
margin:4px;
padding:0;
width:95%;
}
fieldset {
padding:0;
border:0;
margin-top:25px;
}
h1 {
font-size: 1.2em;
margin: .6em 0;
}
div#users-contain {
width: 350px;
margin: 20px 0;
}
div#users-contain table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
}
div#users-contain table td, div#users-contain table th {
border: 1px solid #eee;
padding: .6em 10px;
text-align: left;
}
.ui-dialog .ui-state-error {
padding: .3em;
}
.validateTips {
border: 1px solid transparent;
padding: 0.3em;
}
/* End of dialog setting */
li {
margin: 3px;
/*padding: 1px;*/
/*text-align: -webkit-match-parent;*/
background: #e6e6e6;
border: 1px solid #d3d3d3;
list-style-type: none;
width: 120px;
}
#sidebar {
font-size:13px;
}
/* demo elements */
.menu, #explanation {
background-color:#fff;
}
.menu {
height: 15px;
float:right;
padding-top:1em;
padding-bottom:0.4em;
background-color: transparent;
margin-right:30px;
}
.otherLibraries {
display:inline;
}
a, a:visited {
text-decoration:none;
color:#01a3c6;
font-family:helvetica;
padding:0.3em;
border-radius:0.2em;
}
a:hover {
color:#1b911b;
}
.selected {
color:rgb(189, 11, 11) !important;
}
.window, .label {
background-color:white;
text-align:center;
z-index:23;
cursor:pointer;
box-shadow: 2px 2px 19px #aaa;
-o-box-shadow: 2px 2px 19px #aaa;
-webkit-box-shadow: 2px 2px 19px #aaa;
-moz-box-shadow: 2px 2px 19px #aaa;
}
path, ._jsPlumb_endpoint {
cursor:pointer;
}
._jsPlumb_endpoint_drop_allowed {
border: 4px solid #123456;
box-shadow: 6px 6px 19px #444;
-o-box-shadow: 6px 6px 19px #444;
-webkit-box-shadow: 6px 6px 19px #444;
-moz-box-shadow: 6px 6px 19px #444;
}
/* z index stuff */
._jsPlumb_connector {
z-index:18;
}
._jsPlumb_endpoint {
z-index:19;
}
._jsPlumb_overlay {
z-index:23;
}
._jsPlumb_connector._jsPlumb_hover {
z-index:21 !important;
}
._jsPlumb_endpoint._jsPlumb_hover {
z-index:22 !important;
}
._jsPlumb_overlay {
border:1px solid #346789;
opacity:0.8;
filter:alpha(opacity=80);
background-color:white;
color:black;
font-family:helvetica;
padding:0.5em;
}
/* DREAM specific css */
#available {
position: absolute;
width: 200px;
height: 200px;
border: 2px solid;
margin-top: 350px;
margin-left: 150px;
border-radius: 10px;
}
#tools {
/* position: absolute;
width: 200px;
height: 400px; */
width: 100%;
border: 1px solid #999;
margin: 20px 0;
border-radius: 10px;
padding-bottom: 20px;
}
#tools-container {
margin-bottom: 4px;
}
#simulation_controls {
/* position: absolute;
width: 200px;
height: 300px;
margin-top: 550px;
margin-left: 35px;
font-size:13px; */
width: 100%;
border: 1px solid #999;
border-radius: 10px;
}
.tool {
border: 1px solid lightgray;
box-shadow: 1px 1px 2px #aaa;
/*margin-top: 20px;
margin-left: 35px;*/
min-width:7em;
height:2em;
z-index: 10001;
color: gray;
font-family:serif;
font-style:italic;
padding-top:0.9em;
font-size:0.9em;
margin:0.5em;
display: inline-block;
border-radius: 5px;
}
#graph {
width: 70%;
height: 250px;
text-align: center;
margin-left:auto;
margin-right:auto;
padding-top:2px;
margin-top:0px;
}
#queue_stat_graph {
width: 70%;
height: 250px;
text-align: center;
margin-left:auto;
margin-right:auto;
padding-top:2px;
margin-top:0px;
}
#tools .ui-button {
width:80%;
margin:4px 0;
}
.Dream-Source, .Dream-BatchSource {
border: 1px solid #bbc;
background-color:#ffe;
background-image: linear-gradient(to bottom, #ffe 0%, #dde 100%);
}
.Dream-Machine, .Dream-MachineJobShop, .Dream-BatchScrapMachine, .Dream-MachineManagedJob, .Dream-MouldAssembly {
border: 1px solid #cbc;
background-color: #fef;
background-image: linear-gradient(to bottom, #fef 0%, #ede 100%);
}
.Dream-Queue, .Dream-QueueJobShop, .Dream-LineClearance, .Dream-QueueManagedJob, .Dream-ConditionalBuffer, .Dream-OrderDecomposition, .Dream-MouldAssemblyBuffer {
border: 1px solid #bcc;
background-color:#eff;
background-image: linear-gradient(to bottom, #eff 0%, #dee 100%);
}
.Dream-Exit, .Dream-ExitJobShop {
border: 1px solid #ccb;
background-color:#eef;
background-image: linear-gradient(to bottom, #eef 0%, #dde 100%);
}
.Dream-EventGenerator {
border: 1px solid #cba;
background-color:#fdc;
background-image: linear-gradient(to bottom, #fdc 0%, #ecb 100%);
}
.Dream-BatchDecomposition, .Dream-BatchDecompositionStartTime, .Dream-BatchReassembly {
border: 1px solid #bcb;
background-color:#dfd;
background-image: linear-gradient(to bottom, #dfd 0%, #cec 100%);
}
.Dream-Repairman {
border: 1px solid #cbb;
background-color:#fdd;
background-image: linear-gradient(to bottom, #fdd 0%, #dcc 100%);
}
#exit_stat {
display: inline-block;
}
#exit_stat table, #exit_stat td {
border: 1px solid black;
}
.window, .dummy_window {
border:1px solid lightgray;
width:100px;
height:64px;
position:absolute;
color:black;
font-family:serif;
font-style:italic;
padding-top:0.9em;
font-size:0.9em;
cursor:move;
font-size:11px;
-webkit-transition:background-color 0.1s ease-in;
-moz-transition:background-color 0.1s ease-in;
transition:background-color 0.1s ease-in;
border-radius: 5px;
}
.window:hover {
background-color: #5c96bc;
background-image: none;
color:white;
}
.dummy_window {
position: absolute;
top: 0;
left: 0;
visibility: hidden;
}
#debug_json textarea {
width:95%;
}
#error{
text-align: left;
}
.ep {
position:absolute;
bottom:37%;
right:5px;
width:1em;
height:1em;
background-color:orange;
cursor:pointer;
box-shadow: 0px 0px 2px black;
-webkit-transition:-webkit-box-shadow 0.25s ease-in;
-moz-transition:-moz-box-shadow 0.25s ease-in;
transition:box-shadow 0.25s ease-in;
}
._jsPlumb_source_hover, ._jsPlumb_target_hover, .dragHover {
background-color:#1e8151;
background-image: none;
color:white;
}
path {
cursor:pointer;
}
#spreadsheet_output {
margin: 20px 0;
}
#gantt_output {
height: 400px;
margin: 20px 0;
}
.sub_task {
background-color: #3DD388;
border-color: #28B06C;
}
li.result {
width: 100%;
text-align: left;
cursor:pointer;
}
li.result.active {
background:#fcc;
}
......@@ -15,468 +15,444 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with DREAM. If not, see <http://www.gnu.org/licenses/>.
* =========================================================================== */
(function (scope, $, jsPlumb, console) {
* ======================================================================== */
/*global jsPlumb, rJS, RSVP */
/*jslint maxlen: 200 */
(function(jsPlumb, rJS, RSVP) {
"use strict";
scope.jsonPlumb = function () {
var that = {}, priv = {};
that.getNodeId = function (element_id) {
var node_id;
$.each(priv.node_container, function (k, v) {
if (v['element_id'] === element_id) {
node_id = k;
return false;
}
});
return node_id;
};
that.getElementId = function (node_id) {
return priv.node_container[node_id].element_id;
};
that.generateNodeId = function (element_type, option) {
var n = 1;
while (((option['short_id'] || element_type) + n) in priv.node_container) {
n += 1;
}
return (option['short_id'] || element_type) + n;
};
that.generateElementId = function () {
var n = 1;
while ($('#DreamNode_' + n).length > 0) {
n += 1;
}
return 'DreamNode_' + n;
};
priv.initJsPlumb = function () {
jsPlumb.setRenderMode(jsPlumb.SVG);
var color = "#00f";
jsPlumb.importDefaults({
// var that = {}, priv = {}, gadget_element;
//
// that.getNodeId = function (element_id) {
// var node_id;
// $.each(priv.node_container, function (k, v) {
// if (v.element_id === element_id) {
// node_id = k;
// return false;
// }
// });
// return node_id;
// };
//
// that.getElementId = function (node_id) {
// return priv.node_container[node_id].element_id;
// };
//
// that.generateNodeId = function (element_type, option) {
// var n = 1;
// while (((option.short_id || element_type) + n) in priv.node_container) {
// n += 1;
// }
// return (option.short_id || element_type) + n;
// };
//
// that.generateElementId = function () {
// var n = 1;
// while ($(gadget_element).find('#DreamNode_' + n).length > 0) {
// n += 1;
// }
// return 'DreamNode_' + n;
// };
//
// priv.initJsPlumb = function () {
// jsPlumb.setRenderMode(jsPlumb.SVG);
// jsPlumb.importDefaults({
// HoverPaintStyle: {
// strokeStyle: "#1e8151",
// lineWidth: 2
// },
// Endpoint: ["Dot", {
// radius: 2
// }],
// ConnectionOverlays: [
// ["Arrow", {
// location: 1,
// id: "arrow",
// length: 14,
// foldback: 0.8
// }]
// ],
// Container: "main"
// });
// // listen for clicks on connections, and offer to change values on click.
// jsPlumb.bind("click", function (conn) {
// jsPlumb.detach(conn);
// });
//
// jsPlumb.bind("beforeDetach", function (conn) {
// return confirm("Delete connection?");
// });
//
// jsPlumb.bind("connectionDrag", function (connection) {});
//
// jsPlumb.bind("connectionDragStop", function (connection) {});
// // split in 2 methods ? one for events one for manip
// that.updateConnectionData = function (connection, remove, edge_data) {
// if (remove) {
// delete(priv.edge_container[connection.id]);
// } else {
// priv.edge_container[connection.id] = [
// that.getNodeId(connection.sourceId),
// that.getNodeId(connection.targetId), edge_data || {}
// ];
// }
// priv.onDataChange();
// };
//
// // bind to connection/connectionDetached events, and update the list of connections on screen.
// jsPlumb.bind("connection", function (info, originalEvent) {
// that.updateConnectionData(info.connection);
// });
// jsPlumb.bind("connectionDetached", function (info, originalEvent) {
// that.updateConnectionData(info.connection, true);
// });
// priv.onDataChange();
// priv.draggable();
// };
//
// priv.updateElementCoordinate = function (node_id, coordinate) {
// var element_id = priv.node_container[node_id].element_id;
// var coordinates = priv.preference_container['coordinates'] || {}, element;
// if (coordinate === undefined) {
// coordinate = {};
// element = $(gadget_element).find("#" + element_id);
// var relative_position = that.convertToRelativePosition(
// element.css('left'), element.css('top'));
// coordinate.top = relative_position[1];
// coordinate.left = relative_position[0];
// }
// coordinates[node_id] = coordinate;
// priv.preference_container['coordinates'] = coordinates;
// priv.onDataChange();
// return coordinate;
// };
//
// priv.updateNodeStyle = function (element_id) {
// var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
// var element = $(gadget_element).find("#" + element_id);
// console.log(gadget_element);
// $.each(priv.style_attr_list, function (i, j) {
// var new_value = $(gadget_element).find('.dummy_window').css(j).replace('px', '') * zoom_level + 'px';
// element.css(j, new_value);
// });
// };
//
// priv.convertToAbsolutePosition = function (x, y) {
// var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
// var canvas_size_x = $(gadget_element).find('#main').width();
// var canvas_size_y = $(gadget_element).find('#main').height();
// var size_x = $(gadget_element).find('.dummy_window').width() * zoom_level;
// var size_y = $(gadget_element).find('.dummy_window').height() * zoom_level;
// var top = Math.floor(y * (canvas_size_y - size_y)) + "px";
// var left = Math.floor(x * (canvas_size_x - size_x)) + "px";
// return [left, top];
// };
//
// that.convertToRelativePosition = function (x, y) {
// var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
// var canvas_size_x = $(gadget_element).find('#main').width();
// var canvas_size_y = $(gadget_element).find('#main').height();
// var size_x = $(gadget_element).find('.dummy_window').width() * zoom_level;
// var size_y = $(gadget_element).find('.dummy_window').height() * zoom_level;
// var top = Math.max(Math.min(y.replace('px', '') / (canvas_size_y - size_y), 1), 0);
// var left = Math.max(Math.min(x.replace('px', '') / (canvas_size_x - size_x), 1), 0);
// return [left, top];
// };
// priv.draggable = function () {
// var stop = function (element) {
// priv.updateElementCoordinate(that.getNodeId(element.target.id));
// };
//
// jsPlumb.draggable(jsPlumb.getSelector(".window"), {
// containment: 'parent',
// grid: [10, 10],
// stop: stop // FIXME: we should only accept if dropped in #main
// });
//
// jsPlumb.makeSource(jsPlumb.getSelector(".window"), {
// filter: ".ep",
// anchor: "Continuous",
// connector: ["StateMachine", {
// curviness: 20
// }],
// connectorStyle: {
// strokeStyle: "#5c96bc",
// lineWidth: 2,
// outlineColor: "transparent",
// outlineWidth: 4
// }
// });
//
// jsPlumb.makeTarget(jsPlumb.getSelector(".window"), {
// dropOptions: {
// hoverClass: "dragHover"
// },
// anchor: "Continuous"
// });
//
// };
// priv.addElementToContainer = function (element) {
// // Now update the container of elements
// var element_data = {
// _class: element._class,
// element_id: element.element_id,
// };
// priv.node_container[element.id] = element_data;
// };
// priv.onDataChange = function () {
// //$.publish("Dream.Gui.onDataChange", priv.getData());
// };
// priv.style_attr_list = ['width', 'height', 'padding-top', 'line-height'];
// that.positionGraph = function () {
// $.ajax(
// '/positionGraph', {
// data: JSON.stringify(priv.getData()),
// contentType: 'application/json',
// type: 'POST',
// success: function (data, textStatus, jqXHR) {
// $.each(data, function (node, pos) {
// var absolute_position = priv.convertToAbsolutePosition(
// pos.left, pos.top);
// priv.updateElementCoordinate(node, {
// top: pos.top,
// left: pos.left
// });
// });
// that.redraw();
// }
// });
//
// };
// that.setZoom = function (zoom_level) {
// $.each(priv.style_attr_list, function (i, j) {
// var new_value = $(gadget_element).find('.dummy_window').css(j).replace('px', '') * zoom_level + 'px';
// $(gadget_element).find('.window').css(j, new_value);
// });
// };
//
// that.zoom_in = function () {
// var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
// that.setZoom(zoom_level);
// priv.preference_container['zoom_level'] = zoom_level;
// priv.onDataChange();
// that.redraw();
// };
//
// that.zoom_out = function () {
// var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 0.9;
// that.setZoom(zoom_level);
// priv.preference_container['zoom_level'] = zoom_level;
// priv.onDataChange();
// that.redraw();
// };
//
// that.redraw = function () {
// var coordinates = priv.preference_container['coordinates'] || {};
// $.each(coordinates, function (node_id, v) {
// var absolute_position = priv.convertToAbsolutePosition(
// v['left'], v['top']);
// var element = $(gadget_element).find('#' + that.getElementId(node_id));
// element.css('top', absolute_position[1]);
// element.css('left', absolute_position[0]);
// jsPlumb.repaint(element);
// });
// };
//
// priv.getData = function () {
// var data = {
// "nodes": priv.node_container,
// "edges": priv.edge_container,
// "preference": priv.preference_container,
// "general": priv.general_container
// };
// var wip_spreadsheet = $(gadget_element).find('#wip_spreadsheet');
// if (wip_spreadsheet.length > 0) {
// data['wip_spreadsheet'] = wip_spreadsheet.handsontable('getData');
// }
// var wip_part_spreadsheet = $(gadget_element).find('#wip_part_spreadsheet');
// if (wip_part_spreadsheet.length > 0) {
// data['wip_part_spreadsheet'] = wip_part_spreadsheet.handsontable('getData');
// }
// var shift_spreadsheet = $(gadget_element).find('#shift_spreadsheet');
// if (shift_spreadsheet.length > 0) {
// data['shift_spreadsheet'] = shift_spreadsheet.handsontable('getData');
// }
// return data;
// };
// priv.removeElement = function (node_id) {
// var element_id = priv.node_container[node_id].element_id;
// jsPlumb.removeAllEndpoints($(gadget_element).find("#" + element_id));
// $(gadget_element).find("#" + element_id).remove();
// delete(priv.node_container[node_id]);
// delete(priv.preference_container['coordinates'][node_id]);
// $.each(priv.edge_container, function (k, v) {
// if (node_id == v[0] || node_id == v[1]) {
// delete(priv.edge_container[k]);
// }
// });
// priv.onDataChange();
// };
//
// that.updateElementData = function (node_id, data) {
// var element_id = priv.node_container[node_id].element_id;
// if (data['name']) {
// $(gadget_element).find("#" + element_id).text(data["name"]).append('<div class="ep"></div></div>');
// priv.node_container[node_id].name = data['name'];
// }
// var new_id = data['id'];
// delete(data['id']);
// $.extend(priv.node_container[node_id], data.data);
// if (new_id && new_id !== node_id) {
// priv.node_container[new_id] = priv.node_container[node_id];
// delete(priv.node_container[node_id]);
// $.each(priv.edge_container, function (k, v) {
// if (v[0] === node_id) {
// v[0] = new_id;
// }
// if (v[1] === node_id) {
// v[1] = new_id;
// }
// });
// priv.preference_container['coordinates'][new_id] = priv.preference_container['coordinates'][node_id];
// delete(priv.preference_container['coordinates'][node_id]);
// }
// priv.onDataChange();
// };
//
// that.removeElement = function (node_id) {
// priv.removeElement(node_id);
// };
//
// that.getData = function () {
// return priv.getData();
// };
//
// that.clearAll = function () {
// $.each(priv.node_container, function (node_id) {
// priv.removeElement(node_id);
// });
// // delete anything if still remains
// $(gadget_element).find("#main").children().remove();
// priv.node_container = {};
// priv.edge_container = {};
// priv.preference_container = {};
// priv.general_container = {};
// that.initGeneralProperties();
// that.prepareDialogForGeneralProperties();
// };
// that.addEdge = function (edge_id, edge_data) {
// var source_id = edge_data[0],
// target_id = edge_data[1],
// data = edge_data[2],
// overlays = []
//
// if (data && data.title){
// overlays = [ ["Label", { cssClass:"l1 component label",
// label: data.title,
// }] ]
//
// }
// var connection = jsPlumb.connect({
// source: that.getElementId(source_id),
// target: that.getElementId(target_id),
// Connector: [ "Bezier", { curviness:75 } ],
// overlays:overlays
//
// });
// // call again updateConnectionData to set the connection data that
// // was not passed to the connection hook
// that.updateConnectionData(connection, 0, data)
// };
//
// that.setPreferences = function (preferences) {
// priv.preference_container = preferences;
// var zoom_level = priv.preference_container['zoom_level'] || 1.0;
// that.setZoom(zoom_level);
// };
// that.setGeneralProperties = function (properties) {
// priv.general_container = properties;
// priv.onDataChange();
// };
//
// that.updateGeneralProperties = function (properties) {
// $.extend(priv.general_container, properties);
// priv.onDataChange();
// };
// that.newElement = function (element, option) {
// element.name = element.name || option.name;
// priv.addElementToContainer(element);
// var render_element, style_string = "",
// coordinate = element.coordinate,
// box;
// render_element = $(gadget_element).find("#main");
// if (coordinate !== undefined) {
// coordinate = priv.updateElementCoordinate(element.id, coordinate);
// }
// render_element.append('<div class="window ' + element._class.replace('.', '-') + '" id="' +
// element.element_id + '" title="' + (element.name || element.id) + '">' + element.id + '<div class="ep"></div></div>');
// box = $(gadget_element).find("#" + element.element_id);
// var absolute_position = priv.convertToAbsolutePosition(
// coordinate.left, coordinate.top);
// box.css("top", absolute_position[1]);
// box.css("left", absolute_position[0]);
// priv.updateNodeStyle(element.element_id);
// priv.draggable();
// priv.onDataChange();
// };
function initJsPlumb(container) {
var j = jsPlumb.getInstance({
HoverPaintStyle: {
strokeStyle: "#1e8151",
lineWidth: 2
},
Endpoint: ["Dot", {
Endpoint: [ "Dot", {
radius: 2
}],
ConnectionOverlays: [
["Arrow", {
} ],
ConnectionOverlays: [ [ "Arrow", {
location: 1,
id: "arrow",
length: 14,
foldback: 0.8
}]
],
Container: "main"
});
// listen for clicks on connections, and offer to change values on click.
jsPlumb.bind("click", function (conn) {
jsPlumb.detach(conn);
});
jsPlumb.bind("beforeDetach", function (conn) {
return confirm("Delete connection?");
});
jsPlumb.bind("connectionDrag", function (connection) {});
jsPlumb.bind("connectionDragStop", function (connection) {});
// split in 2 methods ? one for events one for manip
that.updateConnectionData = function (connection, remove, edge_data) {
if (remove) {
delete(priv.edge_container[connection.id]);
} else {
priv.edge_container[connection.id] = [
that.getNodeId(connection.sourceId),
that.getNodeId(connection.targetId), edge_data || {}
];
}
priv.onDataChange();
};
// bind to connection/connectionDetached events, and update the list of connections on screen.
jsPlumb.bind("connection", function (info, originalEvent) {
that.updateConnectionData(info.connection);
});
jsPlumb.bind("connectionDetached", function (info, originalEvent) {
that.updateConnectionData(info.connection, true);
});
priv.onDataChange();
priv.draggable();
};
priv.initSpreadSheet = function () {
var wip_part_spreadsheet = $('#wip_part_spreadsheet');
var data = [
[
"Order ID",
"Due Date",
"Priority",
"Project Manager",
"Part",
"Part Type",
"Sequence",
"Processing Times",
"Prerequisites Parts"
]
];
wip_part_spreadsheet.handsontable({
data: data,
minSpareRows: 1,
stretchH: 'all',
width: function () {
return $(window).width() -
wip_part_spreadsheet.offset().left +
$(window).scrollLeft();
},
afterChange: function () {
priv.onDataChange();
},
});
var shift_spreadsheet = $('#shift_spreadsheet');
var data = [
[
"Day",
"Machines", // XXX more generic name ?
"Start",
"End"
]
];
shift_spreadsheet.handsontable({
data: data,
minSpareRows: 1,
stretchH: 'all',
width: function () {
return $(window).width() -
shift_spreadsheet.offset().left +
$(window).scrollLeft();
},
afterChange: function () {
priv.onDataChange();
}
});
};
priv.updateElementCoordinate = function (node_id, coordinate) {
var element_id = priv.node_container[node_id].element_id;
var coordinates = priv.preference_container['coordinates'] || {}, element;
if (coordinate === undefined) {
coordinate = {};
element = $("#" + element_id);
var relative_position = that.convertToRelativePosition(
element.css('left'), element.css('top'));
coordinate.top = relative_position[1];
coordinate.left = relative_position[0];
}
coordinates[node_id] = coordinate;
priv.preference_container['coordinates'] = coordinates;
priv.onDataChange();
return coordinate;
};
priv.updateNodeStyle = function (element_id) {
var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
var element = $("#" + element_id);
$.each(priv.style_attr_list, function (i, j) {
var new_value = $('.dummy_window').css(j).replace('px', '') * zoom_level + 'px';
element.css(j, new_value);
});
};
priv.convertToAbsolutePosition = function (x, y) {
var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
var canvas_size_x = $('#main').width();
var canvas_size_y = $('#main').height();
var size_x = $('.dummy_window').width() * zoom_level;
var size_y = $('.dummy_window').height() * zoom_level;
var top = Math.floor(y * (canvas_size_y - size_y)) + "px";
var left = Math.floor(x * (canvas_size_x - size_x)) + "px";
return [left, top];
};
that.convertToRelativePosition = function (x, y) {
var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
var canvas_size_x = $('#main').width();
var canvas_size_y = $('#main').height();
var size_x = $('.dummy_window').width() * zoom_level;
var size_y = $('.dummy_window').height() * zoom_level;
var top = Math.max(Math.min(y.replace('px', '') / (canvas_size_y - size_y), 1), 0);
var left = Math.max(Math.min(x.replace('px', '') / (canvas_size_x - size_x), 1), 0);
return [left, top];
};
priv.draggable = function () {
var stop = function (element) {
priv.updateElementCoordinate(that.getNodeId(element.target.id));
};
jsPlumb.draggable(jsPlumb.getSelector(".window"), {
containment: 'parent',
grid: [10, 10],
stop: stop // FIXME: we should only accept if dropped in #main
});
jsPlumb.makeSource(jsPlumb.getSelector(".window"), {
filter: ".ep",
anchor: "Continuous",
connector: ["StateMachine", {
curviness: 20
}],
connectorStyle: {
strokeStyle: "#5c96bc",
lineWidth: 2,
outlineColor: "transparent",
outlineWidth: 4
}
});
jsPlumb.makeTarget(jsPlumb.getSelector(".window"), {
dropOptions: {
hoverClass: "dragHover"
},
anchor: "Continuous"
foldback: .8
} ] ],
Container: container
});
};
priv.addElementToContainer = function (element) {
// Now update the container of elements
var element_data = {
_class: element._class,
element_id: element.element_id,
};
priv.node_container[element.id] = element_data;
};
priv.onDataChange = function () {
$.publish("Dream.Gui.onDataChange", priv.getData());
};
priv.style_attr_list = ['width', 'height', 'padding-top', 'line-height'];
that.positionGraph = function () {
$.ajax(
'/positionGraph', {
data: JSON.stringify(priv.getData()),
contentType: 'application/json',
type: 'POST',
success: function (data, textStatus, jqXHR) {
$.each(data, function (node, pos) {
var absolute_position = priv.convertToAbsolutePosition(
pos.left, pos.top);
priv.updateElementCoordinate(node, {
top: pos.top,
left: pos.left
});
});
that.redraw();
j.setRenderMode(jsPlumb.SVG);
return j;
}
rJS(window).ready(function(g) {
g.props = {
node_container: {},
edge_container: {},
preference_container: {},
general_container: {}
};
return g.getElement().push(function(element) {
g.props.element = element;
});
};
that.setZoom = function (zoom_level) {
$.each(priv.style_attr_list, function (i, j) {
var new_value = $('.dummy_window').css(j).replace('px', '') * zoom_level + 'px';
$('.window').css(j, new_value);
});
};
that.zoom_in = function () {
var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 1.1111;
that.setZoom(zoom_level);
priv.preference_container['zoom_level'] = zoom_level;
priv.onDataChange();
that.redraw();
};
that.zoom_out = function () {
var zoom_level = (priv.preference_container['zoom_level'] || 1.0) * 0.9;
that.setZoom(zoom_level);
priv.preference_container['zoom_level'] = zoom_level;
priv.onDataChange();
that.redraw();
};
that.redraw = function () {
var coordinates = priv.preference_container['coordinates'] || {};
$.each(coordinates, function (node_id, v) {
var absolute_position = priv.convertToAbsolutePosition(
v['left'], v['top']);
var element = $('#' + that.getElementId(node_id));
element.css('top', absolute_position[1]);
element.css('left', absolute_position[0]);
jsPlumb.repaint(element);
});
}).declareMethod("render", function(data) {
this.props.data = JSON.parse(data);
}).declareMethod("startService", function() {
var gadget = this, // Create jsPlumb instance
// jsplumb = initJsPlumb(gadget.props.element),
preference = gadget.props.data.preference || {}, coordinates = preference.coordinates, key, value;
initJsPlumb(gadget.props.element);
for (key in gadget.props.data.nodes) {
if (gadget.props.data.nodes.hasOwnProperty(key)) {
value = gadget.props.data.nodes[key];
if (coordinates === undefined || coordinates[key] === undefined) {
value.coordinate = {
top: 0,
left: 0
};
priv.getData = function () {
var data = {
"nodes": priv.node_container,
"edges": priv.edge_container,
"preference": priv.preference_container,
"general": priv.general_container
};
var wip_spreadsheet = $('#wip_spreadsheet');
if (wip_spreadsheet.length > 0) {
data['wip_spreadsheet'] = wip_spreadsheet.handsontable('getData');
}
var wip_part_spreadsheet = $('#wip_part_spreadsheet');
if (wip_part_spreadsheet.length > 0) {
data['wip_part_spreadsheet'] = wip_part_spreadsheet.handsontable('getData');
}
var shift_spreadsheet = $('#shift_spreadsheet');
if (shift_spreadsheet.length > 0) {
data['shift_spreadsheet'] = shift_spreadsheet.handsontable('getData');
}
return data;
};
priv.removeElement = function (node_id) {
var element_id = priv.node_container[node_id].element_id;
jsPlumb.removeAllEndpoints($("#" + element_id));
$("#" + element_id).remove();
delete(priv.node_container[node_id]);
delete(priv.preference_container['coordinates'][node_id]);
$.each(priv.edge_container, function (k, v) {
if (node_id == v[0] || node_id == v[1]) {
delete(priv.edge_container[k]);
}
});
priv.onDataChange();
};
that.updateElementData = function (node_id, data) {
var element_id = priv.node_container[node_id].element_id;
if (data['name']) {
$("#" + element_id).text(data["name"]).append('<div class="ep"></div></div>');
priv.node_container[node_id].name = data['name'];
} else {
value.coordinate = coordinates[key];
}
var new_id = data['id'];
delete(data['id']);
$.extend(priv.node_container[node_id], data.data);
if (new_id && new_id !== node_id) {
priv.node_container[new_id] = priv.node_container[node_id];
delete(priv.node_container[node_id]);
$.each(priv.edge_container, function (k, v) {
if (v[0] === node_id) {
v[0] = new_id;
value.id = key;
}
if (v[1] === node_id) {
v[1] = new_id;
}
});
priv.preference_container['coordinates'][new_id] = priv.preference_container['coordinates'][node_id];
delete(priv.preference_container['coordinates'][node_id]);
for (key in gadget.props.data.edges) {
if (gadget.props.data.edges.hasOwnProperty(key)) {
value = gadget.props.data.edges[key];
}
priv.onDataChange();
};
that.start = function () {
priv.node_container = {};
priv.edge_container = {};
priv.preference_container = {};
priv.general_container = {};
priv.initJsPlumb();
priv.initSpreadSheet();
};
that.removeElement = function (node_id) {
priv.removeElement(node_id);
};
that.getData = function () {
return priv.getData();
};
that.clearAll = function () {
$.each(priv.node_container, function (node_id) {
priv.removeElement(node_id);
});
// delete anything if still remains
$("#main").children().remove();
priv.node_container = {};
priv.edge_container = {};
priv.preference_container = {};
priv.general_container = {};
priv.initSpreadSheet();
that.initGeneralProperties();
that.prepareDialogForGeneralProperties();
};
that.addEdge = function (edge_id, edge_data) {
var source_id = edge_data[0],
target_id = edge_data[1],
data = edge_data[2],
overlays = []
if (data && data.title){
overlays = [ ["Label", { cssClass:"l1 component label",
label: data.title,
}] ]
}
var connection = jsPlumb.connect({
source: that.getElementId(source_id),
target: that.getElementId(target_id),
Connector: [ "Bezier", { curviness:75 } ],
overlays:overlays
});
// call again updateConnectionData to set the connection data that
// was not passed to the connection hook
that.updateConnectionData(connection, 0, data)
};
that.setPreferences = function (preferences) {
priv.preference_container = preferences;
var zoom_level = priv.preference_container['zoom_level'] || 1.0;
that.setZoom(zoom_level);
};
that.setGeneralProperties = function (properties) {
priv.general_container = properties;
priv.onDataChange();
};
that.updateGeneralProperties = function (properties) {
$.extend(priv.general_container, properties);
priv.onDataChange();
};
that.newElement = function (element, option) {
element.name = element.name || option.name;
priv.addElementToContainer(element);
var render_element, style_string = "",
coordinate = element.coordinate,
box;
render_element = $("#main");
if (coordinate !== undefined) {
coordinate = priv.updateElementCoordinate(element.id, coordinate);
}
render_element.append('<div class="window ' + element._class.replace('.', '-') + '" id="' +
element.element_id + '" title="' + (element.name || element.id) + '">' + element.id + '<div class="ep"></div></div>');
box = $("#" + element.element_id);
var absolute_position = priv.convertToAbsolutePosition(
coordinate.left, coordinate.top);
box.css("top", absolute_position[1]);
box.css("left", absolute_position[0]);
priv.updateNodeStyle(element.element_id);
priv.draggable();
priv.onDataChange();
};
return that;
};
}(window, jQuery, jsPlumb, console));
})(jsPlumb, rJS, RSVP);
\ No newline at end of file
/*! jQuery UI - v1.11.0-beta.1 - 2014-04-24
* http://jqueryui.com
* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-accordion .ui-accordion-header {
display: block;
cursor: pointer;
position: relative;
margin: 2px 0 0 0;
padding: .5em .5em .5em .7em;
min-height: 0; /* support: IE7 */
font-size: 100%;
}
.ui-accordion .ui-accordion-icons {
padding-left: 2.2em;
}
.ui-accordion .ui-accordion-icons .ui-accordion-icons {
padding-left: 2.2em;
}
.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
position: absolute;
left: .5em;
top: 50%;
margin-top: -8px;
}
.ui-accordion .ui-accordion-content {
padding: 1em 2.2em;
border-top: 0;
overflow: auto;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-button {
display: inline-block;
position: relative;
padding: 0;
line-height: normal;
margin-right: .1em;
cursor: pointer;
vertical-align: middle;
text-align: center;
overflow: visible; /* removes extra width in IE */
}
.ui-button,
.ui-button:link,
.ui-button:visited,
.ui-button:hover,
.ui-button:active {
text-decoration: none;
}
/* to make room for the icon, a width needs to be set here */
.ui-button-icon-only {
width: 2.2em;
}
/* button elements seem to need a little more width */
button.ui-button-icon-only {
width: 2.4em;
}
.ui-button-icons-only {
width: 3.4em;
}
button.ui-button-icons-only {
width: 3.7em;
}
/* button text element */
.ui-button .ui-button-text {
display: block;
line-height: normal;
}
.ui-button-text-only .ui-button-text {
padding: .4em 1em;
}
.ui-button-icon-only .ui-button-text,
.ui-button-icons-only .ui-button-text {
padding: .4em;
text-indent: -9999999px;
}
.ui-button-text-icon-primary .ui-button-text,
.ui-button-text-icons .ui-button-text {
padding: .4em 1em .4em 2.1em;
}
.ui-button-text-icon-secondary .ui-button-text,
.ui-button-text-icons .ui-button-text {
padding: .4em 2.1em .4em 1em;
}
.ui-button-text-icons .ui-button-text {
padding-left: 2.1em;
padding-right: 2.1em;
}
/* no icon support for input elements, provide padding by default */
input.ui-button {
padding: .4em 1em;
}
/* button icon element(s) */
.ui-button-icon-only .ui-icon,
.ui-button-text-icon-primary .ui-icon,
.ui-button-text-icon-secondary .ui-icon,
.ui-button-text-icons .ui-icon,
.ui-button-icons-only .ui-icon {
position: absolute;
top: 50%;
margin-top: -8px;
}
.ui-button-icon-only .ui-icon {
left: 50%;
margin-left: -8px;
}
.ui-button-text-icon-primary .ui-button-icon-primary,
.ui-button-text-icons .ui-button-icon-primary,
.ui-button-icons-only .ui-button-icon-primary {
left: .5em;
}
.ui-button-text-icon-secondary .ui-button-icon-secondary,
.ui-button-text-icons .ui-button-icon-secondary,
.ui-button-icons-only .ui-button-icon-secondary {
right: .5em;
}
/* button sets */
.ui-buttonset {
margin-right: 7px;
}
.ui-buttonset .ui-button {
margin-left: 0;
margin-right: -.3em;
}
/* workarounds */
/* reset extra padding in Firefox, see h5bp.com/l */
input.ui-button::-moz-focus-inner,
button.ui-button::-moz-focus-inner {
border: 0;
padding: 0;
}
.ui-datepicker {
width: 17em;
padding: .2em .2em 0;
display: none;
}
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
}
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
position: absolute;
top: 2px;
width: 1.8em;
height: 1.8em;
}
.ui-datepicker .ui-datepicker-prev-hover,
.ui-datepicker .ui-datepicker-next-hover {
top: 1px;
}
.ui-datepicker .ui-datepicker-prev {
left: 2px;
}
.ui-datepicker .ui-datepicker-next {
right: 2px;
}
.ui-datepicker .ui-datepicker-prev-hover {
left: 1px;
}
.ui-datepicker .ui-datepicker-next-hover {
right: 1px;
}
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
display: block;
position: absolute;
left: 50%;
margin-left: -8px;
top: 50%;
margin-top: -8px;
}
.ui-datepicker .ui-datepicker-title {
margin: 0 2.3em;
line-height: 1.8em;
text-align: center;
}
.ui-datepicker .ui-datepicker-title select {
font-size: 1em;
margin: 1px 0;
}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
width: 49%;
}
.ui-datepicker table {
width: 100%;
font-size: .9em;
border-collapse: collapse;
margin: 0 0 .4em;
}
.ui-datepicker th {
padding: .7em .3em;
text-align: center;
font-weight: bold;
border: 0;
}
.ui-datepicker td {
border: 0;
padding: 1px;
}
.ui-datepicker td span,
.ui-datepicker td a {
display: block;
padding: .2em;
text-align: right;
text-decoration: none;
}
.ui-datepicker .ui-datepicker-buttonpane {
background-image: none;
margin: .7em 0 0 0;
padding: 0 .2em;
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.ui-datepicker .ui-datepicker-buttonpane button {
float: right;
margin: .5em .2em .4em;
cursor: pointer;
padding: .2em .6em .3em .6em;
width: auto;
overflow: visible;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
float: left;
}
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi {
width: auto;
}
.ui-datepicker-multi .ui-datepicker-group {
float: left;
}
.ui-datepicker-multi .ui-datepicker-group table {
width: 95%;
margin: 0 auto .4em;
}
.ui-datepicker-multi-2 .ui-datepicker-group {
width: 50%;
}
.ui-datepicker-multi-3 .ui-datepicker-group {
width: 33.3%;
}
.ui-datepicker-multi-4 .ui-datepicker-group {
width: 25%;
}
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
border-left-width: 0;
}
.ui-datepicker-multi .ui-datepicker-buttonpane {
clear: left;
}
.ui-datepicker-row-break {
clear: both;
width: 100%;
font-size: 0;
}
/* RTL support */
.ui-datepicker-rtl {
direction: rtl;
}
.ui-datepicker-rtl .ui-datepicker-prev {
right: 2px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next {
left: 2px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-prev:hover {
right: 1px;
left: auto;
}
.ui-datepicker-rtl .ui-datepicker-next:hover {
left: 1px;
right: auto;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane {
clear: right;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
float: left;
}
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
.ui-datepicker-rtl .ui-datepicker-group {
float: right;
}
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
border-right-width: 0;
border-left-width: 1px;
}
.ui-dialog {
overflow: hidden;
position: absolute;
top: 0;
left: 0;
padding: .2em;
outline: 0;
}
.ui-dialog .ui-dialog-titlebar {
padding: .4em 1em;
position: relative;
}
.ui-dialog .ui-dialog-title {
float: left;
margin: .1em 0;
white-space: nowrap;
width: 90%;
overflow: hidden;
text-overflow: ellipsis;
}
.ui-dialog .ui-dialog-titlebar-close {
position: absolute;
right: .3em;
top: 50%;
width: 20px;
margin: -10px 0 0 0;
padding: 1px;
height: 20px;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
background: none;
overflow: auto;
}
.ui-dialog .ui-dialog-buttonpane {
text-align: left;
border-width: 1px 0 0 0;
background-image: none;
margin-top: .5em;
padding: .3em 1em .5em .4em;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: right;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: .5em .4em .5em 0;
cursor: pointer;
}
.ui-dialog .ui-resizable-se {
width: 12px;
height: 12px;
right: -5px;
bottom: -5px;
background-position: 16px 16px;
}
.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
.ui-draggable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: none;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
margin: 0;
display: block;
padding: 3px .4em;
cursor: pointer;
min-height: 0; /* support: IE7 */
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
margin: -1px;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item {
position: relative;
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: .2em;
left: .2em;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
position: relative;
top: -.2em;
float: right;
}
.ui-progressbar {
height: 2em;
text-align: left;
overflow: hidden;
}
.ui-progressbar .ui-progressbar-value {
margin: -1px;
height: 100%;
}
.ui-progressbar .ui-progressbar-overlay {
background: url("images/animated-overlay.gif");
height: 100%;
filter: alpha(opacity=25);
opacity: 0.25;
}
.ui-progressbar-indeterminate .ui-progressbar-value {
background-image: none;
}
.ui-resizable {
position: relative;
}
.ui-resizable-handle {
position: absolute;
font-size: 0.1px;
display: block;
-ms-touch-action: none;
touch-action: none;
}
.ui-resizable-disabled .ui-resizable-handle,
.ui-resizable-autohide .ui-resizable-handle {
display: none;
}
.ui-resizable-n {
cursor: n-resize;
height: 7px;
width: 100%;
top: -5px;
left: 0;
}
.ui-resizable-s {
cursor: s-resize;
height: 7px;
width: 100%;
bottom: -5px;
left: 0;
}
.ui-resizable-e {
cursor: e-resize;
width: 7px;
right: -5px;
top: 0;
height: 100%;
}
.ui-resizable-w {
cursor: w-resize;
width: 7px;
left: -5px;
top: 0;
height: 100%;
}
.ui-resizable-se {
cursor: se-resize;
width: 12px;
height: 12px;
right: 1px;
bottom: 1px;
}
.ui-resizable-sw {
cursor: sw-resize;
width: 9px;
height: 9px;
left: -5px;
bottom: -5px;
}
.ui-resizable-nw {
cursor: nw-resize;
width: 9px;
height: 9px;
left: -5px;
top: -5px;
}
.ui-resizable-ne {
cursor: ne-resize;
width: 9px;
height: 9px;
right: -5px;
top: -5px;
}
.ui-selectable {
-ms-touch-action: none;
touch-action: none;
}
.ui-selectable-helper {
position: absolute;
z-index: 100;
border: 1px dotted black;
}
.ui-slider {
position: relative;
text-align: left;
}
.ui-slider .ui-slider-handle {
position: absolute;
z-index: 2;
width: 1.2em;
height: 1.2em;
cursor: default;
-ms-touch-action: none;
touch-action: none;
}
.ui-slider .ui-slider-range {
position: absolute;
z-index: 1;
font-size: .7em;
display: block;
border: 0;
background-position: 0 0;
}
/* For IE8 - See #6727 */
.ui-slider.ui-state-disabled .ui-slider-handle,
.ui-slider.ui-state-disabled .ui-slider-range {
filter: inherit;
}
.ui-slider-horizontal {
height: .8em;
}
.ui-slider-horizontal .ui-slider-handle {
top: -.3em;
margin-left: -.6em;
}
.ui-slider-horizontal .ui-slider-range {
top: 0;
height: 100%;
}
.ui-slider-horizontal .ui-slider-range-min {
left: 0;
}
.ui-slider-horizontal .ui-slider-range-max {
right: 0;
}
.ui-slider-vertical {
width: .8em;
height: 100px;
}
.ui-slider-vertical .ui-slider-handle {
left: -.3em;
margin-left: 0;
margin-bottom: -.6em;
}
.ui-slider-vertical .ui-slider-range {
left: 0;
width: 100%;
}
.ui-slider-vertical .ui-slider-range-min {
bottom: 0;
}
.ui-slider-vertical .ui-slider-range-max {
top: 0;
}
.ui-sortable-handle {
-ms-touch-action: none;
touch-action: none;
}
.ui-spinner {
position: relative;
display: inline-block;
overflow: hidden;
padding: 0;
vertical-align: middle;
}
.ui-spinner-input {
border: none;
background: none;
color: inherit;
padding: 0;
margin: .2em 0;
vertical-align: middle;
margin-left: .4em;
margin-right: 22px;
}
.ui-spinner-button {
width: 16px;
height: 50%;
font-size: .5em;
padding: 0;
margin: 0;
text-align: center;
position: absolute;
cursor: default;
display: block;
overflow: hidden;
right: 0;
}
/* more specificity required here to override default borders */
.ui-spinner a.ui-spinner-button {
border-top: none;
border-bottom: none;
border-right: none;
}
/* vertically center icon */
.ui-spinner .ui-icon {
position: absolute;
margin-top: -8px;
top: 50%;
left: 0;
}
.ui-spinner-up {
top: 0;
}
.ui-spinner-down {
bottom: 0;
}
/* TR overrides */
.ui-spinner .ui-icon-triangle-1-s {
/* need to fix icons sprite */
background-position: -65px -16px;
}
.ui-tabs {
position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
padding: .2em;
}
.ui-tabs .ui-tabs-nav {
margin: 0;
padding: .2em .2em 0;
}
.ui-tabs .ui-tabs-nav li {
list-style: none;
float: left;
position: relative;
top: 0;
margin: 1px .2em 0 0;
border-bottom-width: 0;
padding: 0;
white-space: nowrap;
}
.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
float: left;
padding: .5em 1em;
text-decoration: none;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active {
margin-bottom: -1px;
padding-bottom: 1px;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
cursor: text;
}
.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
cursor: pointer;
}
.ui-tabs .ui-tabs-panel {
display: block;
border-width: 0;
padding: 1em 1.4em;
background: none;
}
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
body .ui-tooltip {
border-width: 2px;
}
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
font-size: 1.1em/*{fsDefault}*/;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #aaaaaa/*{borderColorContent}*/;
background: #ffffff/*{bgColorContent}*/ url("images/ui-bg_flat_75_ffffff_40x100.png")/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/;
color: #222222/*{fcContent}*/;
}
.ui-widget-content a {
color: #222222/*{fcContent}*/;
}
.ui-widget-header {
border: 1px solid #aaaaaa/*{borderColorHeader}*/;
background: #cccccc/*{bgColorHeader}*/ url("images/ui-bg_highlight-soft_75_cccccc_1x100.png")/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/;
color: #222222/*{fcHeader}*/;
font-weight: bold;
}
.ui-widget-header a {
color: #222222/*{fcHeader}*/;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #d3d3d3/*{borderColorDefault}*/;
background: #e6e6e6/*{bgColorDefault}*/ url("images/ui-bg_glass_75_e6e6e6_1x400.png")/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/;
font-weight: normal/*{fwDefault}*/;
color: #555555/*{fcDefault}*/;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #555555/*{fcDefault}*/;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #999999/*{borderColorHover}*/;
background: #dadada/*{bgColorHover}*/ url("images/ui-bg_glass_75_dadada_1x400.png")/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/;
font-weight: normal/*{fwDefault}*/;
color: #212121/*{fcHover}*/;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #212121/*{fcHover}*/;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #aaaaaa/*{borderColorActive}*/;
background: #ffffff/*{bgColorActive}*/ url("images/ui-bg_glass_65_ffffff_1x400.png")/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/;
font-weight: normal/*{fwDefault}*/;
color: #212121/*{fcActive}*/;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #212121/*{fcActive}*/;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fcefa1/*{borderColorHighlight}*/;
background: #fbf9ee/*{bgColorHighlight}*/ url("images/ui-bg_glass_55_fbf9ee_1x400.png")/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/;
color: #363636/*{fcHighlight}*/;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636/*{fcHighlight}*/;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a/*{borderColorError}*/;
background: #fef1ec/*{bgColorError}*/ url("images/ui-bg_glass_95_fef1ec_1x400.png")/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/;
color: #cd0a0a/*{fcError}*/;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #cd0a0a/*{fcError}*/;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #cd0a0a/*{fcError}*/;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70);
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35);
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_222222_256x240.png")/*{iconsContent}*/;
}
.ui-widget-header .ui-icon {
background-image: url("images/ui-icons_222222_256x240.png")/*{iconsHeader}*/;
}
.ui-state-default .ui-icon {
background-image: url("images/ui-icons_888888_256x240.png")/*{iconsDefault}*/;
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: url("images/ui-icons_454545_256x240.png")/*{iconsHover}*/;
}
.ui-state-active .ui-icon {
background-image: url("images/ui-icons_454545_256x240.png")/*{iconsActive}*/;
}
.ui-state-highlight .ui-icon {
background-image: url("images/ui-icons_2e83ff_256x240.png")/*{iconsHighlight}*/;
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("images/ui-icons_cd0a0a_256x240.png")/*{iconsError}*/;
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px/*{cornerRadius}*/;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px/*{cornerRadius}*/;
}
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa/*{bgColorOverlay}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/;
opacity: .3/*{opacityOverlay}*/;
filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/;
}
.ui-widget-shadow {
margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
padding: 8px/*{thicknessShadow}*/;
background: #aaaaaa/*{bgColorShadow}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/;
opacity: .3/*{opacityShadow}*/;
filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/;
border-radius: 8px/*{cornerRadiusShadow}*/;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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