forked from 0x2620/pandora
processing note
This commit is contained in:
parent
aaf444ae96
commit
f60222c9b5
1 changed files with 22 additions and 5 deletions
|
@ -41,11 +41,28 @@ pandora.ui.item = function() {
|
||||||
pandora.user.ui.itemView.slice(0, 1)
|
pandora.user.ui.itemView.slice(0, 1)
|
||||||
) > -1 ? 'an': 'a') + ' '
|
) > -1 ? 'an': 'a') + ' '
|
||||||
+'{1} view.', [result.data.title, Ox._(pandora.user.ui.itemView)]);
|
+'{1} view.', [result.data.title, Ox._(pandora.user.ui.itemView)]);
|
||||||
pandora.$ui.contentPanel.replaceElement(1,
|
|
||||||
Ox.Element()
|
var note = Ox.Element()
|
||||||
.css({marginTop: '32px', fontSize: '12px', textAlign: 'center'})
|
.css({marginTop: '32px', fontSize: '12px', textAlign: 'center'})
|
||||||
.html(html)
|
pandora.$ui.contentPanel.replaceElement(1, note);
|
||||||
);
|
if (pandora.user.username == item.user || pandora.hasCapability('canSeeAllTasks')) {
|
||||||
|
pandora.api.getTasks({
|
||||||
|
user: pandora.hasCapability('canSeeAllTasks') ? '' : pandora.user.username
|
||||||
|
}, function(result_) {
|
||||||
|
var tasks = result_.data.items.filter(function(task) { return task.item == item})
|
||||||
|
if (tasks.length == 0) {
|
||||||
|
html = Ox._(
|
||||||
|
'<i>{0}</i> is currently processed. '
|
||||||
|
+ '{1} view will be available in a moment.',
|
||||||
|
[result.data.title, Ox._(pandora.user.ui.itemView)]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
note.html(html)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
note.html(html)
|
||||||
|
}
|
||||||
|
|
||||||
pandora.site.itemViews.filter(function(view) {
|
pandora.site.itemViews.filter(function(view) {
|
||||||
return view.id == 'documents';
|
return view.id == 'documents';
|
||||||
}).length && pandora.api.get({
|
}).length && pandora.api.get({
|
||||||
|
|
Loading…
Reference in a new issue