add loading stub
This commit is contained in:
parent
f1b89a5302
commit
0b8728d7ce
@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
var link = {
|
var link = {
|
||||||
node: node,
|
node: node,
|
||||||
targetNum: targetNum
|
id: 'inline_' + targetNum
|
||||||
}
|
}
|
||||||
|
|
||||||
var selector = targetNum === targetOP
|
var selector = targetNum === targetOP
|
||||||
@ -84,7 +84,12 @@
|
|||||||
return add(link, $target)
|
return add(link, $target)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var $loading = $('<div class="inline post">loading...</div>')
|
||||||
|
.attr('id', link.id)
|
||||||
|
.insertAfter(link.node)
|
||||||
|
|
||||||
App.get(this.pathname, function($page) {
|
App.get(this.pathname, function($page) {
|
||||||
|
$loading.remove()
|
||||||
var $target = $page.find(selector)
|
var $target = $page.find(selector)
|
||||||
add(link, $target)
|
add(link, $target)
|
||||||
})
|
})
|
||||||
@ -95,7 +100,7 @@
|
|||||||
$clone.find('.inline').remove()
|
$clone.find('.inline').remove()
|
||||||
$clone.attr({
|
$clone.attr({
|
||||||
"class": 'inline post',
|
"class": 'inline post',
|
||||||
id: 'inline_' + link.targetNum,
|
id: link.id,
|
||||||
style: null// XXX remove post hover styling
|
style: null// XXX remove post hover styling
|
||||||
})
|
})
|
||||||
$clone.insertAfter(link.node)
|
$clone.insertAfter(link.node)
|
||||||
|
Loading…
Reference in New Issue
Block a user