mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-01 00:29:03 +02:00
feat(forums): add forums admin list view side-overlay
This commit is contained in:
@@ -5,18 +5,29 @@
|
||||
.module('forums')
|
||||
.controller('ForumsController', ForumsController);
|
||||
|
||||
ForumsController.$inject = ['$scope', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsAdminService'];
|
||||
ForumsController.$inject = ['$scope', '$translate', 'Authentication', 'MeanTorrentConfig', 'ForumsAdminService', 'SideOverlay'];
|
||||
|
||||
function ForumsController($scope, $translate, Authentication, MeanTorrentConfig, ForumsAdminService) {
|
||||
function ForumsController($scope, $translate, Authentication, MeanTorrentConfig, ForumsAdminService, SideOverlay) {
|
||||
var vm = this;
|
||||
vm.forumsConfig = MeanTorrentConfig.meanTorrentConfig.forumsConfig;
|
||||
vm.user = Authentication.user;
|
||||
|
||||
/**
|
||||
* init
|
||||
*/
|
||||
vm.init = function () {
|
||||
ForumsAdminService.query({}, function (items) {
|
||||
vm.forums = items;
|
||||
console.log(items);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* openSideOverlay
|
||||
* @param evt
|
||||
*/
|
||||
vm.openSideOverlay = function (evt) {
|
||||
SideOverlay.open(evt, 'popupSlide');
|
||||
};
|
||||
}
|
||||
}());
|
||||
|
||||
19
modules/forums/client/less/forum.less
Normal file
19
modules/forums/client/less/forum.less
Normal file
@@ -0,0 +1,19 @@
|
||||
@import (reference) "../../../core/client/less/mt-var.less";
|
||||
|
||||
.forum-side-overlay {
|
||||
top: 50px !important;
|
||||
@media (min-width: @screen-sm-min) {
|
||||
width: 450px;
|
||||
}
|
||||
@media (max-width: @screen-xs-max) {
|
||||
min-width: ~"calc(100% - 50px)";
|
||||
}
|
||||
}
|
||||
|
||||
.forum-popup {
|
||||
background-color: #fdfdfd;
|
||||
width: 100%;
|
||||
height: ~"calc(100% - 150px)";
|
||||
overflow: auto;
|
||||
padding: 15px;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<section class="container padding-top-10" ng-controller="ForumsController as vm" ng-init="vm.init();">
|
||||
<div class="row margin-top-20">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<button class="btn btn-success"> {{ 'FORUMS.BTN_ADD_FORUM' | translate }} </button>
|
||||
<button class="btn btn-success" ng-click="vm.openSideOverlay($event)"> {{ 'FORUMS.BTN_ADD_FORUM' | translate }} </button>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-10 col-sm-offset-1">
|
||||
@@ -23,6 +23,7 @@
|
||||
<tr ng-repeat="f in vm.forums | filter: { category: cat }">
|
||||
<td scope="row">
|
||||
<h4>{{f.name}}</h4>
|
||||
|
||||
<p>{{f.desc}}</p>
|
||||
</td>
|
||||
<td class="text-center">{{f.order}}</td>
|
||||
@@ -34,5 +35,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="popupSlide" side-overlay="right" side-class="forum-side-overlay" side-modal side-close-on-esc side-close-on-outside-click>
|
||||
<div class="forum-popup">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
width: 450px;
|
||||
}
|
||||
@media (max-width: @screen-xs-max) {
|
||||
min-width: ~"calc(100% - 150px)";
|
||||
min-width: ~"calc(100% - 50px)";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user