mirror of https://github.com/akveo/blur-admin
refactor(mail): change navigation
parent
2e3a1c9d35
commit
f99d59c6e4
|
@ -14,7 +14,7 @@
|
|||
vm.mail = mailMessages.getMessageById($stateParams.id);
|
||||
vm.back = function(){
|
||||
$state.go('mail.label', {
|
||||
label: 'inbox'
|
||||
label: $stateParams.label
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
function MailListCtrl($stateParams, mailMessages) {
|
||||
var vm = this;
|
||||
vm.messages = mailMessages.getMessagesByLabel($stateParams.label);
|
||||
vm.label = $stateParams.label;
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<table>
|
||||
<tr ng-repeat="m in listCtrl.messages track by m.id | orderBy:'-date'"
|
||||
class="side-message-navigation-item little-human shineHover {{m.tag}}"
|
||||
ui-sref="mail.detail({id: m.id})">
|
||||
ui-sref="mail.detail({id: m.id, label: listCtrl.label})">
|
||||
<td>
|
||||
<div class="mail-checkbox">
|
||||
<label class="checkbox-inline custom-checkbox nowrap margin-left">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
controller: "MailListCtrl",
|
||||
controllerAs: "listCtrl"
|
||||
}).state('mail.detail', {
|
||||
url: '/detail/:id',
|
||||
url: '/:label/:id',
|
||||
templateUrl: 'app/pages/mail/detail/mailDetail.html',
|
||||
controller: "MailDetailCtrl",
|
||||
controllerAs: "detailCtrl"
|
||||
|
|
Loading…
Reference in New Issue