Compare commits
2 Commits
5e4e52e620
...
1.1.0
Author | SHA1 | Date | |
---|---|---|---|
db95b12985 | |||
8648f5a62e |
@ -221,13 +221,7 @@
|
||||
},
|
||||
messages: () => {
|
||||
const uri = '/mailbox/{{$mailbox_id}}/messages/valid'
|
||||
return Send.get(uri).then((response, status, jqXHR) => {
|
||||
if (parseInt(jqXHR.status/100) !== 2 || jqXHR.status === 204) {
|
||||
$(this.id.results).html('').append(
|
||||
this.draw().empty()
|
||||
)
|
||||
return
|
||||
}
|
||||
return Send.get(uri).then(response => {
|
||||
if (this.total === null) {
|
||||
$(this.id.count).html(' (' + response.total + ')')
|
||||
this.total = response.total
|
||||
@ -390,7 +384,6 @@
|
||||
)
|
||||
},
|
||||
empty: () => {
|
||||
$(this.id.count).html(' (0)')
|
||||
return $('<div></div>').addClass('ui message').html('No messages found.')
|
||||
}
|
||||
}
|
||||
@ -455,4 +448,4 @@
|
||||
messages.setup()
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
@endpush
|
@ -14,8 +14,7 @@
|
||||
const uri = '/mailboxes/registered'
|
||||
this.draw().loading()
|
||||
return Send.get(uri).then((response, status, jqXHR) => {
|
||||
if (parseInt(jqXHR.status / 100) !== 2 || jqXHR.status === 204) {
|
||||
this.draw().empty()
|
||||
if (parseInt(jqXHR.status / 100) !== 2) {
|
||||
return
|
||||
}
|
||||
if (jqXHR.status === 200) {
|
||||
@ -45,7 +44,7 @@
|
||||
const parent = $(this.div_id)
|
||||
parent.html('')
|
||||
if (this.mailboxes.length === 0) {
|
||||
this.draw().empty()
|
||||
parent.html('No mailboxes registered.')
|
||||
return
|
||||
}
|
||||
const list = $('<div></div>').addClass('ui list')
|
||||
@ -55,13 +54,6 @@
|
||||
)
|
||||
})
|
||||
parent.append(list)
|
||||
},
|
||||
empty: () => {
|
||||
const parent = $(this.div_id)
|
||||
parent.html('')
|
||||
parent.append(
|
||||
$('<div></div>').addClass('ui message').html('No mailboxes registered.')
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -71,4 +63,4 @@
|
||||
mailboxes.get()
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
@endpush
|
Reference in New Issue
Block a user