Commit c445732c authored by Nigel McNie's avatar Nigel McNie
Browse files

Show a loading message while the javascript init is being run. Fix a but where...

Show a loading message while the javascript init is being run. Fix a but where I broke dropping new block types
parent c5d5394b
......@@ -60,6 +60,10 @@ function ViewManager() {
// Add CSS rules
self.addCSSRules();
// Now we're done, remove the loading message and display the page
removeElement('views-loading');
showElement('bottom-pane');
}
/**
......@@ -661,7 +665,7 @@ function ViewManager() {
dropFunction = partial(insertSiblingNodesAfter, self.blockPlaceholder);
}
self.makeHotzoneDroppable(hotzone, node, placementFunction, dropFunction);
self.makeHotzoneDroppable(hotzone, node, placementFunction, dropFunction, placeAfter);
appendChildNodes(self.hotzoneContainer, hotzone);
return hotzone;
}
......@@ -669,7 +673,7 @@ function ViewManager() {
/**
* Makes a hotzone droppable. In a separate function for scoping purposes
*/
this.makeHotzoneDroppable = function(hotzone, node, placementFunction, dropFunction) {
this.makeHotzoneDroppable = function(hotzone, node, placementFunction, dropFunction, placeAfter) {
var counter = 5;
new Droppable(hotzone, {
'onhover': function() {
......
......@@ -15,7 +15,7 @@
<div id="blocktype-footer"></div>
</div>
<div id="bottom-pane">
<div id="bottom-pane" style="display: none;">
<div id="column-container">
{$columns}
<div id="clearer">
......@@ -23,6 +23,11 @@
</div>
</div>
</div>
<script type="text/javascript">
{literal}
insertSiblingNodesAfter('bottom-pane', DIV({'id': 'views-loading'}, 'Loading...'));
{/literal}
</script>
</div>
</form>
......
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