Commit 88bfb6c0 authored by Jérome Perrin's avatar Jérome Perrin

update static version

parent b2d0aa6e
...@@ -31,9 +31,13 @@ ...@@ -31,9 +31,13 @@
doc = document_list[i]; doc = document_list[i];
parameter_list[i] = { parameter_list[i] = {
link: doc[0], link: doc[0],
title: doc[1] + " (" + doc[2] + ")" title: doc[1] + " (" + doc[2] + ")",
date: new Date(doc[2])
}; };
} }
parameter_list.sort(function(a, b) {
return b.date - a.date;
});
// gadget.props.element.querySelector('a').href = document_list[0]; // gadget.props.element.querySelector('a').href = document_list[0];
gadget.props.element.querySelector(".document_list").innerHTML = table_template({ gadget.props.element.querySelector(".document_list").innerHTML = table_template({
documentlist: parameter_list documentlist: parameter_list
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var gadget = this, editor_data, editor_gadget; var gadget = this, editor_data, editor_gadget;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("tableeditor"); return gadget.getDeclaredGadget("tableeditor");
}).push(function(tablegadget) { }).push(function(tablegadget) {
editor_gadget = tablegadget; editor_gadget = tablegadget;
...@@ -27,7 +29,9 @@ ...@@ -27,7 +29,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -46,7 +50,13 @@ ...@@ -46,7 +50,13 @@
}).push(function(result_list) { }).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).capacity_by_station_spreadsheet), { return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).capacity_by_station_spreadsheet), {
minSpareCols: 1, minSpareCols: 1,
minSpareRows: 1 minSpareRows: 1,
onChange: function() {
if (gadget.timeout) {
window.clearTimeout(gadget.timeout);
}
gadget.timeout = window.setTimeout(saveSpreadsheet.bind(gadget), 100);
}
}); });
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var gadget = this, editor_data, editor_gadget; var gadget = this, editor_data, editor_gadget;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("tableeditor"); return gadget.getDeclaredGadget("tableeditor");
}).push(function(tablegadget) { }).push(function(tablegadget) {
editor_gadget = tablegadget; editor_gadget = tablegadget;
...@@ -27,7 +29,9 @@ ...@@ -27,7 +29,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -46,7 +50,13 @@ ...@@ -46,7 +50,13 @@
}).push(function(result_list) { }).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).dp_capacity_spreadsheet), { return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).dp_capacity_spreadsheet), {
minSpareCols: 1, minSpareCols: 1,
minSpareRows: 1 minSpareRows: 1,
onChange: function() {
if (gadget.timeout) {
window.clearTimeout(gadget.timeout);
}
gadget.timeout = window.setTimeout(saveSpreadsheet.bind(gadget), 100);
}
}); });
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var gadget = this, editor_data, editor_gadget; var gadget = this, editor_data, editor_gadget;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("tableeditor"); return gadget.getDeclaredGadget("tableeditor");
}).push(function(tablegadget) { }).push(function(tablegadget) {
editor_gadget = tablegadget; editor_gadget = tablegadget;
...@@ -27,7 +29,9 @@ ...@@ -27,7 +29,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -46,7 +50,13 @@ ...@@ -46,7 +50,13 @@
}).push(function(result_list) { }).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).dp_route_spreadsheet), { return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).dp_route_spreadsheet), {
minSpareCols: 1, minSpareCols: 1,
minSpareRows: 1 minSpareRows: 1,
onChange: function() {
if (gadget.timeout) {
window.clearTimeout(gadget.timeout);
}
gadget.timeout = window.setTimeout(saveSpreadsheet.bind(gadget), 100);
}
}); });
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<title>Edit table</title> <title>Edit table</title>
<script src="../lib/rsvp.min.js" type="text/javascript"></script> <script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/renderjs.min.js" type="text/javascript"></script> <script src="../lib/renderjs.min.js" type="text/javascript"></script>
<script src="../lib/pubsub.js" type="text/javascript"></script>
<script src="mixin_promise.js" type="text/javascript"></script> <script src="mixin_promise.js" type="text/javascript"></script>
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
"use strict"; "use strict";
var gadget_klass = rJS(window); var gadget_klass = rJS(window);
function saveGraph(evt) { function saveGraph(evt) {
var gadget = this, graph_data, graph_gadget; var gadget = this, graph_data;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("productionline_graph"); return gadget.getDeclaredGadget("productionline_graph");
}).push(function(graphgadget) { }).push(function(graph_gadget) {
graph_gadget = graphgadget;
return graph_gadget.getData(); return graph_gadget.getData();
}).push(function(data) { }).push(function(data) {
graph_data = data; graph_data = data;
...@@ -19,10 +20,10 @@ ...@@ -19,10 +20,10 @@
_attachment: "body.json" _attachment: "body.json"
}); });
}).push(function(body) { }).push(function(body) {
var data = JSON.parse(body); var data = JSON.parse(body), json_graph_data = JSON.parse(graph_data);
data.nodes = JSON.parse(graph_data).nodes; data.nodes = json_graph_data.nodes;
data.edges = JSON.parse(graph_data).edges; data.edges = json_graph_data.edges;
data.preference = JSON.parse(graph_data).preference; data.preference = json_graph_data.preference;
return gadget.aq_putAttachment({ return gadget.aq_putAttachment({
_id: gadget.props.jio_key, _id: gadget.props.jio_key,
_attachment: "body.json", _attachment: "body.json",
...@@ -30,7 +31,9 @@ ...@@ -30,7 +31,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -60,6 +63,13 @@ ...@@ -60,6 +63,13 @@
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
var g = this, graph; var g = this, graph;
// save automatically
window.$.subscribe("Dream.Gui.onDataChange", function() {
if (g.timeout) {
window.clearTimeout(g.timeout);
}
g.timeout = window.setTimeout(saveGraph.bind(g), 100);
});
return g.getDeclaredGadget("productionline_graph").push(function(graph_gadget) { return g.getDeclaredGadget("productionline_graph").push(function(graph_gadget) {
graph = graph_gadget; graph = graph_gadget;
return g.getDeclaredGadget("productionline_toolbox"); return g.getDeclaredGadget("productionline_toolbox");
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var gadget = this, editor_data, editor_gadget; var gadget = this, editor_data, editor_gadget;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("tableeditor"); return gadget.getDeclaredGadget("tableeditor");
}).push(function(tablegadget) { }).push(function(tablegadget) {
editor_gadget = tablegadget; editor_gadget = tablegadget;
...@@ -27,7 +29,9 @@ ...@@ -27,7 +29,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -45,7 +49,13 @@ ...@@ -45,7 +49,13 @@
}), gadget.getDeclaredGadget("tableeditor") ]); }), gadget.getDeclaredGadget("tableeditor") ]);
}).push(function(result_list) { }).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).capacity_by_project_spreadsheet), { return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).capacity_by_project_spreadsheet), {
minSpareRows: 1 minSpareRows: 1,
onChange: function() {
if (gadget.timeout) {
window.clearTimeout(gadget.timeout);
}
gadget.timeout = window.setTimeout(saveSpreadsheet.bind(gadget), 100);
}
}); });
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var gadget = this, editor_data, editor_gadget; var gadget = this, editor_data, editor_gadget;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("tableeditor"); return gadget.getDeclaredGadget("tableeditor");
}).push(function(tablegadget) { }).push(function(tablegadget) {
editor_gadget = tablegadget; editor_gadget = tablegadget;
...@@ -27,7 +29,9 @@ ...@@ -27,7 +29,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -45,7 +49,13 @@ ...@@ -45,7 +49,13 @@
}), gadget.getDeclaredGadget("tableeditor") ]); }), gadget.getDeclaredGadget("tableeditor") ]);
}).push(function(result_list) { }).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).shift_spreadsheet), { return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).shift_spreadsheet), {
minSpareRows: 1 minSpareRows: 1,
onChange: function() {
if (gadget.timeout) {
window.clearTimeout(gadget.timeout);
}
gadget.timeout = window.setTimeout(saveSpreadsheet.bind(gadget), 100);
}
}); });
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<script src="Input_viewSimulation.js" type="text/javascript"></script> <script src="Input_viewSimulation.js" type="text/javascript"></script>
</head> </head>
<body> <body>
<form class="save_form"> <form class="run_form">
<fieldset> <fieldset>
<div data-gadget-url="../fieldset/index.html" <div data-gadget-url="../fieldset/index.html"
data-gadget-scope="fieldset"></div> data-gadget-scope="fieldset"></div>
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
function waitForRunSimulation(gadget) { function waitForRunSimulation(gadget) {
var submit_evt; var submit_evt;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
return promiseEventListener(gadget.props.element.getElementsByClassName("save_form")[0], "submit", false); return promiseEventListener(gadget.props.element.getElementsByClassName("run_form")[0], "submit", false);
}).push(function(evt) { }).push(function(evt) {
submit_evt = evt; submit_evt = evt;
// Prevent double click // Prevent double click
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
var gadget = this, editor_data, editor_gadget; var gadget = this, editor_data, editor_gadget;
return new RSVP.Queue().push(function() { return new RSVP.Queue().push(function() {
// Prevent double click // Prevent double click
evt.target.getElementsByClassName("ui-btn")[0].disabled = true; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = true;
}
return gadget.getDeclaredGadget("tableeditor"); return gadget.getDeclaredGadget("tableeditor");
}).push(function(tablegadget) { }).push(function(tablegadget) {
editor_gadget = tablegadget; editor_gadget = tablegadget;
...@@ -27,7 +29,9 @@ ...@@ -27,7 +29,9 @@
_mimetype: "application/json" _mimetype: "application/json"
}); });
}).push(function() { }).push(function() {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false; if (evt) {
evt.target.getElementsByClassName("ui-btn")[0].disabled = false;
}
}); });
} }
function waitForSave(gadget) { function waitForSave(gadget) {
...@@ -45,7 +49,13 @@ ...@@ -45,7 +49,13 @@
}), gadget.getDeclaredGadget("tableeditor") ]); }), gadget.getDeclaredGadget("tableeditor") ]);
}).push(function(result_list) { }).push(function(result_list) {
return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).wip_part_spreadsheet), { return result_list[1].render(JSON.stringify(JSON.parse(result_list[0]).wip_part_spreadsheet), {
minSpareRows: 1 minSpareRows: 1,
onChange: function() {
if (gadget.timeout) {
window.clearTimeout(gadget.timeout);
}
gadget.timeout = window.setTimeout(saveSpreadsheet.bind(gadget), 100);
}
}); });
}); });
}).declareMethod("startService", function() { }).declareMethod("startService", function() {
......
@media (min-width:110em){.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,nav{margin-left:17em}.close-entry{display:none!important}.gadget_container{padding:1em}}[data-gadget-scope=productionline_toolbox]{position:relative;width:19.5%;float:left}[data-gadget-scope=productionline_graph]{position:relative;width:79.5%;float:right} @media (min-width:110em){.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,nav{margin-left:17em}.close-entry{display:none!important}.gadget_container{padding:1em}}[data-gadget-scope=productionline_toolbox]{position:relative;width:19.5%;float:left}[data-gadget-scope=productionline_graph]{position:relative;width:79.5%;float:right}form.save_form{display:none}
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<script src="../lib/renderjs.min.js"></script> <script src="../lib/renderjs.min.js"></script>
<script src="../lib/jquery.jsplumb.min.js"></script> <script src="../lib/jquery.jsplumb.min.js"></script>
<script src="../lib/handlebars.min.js"></script> <script src="../lib/handlebars.min.js"></script>
<script src="../lib/pubsub.js" type="text/javascript"></script>
<script id="node-template" type="text/x-handlebars-template"> <script id="node-template" type="text/x-handlebars-template">
<div class="window {{class}}" <div class="window {{class}}"
......
...@@ -84,12 +84,18 @@ ...@@ -84,12 +84,18 @@
} }
return "DreamNode_" + n; return "DreamNode_" + n;
} }
function onDataChange(g) {
g.getData().then(function(data) {
$.publish("Dream.Gui.onDataChange", data);
});
}
function updateConnectionData(gadget, connection, remove, edge_data) { function updateConnectionData(gadget, connection, remove, edge_data) {
if (remove) { if (remove) {
delete gadget.props.edge_container[connection.id]; delete gadget.props.edge_container[connection.id];
} else { } else {
gadget.props.edge_container[connection.id] = [ getNodeId(gadget.props.node_container, connection.sourceId), getNodeId(gadget.props.node_container, connection.targetId), edge_data || {} ]; gadget.props.edge_container[connection.id] = [ getNodeId(gadget.props.node_container, connection.sourceId), getNodeId(gadget.props.node_container, connection.targetId), edge_data || {} ];
} }
onDataChange(gadget);
} }
// bind to connection/connectionDetached events, // bind to connection/connectionDetached events,
// and update the list of connections on screen. // and update the list of connections on screen.
...@@ -129,6 +135,7 @@ ...@@ -129,6 +135,7 @@
} }
coordinates[node_id] = coordinate; coordinates[node_id] = coordinate;
gadget.props.preference_container.coordinates = coordinates; gadget.props.preference_container.coordinates = coordinates;
onDataChange(gadget);
return coordinate; return coordinate;
} }
function draggable(gadget) { function draggable(gadget) {
...@@ -190,6 +197,7 @@ ...@@ -190,6 +197,7 @@
// return undefined; // return undefined;
// }); // });
// split in 2 methods ? one for events one for manip // split in 2 methods ? one for events one for manip
onDataChange(gadget);
draggable(gadget); draggable(gadget);
} }
function updateNodeStyle(gadget, element_id) { function updateNodeStyle(gadget, element_id) {
...@@ -268,6 +276,7 @@ ...@@ -268,6 +276,7 @@
// 1.1111; // 1.1111;
// setZoom(gadget, zoom_level); // setZoom(gadget, zoom_level);
// gadget.props.preference_container.zoom_level = zoom_level; // gadget.props.preference_container.zoom_level = zoom_level;
// onDataChange();
// redraw(gadget); // redraw(gadget);
// } // }
// function zoom_out(gadget) { // function zoom_out(gadget) {
...@@ -275,6 +284,7 @@ ...@@ -275,6 +284,7 @@
// 0.9; // 0.9;
// setZoom(gadget, zoom_level); // setZoom(gadget, zoom_level);
// gadget.props.preference_container.zoom_level = zoom_level; // gadget.props.preference_container.zoom_level = zoom_level;
// onDataChange();
// redraw(gadget); // redraw(gadget);
// } // }
function removeElement(gadget, node_id) { function removeElement(gadget, node_id) {
...@@ -288,6 +298,7 @@ ...@@ -288,6 +298,7 @@
delete gadget.props.edge_container[k]; delete gadget.props.edge_container[k];
} }
}); });
onDataChange(gadget);
} }
function updateElementData(gadget, node_id, data) { function updateElementData(gadget, node_id, data) {
var element_id = gadget.props.node_container[node_id].element_id, new_id = data.id; var element_id = gadget.props.node_container[node_id].element_id, new_id = data.id;
...@@ -312,6 +323,7 @@ ...@@ -312,6 +323,7 @@
gadget.props.preference_container.coordinates[new_id] = gadget.props.preference_container.coordinates[node_id]; gadget.props.preference_container.coordinates[new_id] = gadget.props.preference_container.coordinates[node_id];
delete gadget.props.preference_container.coordinates[node_id]; delete gadget.props.preference_container.coordinates[node_id];
} }
onDataChange(gadget);
} }
// function clearAll(gadget) { // function clearAll(gadget) {
// $.each(gadget.props.node_container, function (node_id) { // $.each(gadget.props.node_container, function (node_id) {
...@@ -353,9 +365,11 @@ ...@@ -353,9 +365,11 @@
// } // }
// function setGeneralProperties(gadget, properties) { // function setGeneralProperties(gadget, properties) {
// gadget.props.general_container = properties; // gadget.props.general_container = properties;
// onDataChange();
// } // }
// function updateGeneralProperties(gadget, properties) { // function updateGeneralProperties(gadget, properties) {
// $.extend(gadget.props.general_container, properties); // $.extend(gadget.props.general_container, properties);
// onDataChange();
// } // }
function openNodeDialog(gadget, element, config_dict) { function openNodeDialog(gadget, element, config_dict) {
var node_id = getNodeId(gadget.props.node_container, element.id), node_data = gadget.props.node_container[node_id], element_type = node_data._class.replace(".", "-"), property_list = config_dict[element_type].property_list || [], node_edit_popup = $(gadget.props.element).find("#popup-edit-template"), fieldset_element, delete_promise; var node_id = getNodeId(gadget.props.node_container, element.id), node_data = gadget.props.node_container[node_id], element_type = node_data._class.replace(".", "-"), property_list = config_dict[element_type].property_list || [], node_edit_popup = $(gadget.props.element).find("#popup-edit-template"), fieldset_element, delete_promise;
...@@ -454,6 +468,7 @@ ...@@ -454,6 +468,7 @@
box.css("left", absolute_position[0]); box.css("left", absolute_position[0]);
updateNodeStyle(gadget, element.element_id); updateNodeStyle(gadget, element.element_id);
draggable(gadget); draggable(gadget);
onDataChange(gadget);
} }
function waitForDragover(gadget) { function waitForDragover(gadget) {
return loopEventListener(gadget.props.main, "dragover", false, function() { return loopEventListener(gadget.props.main, "dragover", false, function() {
......
/*global jQuery */
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
"use strict";
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
};
$.unsubscribe = function() {
o.off.apply(o, arguments);
};
$.publish = function() {
o.trigger.apply(o, arguments);
};
})(jQuery);
\ No newline at end of file
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