Minor style update
This commit is contained in:
+2
-2
@@ -20,9 +20,9 @@ LmsHome::LmsHome(SessionData& sessionData)
|
|||||||
Wt::WNavigationBar *navigation = new Wt::WNavigationBar(this);
|
Wt::WNavigationBar *navigation = new Wt::WNavigationBar(this);
|
||||||
navigation->setTitle("LMS");
|
navigation->setTitle("LMS");
|
||||||
navigation->setResponsive(true);
|
navigation->setResponsive(true);
|
||||||
|
navigation->addStyleClass("main-nav");
|
||||||
|
|
||||||
Wt::WStackedWidget *contentsStack = new Wt::WStackedWidget(this);
|
Wt::WStackedWidget *contentsStack = new Wt::WStackedWidget(this);
|
||||||
contentsStack->addStyleClass("contents");
|
|
||||||
|
|
||||||
// Setup a Left-aligned menu.
|
// Setup a Left-aligned menu.
|
||||||
Wt::WMenu *leftMenu = new Wt::WMenu(contentsStack, this);
|
Wt::WMenu *leftMenu = new Wt::WMenu(contentsStack, this);
|
||||||
@@ -53,7 +53,7 @@ LmsHome::LmsHome(SessionData& sessionData)
|
|||||||
_searchEdit = new Wt::WLineEdit();
|
_searchEdit = new Wt::WLineEdit();
|
||||||
_searchEdit->setEmptyText("Search...");
|
_searchEdit->setEmptyText("Search...");
|
||||||
|
|
||||||
_searchEdit->keyWentUp().connect(this, &LmsHome::handleSearch);
|
_searchEdit->enterPressed().connect(this, &LmsHome::handleSearch);
|
||||||
|
|
||||||
navigation->addSearch(_searchEdit, Wt::AlignLeft);
|
navigation->addSearch(_searchEdit, Wt::AlignLeft);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include <Wt/WMenu>
|
#include <Wt/WMenu>
|
||||||
#include <Wt/WStackedWidget>
|
#include <Wt/WStackedWidget>
|
||||||
#include <Wt/WTextArea>
|
#include <Wt/WTextArea>
|
||||||
|
#include <Wt/WHBoxLayout>
|
||||||
|
|
||||||
#include "SettingsAudioFormView.hpp"
|
#include "SettingsAudioFormView.hpp"
|
||||||
#include "SettingsUserFormView.hpp"
|
#include "SettingsUserFormView.hpp"
|
||||||
@@ -21,13 +22,21 @@ Settings::Settings(SessionData& sessionData, Wt::WContainerWidget* parent)
|
|||||||
: Wt::WContainerWidget(parent),
|
: Wt::WContainerWidget(parent),
|
||||||
_sessionData(sessionData)
|
_sessionData(sessionData)
|
||||||
{
|
{
|
||||||
|
Wt::WHBoxLayout* hLayout = new Wt::WHBoxLayout(this);
|
||||||
|
|
||||||
// Create a stack where the contents will be located.
|
// Create a stack where the contents will be located.
|
||||||
Wt::WStackedWidget *contents = new Wt::WStackedWidget();
|
Wt::WStackedWidget *contents = new Wt::WStackedWidget();
|
||||||
|
|
||||||
Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical, this);
|
contents->setStyleClass("contents");
|
||||||
menu->setStyleClass("nav nav-pills nav-stacked");
|
contents->setOverflow(WContainerWidget::OverflowHidden);
|
||||||
|
|
||||||
|
Wt::WMenu *menu = new Wt::WMenu(contents, Wt::Vertical);
|
||||||
|
menu->setStyleClass("nav nav-pills nav-stacked submenu");
|
||||||
menu->setWidth(150);
|
menu->setWidth(150);
|
||||||
|
|
||||||
|
hLayout->addWidget(menu);
|
||||||
|
hLayout->addWidget(contents, 1);
|
||||||
|
|
||||||
Wt::Dbo::Transaction transaction( sessionData.getDatabaseHandler().getSession());
|
Wt::Dbo::Transaction transaction( sessionData.getDatabaseHandler().getSession());
|
||||||
|
|
||||||
::Database::User::pointer user = sessionData.getDatabaseHandler().getCurrentUser();
|
::Database::User::pointer user = sessionData.getDatabaseHandler().getCurrentUser();
|
||||||
@@ -53,7 +62,6 @@ _sessionData(sessionData)
|
|||||||
menu->addItem("Account", new AccountFormView(sessionData, Database::User::getId(user)));
|
menu->addItem("Account", new AccountFormView(sessionData, Database::User::getId(user)));
|
||||||
}
|
}
|
||||||
|
|
||||||
addWidget(contents);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user