mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
refresh ui css + init inbox scanning settings
This commit is contained in:
parent
062dee987f
commit
797a987e2b
@ -21,7 +21,6 @@ import javax.mail.*;
|
|||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inbox scanning service.
|
* Inbox scanning service.
|
||||||
@ -57,6 +56,9 @@ public class InboxService extends AbstractScheduledService {
|
|||||||
syncInbox();
|
syncInbox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Synchronize the inbox.
|
||||||
|
*/
|
||||||
public void syncInbox() {
|
public void syncInbox() {
|
||||||
TransactionUtil.handle(new Runnable() {
|
TransactionUtil.handle(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -98,22 +100,24 @@ public class InboxService extends AbstractScheduledService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test the inbox configuration.
|
||||||
|
*
|
||||||
|
* @return Number of messages currently in the remote inbox
|
||||||
|
*/
|
||||||
public int testInbox() {
|
public int testInbox() {
|
||||||
final AtomicInteger count = new AtomicInteger(-1);
|
|
||||||
TransactionUtil.handle(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
Boolean enabled = ConfigUtil.getConfigBooleanValue(ConfigType.INBOX_ENABLED);
|
Boolean enabled = ConfigUtil.getConfigBooleanValue(ConfigType.INBOX_ENABLED);
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Folder inbox = null;
|
Folder inbox = null;
|
||||||
try {
|
try {
|
||||||
inbox = openInbox();
|
inbox = openInbox();
|
||||||
count.set(inbox.getMessageCount());
|
return inbox.getMessageCount();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error testing inbox", e);
|
log.error("Error testing inbox", e);
|
||||||
|
return -1;
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
if (inbox != null) {
|
if (inbox != null) {
|
||||||
@ -125,10 +129,6 @@ public class InboxService extends AbstractScheduledService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
return count.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Scheduler scheduler() {
|
protected Scheduler scheduler() {
|
||||||
@ -139,6 +139,7 @@ public class InboxService extends AbstractScheduledService {
|
|||||||
* Open the remote inbox.
|
* Open the remote inbox.
|
||||||
*
|
*
|
||||||
* @return Opened inbox folder
|
* @return Opened inbox folder
|
||||||
|
* @throws Exception e
|
||||||
*/
|
*/
|
||||||
private Folder openInbox() throws Exception {
|
private Folder openInbox() throws Exception {
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
@ -167,7 +168,7 @@ public class InboxService extends AbstractScheduledService {
|
|||||||
* Import an email.
|
* Import an email.
|
||||||
*
|
*
|
||||||
* @param message Message
|
* @param message Message
|
||||||
* @throws Exception
|
* @throws Exception e
|
||||||
*/
|
*/
|
||||||
private void importMessage(Message message) throws Exception {
|
private void importMessage(Message message) throws Exception {
|
||||||
// Parse the mail
|
// Parse the mail
|
||||||
|
@ -58,7 +58,7 @@ public class ThemeResource extends BaseResource {
|
|||||||
// Build the stylesheet
|
// Build the stylesheet
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(new Selector(".navbar")
|
sb.append(new Selector(".navbar")
|
||||||
.rule("background-color", themeConfig.getString("color", "#24292e")));
|
.rule("background-color", themeConfig.getString("color", "#ffffff")));
|
||||||
sb.append(themeConfig.getString("css", ""));
|
sb.append(themeConfig.getString("css", ""));
|
||||||
|
|
||||||
return Response.ok().entity(sb.toString()).build();
|
return Response.ok().entity(sb.toString()).build();
|
||||||
@ -83,7 +83,7 @@ public class ThemeResource extends BaseResource {
|
|||||||
JsonObject themeConfig = getThemeConfig();
|
JsonObject themeConfig = getThemeConfig();
|
||||||
JsonObjectBuilder json = Json.createObjectBuilder();
|
JsonObjectBuilder json = Json.createObjectBuilder();
|
||||||
json.add("name", themeConfig.getString("name", "Sismics Docs"));
|
json.add("name", themeConfig.getString("name", "Sismics Docs"));
|
||||||
json.add("color", themeConfig.getString("color", "#24292e"));
|
json.add("color", themeConfig.getString("color", "#ffffff"));
|
||||||
json.add("css", themeConfig.getString("css", ""));
|
json.add("css", themeConfig.getString("css", ""));
|
||||||
return Response.ok().entity(json.build()).build();
|
return Response.ok().entity(json.build()).build();
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 10 KiB |
@ -128,6 +128,15 @@ angular.module('docs',
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.state('settings.inbox', {
|
||||||
|
url: '/inbox',
|
||||||
|
views: {
|
||||||
|
'settings': {
|
||||||
|
templateUrl: 'partial/docs/settings.inbox.html',
|
||||||
|
controller: 'SettingsInbox'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
.state('settings.user', {
|
.state('settings.user', {
|
||||||
url: '/user',
|
url: '/user',
|
||||||
views: {
|
views: {
|
||||||
|
@ -0,0 +1,85 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings inbox page controller.
|
||||||
|
*/
|
||||||
|
angular.module('docs').controller('SettingsInbox', function($scope, $rootScope, Restangular) {
|
||||||
|
// Get the app configuration
|
||||||
|
Restangular.one('app').get().then(function (data) {
|
||||||
|
$rootScope.app = data;
|
||||||
|
$scope.general = {
|
||||||
|
default_language: data.default_language
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Enable/disable guest login
|
||||||
|
$scope.changeGuestLogin = function (enabled) {
|
||||||
|
Restangular.one('app').post('guest_login', {
|
||||||
|
enabled: enabled
|
||||||
|
}).then(function () {
|
||||||
|
$scope.app.guest_login = enabled;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fetch the current theme configuration
|
||||||
|
Restangular.one('theme').get().then(function (data) {
|
||||||
|
$scope.theme = data;
|
||||||
|
$rootScope.appName = $scope.theme.name;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update the theme
|
||||||
|
$scope.update = function () {
|
||||||
|
$scope.theme.name = $scope.theme.name.length === 0 ? 'Sismics Docs' : $scope.theme.name;
|
||||||
|
Restangular.one('theme').post('', $scope.theme).then(function () {
|
||||||
|
var stylesheet = $('#theme-stylesheet')[0];
|
||||||
|
stylesheet.href = stylesheet.href.replace(/\?.*|$/, '?' + new Date().getTime());
|
||||||
|
$rootScope.appName = $scope.theme.name;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// Send an image
|
||||||
|
$scope.sendingImage = false;
|
||||||
|
$scope.sendImage = function (type, image) {
|
||||||
|
// Build the payload
|
||||||
|
var formData = new FormData();
|
||||||
|
formData.append('image', image);
|
||||||
|
|
||||||
|
// Send the file
|
||||||
|
var done = function() {
|
||||||
|
$scope.$apply(function() {
|
||||||
|
$scope.sendingImage = false;
|
||||||
|
$scope[type] = null;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
$scope.sendingImage = true;
|
||||||
|
$.ajax({
|
||||||
|
type: 'PUT',
|
||||||
|
url: '../api/theme/image/' + type,
|
||||||
|
data: formData,
|
||||||
|
cache: false,
|
||||||
|
contentType: false,
|
||||||
|
processData: false,
|
||||||
|
success: function() {
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// Load SMTP config
|
||||||
|
Restangular.one('app/config_smtp').get().then(function (data) {
|
||||||
|
$scope.smtp = data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Edit SMTP config
|
||||||
|
$scope.editSmtpConfig = function () {
|
||||||
|
Restangular.one('app').post('config_smtp', $scope.smtp);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Edit general config
|
||||||
|
$scope.editGeneralConfig = function () {
|
||||||
|
Restangular.one('app').post('config', $scope.general);
|
||||||
|
};
|
||||||
|
});
|
@ -72,6 +72,7 @@
|
|||||||
<script src="app/docs/controller/settings/SettingsDefault.js" type="text/javascript"></script>
|
<script src="app/docs/controller/settings/SettingsDefault.js" type="text/javascript"></script>
|
||||||
<script src="app/docs/controller/settings/SettingsAccount.js" type="text/javascript"></script>
|
<script src="app/docs/controller/settings/SettingsAccount.js" type="text/javascript"></script>
|
||||||
<script src="app/docs/controller/settings/SettingsConfig.js" type="text/javascript"></script>
|
<script src="app/docs/controller/settings/SettingsConfig.js" type="text/javascript"></script>
|
||||||
|
<script src="app/docs/controller/settings/SettingsInbox.js" type="text/javascript"></script>
|
||||||
<script src="app/docs/controller/settings/SettingsSecurity.js" type="text/javascript"></script>
|
<script src="app/docs/controller/settings/SettingsSecurity.js" type="text/javascript"></script>
|
||||||
<script src="app/docs/controller/settings/SettingsSecurityModalDisableTotp.js" type="text/javascript"></script>
|
<script src="app/docs/controller/settings/SettingsSecurityModalDisableTotp.js" type="text/javascript"></script>
|
||||||
<script src="app/docs/controller/settings/SettingsSession.js" type="text/javascript"></script>
|
<script src="app/docs/controller/settings/SettingsSession.js" type="text/javascript"></script>
|
||||||
@ -98,7 +99,7 @@
|
|||||||
<!-- endref -->
|
<!-- endref -->
|
||||||
</head>
|
</head>
|
||||||
<body translate-cloak ng-cloak>
|
<body translate-cloak ng-cloak>
|
||||||
<nav class="navbar navbar-inverse" role="navigation" ng-controller="Navigation">
|
<nav class="navbar navbar-default" role="navigation" ng-controller="Navigation">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle"
|
<button type="button" class="navbar-toggle"
|
||||||
ng-init="isCollapsed = true"
|
ng-init="isCollapsed = true"
|
||||||
@ -113,7 +114,12 @@
|
|||||||
<img src="../api/theme/image/logo" />
|
<img src="../api/theme/image/logo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="navbar-brand" href="#"> {{ appName }}</a>
|
<a class="navbar-brand" href="#">
|
||||||
|
<span ng-if="appName == 'Sismics Docs'">
|
||||||
|
<span style="color: #e43935;">Sismics</span> <span style="color: #2aabd2;">Docs</span>
|
||||||
|
</span>
|
||||||
|
<span ng-if="appName != 'Sismics Docs'">{{ appName }}</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" uib-collapse="isCollapsed">
|
<div class="collapse navbar-collapse" uib-collapse="isCollapsed">
|
||||||
|
@ -13,7 +13,7 @@ angular.module('ngProgress.provider', ['ngProgress.directive'])
|
|||||||
this.count = 0;
|
this.count = 0;
|
||||||
this.height = '2px';
|
this.height = '2px';
|
||||||
this.$scope = $rootScope.$new();
|
this.$scope = $rootScope.$new();
|
||||||
this.color = 'white';
|
this.color = '#bbb';
|
||||||
this.parent = $document.find('body')[0];
|
this.parent = $document.find('body')[0];
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
|
|
||||||
|
@ -245,6 +245,7 @@
|
|||||||
"menu_groups": "Groups",
|
"menu_groups": "Groups",
|
||||||
"menu_vocabularies": "Vocabularies",
|
"menu_vocabularies": "Vocabularies",
|
||||||
"menu_configuration": "Configuration",
|
"menu_configuration": "Configuration",
|
||||||
|
"menu_inbox": "Inbox scanning",
|
||||||
"menu_server_logs": "Server logs",
|
"menu_server_logs": "Server logs",
|
||||||
"user": {
|
"user": {
|
||||||
"title": "Users management",
|
"title": "Users management",
|
||||||
|
@ -1,7 +1,17 @@
|
|||||||
<div class="row row-full">
|
<script type="text/ng-template" id="tag-tree-item">
|
||||||
|
<span class="btn" ng-style="{ 'background-color': tag.color }"></span>
|
||||||
|
<span class="btn btn-link" ng-click="setSearch('tag:' + tag.name)">
|
||||||
|
{{ tag.name }}
|
||||||
|
</span>
|
||||||
|
<ul class="list-unstyled">
|
||||||
|
<li ng-repeat="tag in getChildrenTags(tag.id)" ng-include="'tag-tree-item'"></li>
|
||||||
|
</ul>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="well well-full">
|
<div class="well well-3d">
|
||||||
<div class="text-center mb-10">
|
<div class="text-center mb-19">
|
||||||
<div class="btn-group" uib-dropdown>
|
<div class="btn-group" uib-dropdown>
|
||||||
<a href="#/document/add" class="btn btn-primary">
|
<a href="#/document/add" class="btn btn-primary">
|
||||||
<span class="glyphicon glyphicon-plus"></span> {{ 'document.add_document' | translate }}
|
<span class="glyphicon glyphicon-plus"></span> {{ 'document.add_document' | translate }}
|
||||||
@ -126,8 +136,8 @@
|
|||||||
<table class="row table table-hover table-documents">
|
<table class="row table table-hover table-documents">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-xs-6" ng-click="sortDocuments(1)"><span class="glyphicon glyphicon-chevron-{{ sortColumn == 1 ? (asc ? 'down' : 'up') : '' }}"></span> {{ 'document.title' | translate }}</th>
|
<th class="col-xs-6" ng-click="sortDocuments(1)">{{ 'document.title' | translate }} <span class="glyphicon glyphicon-chevron-{{ sortColumn == 1 ? (asc ? 'down' : 'up') : '' }}"></span></th>
|
||||||
<th class="col-xs-3" ng-click="sortDocuments(3)"><span class="glyphicon glyphicon-chevron-{{ sortColumn == 3 ? (asc ? 'down' : 'up') : '' }}"></span> {{ 'document.creation_date' | translate }}</th>
|
<th class="col-xs-3" ng-click="sortDocuments(3)">{{ 'document.creation_date' | translate }} <span class="glyphicon glyphicon-chevron-{{ sortColumn == 3 ? (asc ? 'down' : 'up') : '' }}"></span></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -194,13 +204,3 @@
|
|||||||
<div ui-view="document"></div>
|
<div ui-view="document"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/ng-template" id="tag-tree-item">
|
|
||||||
<span class="btn" ng-style="{ 'background-color': tag.color }"></span>
|
|
||||||
<span class="btn btn-link" ng-click="setSearch('tag:' + tag.name)">
|
|
||||||
{{ tag.name }}
|
|
||||||
</span>
|
|
||||||
<ul class="list-unstyled">
|
|
||||||
<li ng-repeat="tag in getChildrenTags(tag.id)" ng-include="'tag-tree-item'"></li>
|
|
||||||
</ul>
|
|
||||||
</script>
|
|
@ -1,5 +1,5 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3 settings-menu">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><strong>{{ 'settings.menu_personal_settings' | translate }}</strong></div>
|
<div class="panel-heading"><strong>{{ 'settings.menu_personal_settings' | translate }}</strong></div>
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
@ -15,6 +15,7 @@
|
|||||||
<a class="list-group-item" ui-sref-active="{ active: 'settings.workflow.**' }" href="#/settings/workflow">{{ 'settings.menu_workflow' | translate }}</a>
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.workflow.**' }" href="#/settings/workflow">{{ 'settings.menu_workflow' | translate }}</a>
|
||||||
<a class="list-group-item" ui-sref-active="{ active: 'settings.user.**' }" href="#/settings/user">{{ 'settings.menu_users' | translate }}</a>
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.user.**' }" href="#/settings/user">{{ 'settings.menu_users' | translate }}</a>
|
||||||
<a class="list-group-item" ui-sref-active="{ active: 'settings.group.**' }" href="#/settings/group">{{ 'settings.menu_groups' | translate }}</a>
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.group.**' }" href="#/settings/group">{{ 'settings.menu_groups' | translate }}</a>
|
||||||
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.inbox.**' }" href="#/settings/inbox">{{ 'settings.menu_inbox' | translate }}</a>
|
||||||
<a class="list-group-item" ui-sref-active="{ active: 'settings.vocabulary.**' }" href="#/settings/vocabulary">{{ 'settings.menu_vocabularies' | translate }}</a>
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.vocabulary.**' }" href="#/settings/vocabulary">{{ 'settings.menu_vocabularies' | translate }}</a>
|
||||||
<a class="list-group-item" ui-sref-active="{ active: 'settings.config.**' }" href="#/settings/config">{{ 'settings.menu_configuration' | translate }}</a>
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.config.**' }" href="#/settings/config">{{ 'settings.menu_configuration' | translate }}</a>
|
||||||
<a class="list-group-item" ui-sref-active="{ active: 'settings.log.**' }" href="#/settings/log">{{ 'settings.menu_server_logs' | translate }}</a>
|
<a class="list-group-item" ui-sref-active="{ active: 'settings.log.**' }" href="#/settings/log">{{ 'settings.menu_server_logs' | translate }}</a>
|
||||||
@ -22,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-9">
|
<div class="col-md-9 settings-content">
|
||||||
<div ui-view="settings"></div>
|
<div ui-view="settings"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
145
docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
Normal file
145
docs-web/src/main/webapp/src/partial/docs/settings.inbox.html
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<h2>
|
||||||
|
<span translate="settings.config.title_guest_access"></span>
|
||||||
|
<span class="label" ng-class="{ 'label-success': app.guest_login, 'label-danger': !app.guest_login }">
|
||||||
|
{{ app.guest_login ? 'enabled' : 'disabled' | translate }}
|
||||||
|
</span>
|
||||||
|
</h2>
|
||||||
|
<p translate="settings.config.message_guest_access" translate-values="{ appName: appName }">
|
||||||
|
</p>
|
||||||
|
<div ng-if="app">
|
||||||
|
<button ng-if="!app.guest_login" class="btn btn-primary" ng-click="changeGuestLogin(true)">{{ 'settings.config.enable_guest_access' | translate }}</button>
|
||||||
|
<button ng-if="app.guest_login" class="btn btn-danger" ng-click="changeGuestLogin(false)">{{ 'settings.config.disable_guest_access' | translate }}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2 translate="settings.config.title_general"></h2>
|
||||||
|
<form class="form-horizontal" name="generalForm" novalidate>
|
||||||
|
<div class="form-group" ng-class="{ 'has-error': !generalForm.defaultLanguage.$valid && generalForm.$dirty }">
|
||||||
|
<label class="col-sm-2 control-label" for="defaultLanguage">{{ 'settings.config.default_language' | translate }}</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<select name="defaultLanguage" class="form-control" id="defaultLanguage" ng-model="general.default_language">
|
||||||
|
<option ng-repeat="language in acceptedLanguages" value="{{ language.key }}">{{ language.label }}</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary" ng-click="editGeneralConfig()" ng-disabled="!generalForm.$valid">
|
||||||
|
<span class="glyphicon glyphicon-pencil"></span> {{ 'save' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<h2 translate="settings.config.title_theme"></h2>
|
||||||
|
<form class="form-horizontal" name="editColorForm" novalidate>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label" for="inputName">{{ 'settings.config.application_name' | translate }}</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
id="inputName" ng-model="theme.name" ng-blur="update()" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label" for="inputColor">{{ 'settings.config.main_color' | translate }}</label>
|
||||||
|
<div class="col-sm-1">
|
||||||
|
<span colorpicker class="btn btn-default" id="inputColor" on-hide="update()"
|
||||||
|
data-color="" ng-model="theme.color" ng-style="{ 'background': theme.color }"> </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label" for="inputCss">{{ 'settings.config.custom_css' | translate }}</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea class="form-control" rows="6" ng-attr-placeholder="{{ 'settings.config.custom_css_placeholder' | translate }}"
|
||||||
|
id="inputCss" ng-model="theme.css" ng-blur="update()"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label" for="inputLogo">{{ 'settings.config.logo' | translate }}</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="file" ngf-select ngf-accept="'image/gif,image/png,image/jpg,image/jpeg'"
|
||||||
|
class="form-control" id="inputLogo" ng-model="logo" ng-disabled="sendingImage" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<button class="btn btn-default" ng-click="sendImage('logo', logo)" ng-disabled="sendingImage || !logo">
|
||||||
|
<span class="glyphicon glyphicon-save"></span>
|
||||||
|
{{ 'send' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label" for="inputBackground">{{ 'settings.config.background_image' | translate }}</label>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<input type="file" ngf-select ngf-accept="'image/gif,image/png,image/jpg,image/jpeg'"
|
||||||
|
class="form-control" id="inputBackground" ng-model="background" ng-disabled="sendingImage" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<button class="btn btn-default" ng-click="sendImage('background', background)" ng-disabled="sendingImage || !background">
|
||||||
|
<span class="glyphicon glyphicon-save"></span>
|
||||||
|
{{ 'send' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-2 control-label"></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<p class="form-control-static text-info" ng-if="sendingImage">
|
||||||
|
{{ 'settings.config.uploading_image' | translate }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<h2 translate="settings.config.title_smtp"></h2>
|
||||||
|
<form class="form-horizontal" name="smtpForm" novalidate>
|
||||||
|
<div class="form-group" ng-show="smtp.hasOwnProperty('hostname')" ng-class="{ 'has-error': !smtpForm.hostname.$valid && smtpForm.$dirty }">
|
||||||
|
<label class="col-sm-2 control-label" for="smtpHostname">{{ 'settings.config.smtp_hostname' | translate }}</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<input name="hostname" type="text" ng-disabled="!smtp.hasOwnProperty('hostname')" class="form-control" id="smtpHostname" ng-model="smtp.hostname" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" ng-show="smtp.hasOwnProperty('port')" ng-class="{ 'has-error': !smtpForm.port.$valid && smtpForm.$dirty }">
|
||||||
|
<label class="col-sm-2 control-label" for="smtpPort">{{ 'settings.config.smtp_port' | translate }}</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<input name="port" type="number" ng-disabled="!smtp.hasOwnProperty('port')" class="form-control" id="smtpPort" ng-model="smtp.port" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" ng-show="smtp.hasOwnProperty('username')">
|
||||||
|
<label class="col-sm-2 control-label" for="smtpUsername">{{ 'settings.config.smtp_username' | translate }}</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<input name="username" type="text" ng-disabled="!smtp.hasOwnProperty('username')" class="form-control" id="smtpUsername" ng-model="smtp.username" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" ng-show="smtp.hasOwnProperty('password')">
|
||||||
|
<label class="col-sm-2 control-label" for="smtpPassword">{{ 'settings.config.smtp_password' | translate }}</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<input name="password" type="password" ng-disabled="!smtp.hasOwnProperty('password')" class="form-control" id="smtpPassword" ng-model="smtp.password" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group" ng-class="{ 'has-error': !smtpForm.from.$valid && smtpForm.$dirty }">
|
||||||
|
<label class="col-sm-2 control-label" for="smtpFrom">{{ 'settings.config.smtp_from' | translate }}</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<input name="from" type="email" class="form-control" id="smtpFrom" ng-model="smtp.from" />
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<span class="help-block" ng-show="smtpForm.from.$error.email && smtpForm.$dirty">{{ 'validation.email' | translate }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-primary" ng-click="editSmtpConfig()" ng-disabled="!smtpForm.$valid">
|
||||||
|
<span class="glyphicon glyphicon-pencil"></span> {{ 'save' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
@ -1,6 +1,6 @@
|
|||||||
<div class="row row-full">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="well well-full">
|
<div class="well well-3d">
|
||||||
<form name="tagForm" novalidate>
|
<form name="tagForm" novalidate>
|
||||||
<p class="input-group" ng-class="{ 'has-error': !tagForm.name.$valid && tagForm.$dirty }">
|
<p class="input-group" ng-class="{ 'has-error': !tagForm.name.$valid && tagForm.$dirty }">
|
||||||
<span colorpicker class="input-group-addon btn btn-default" data-color="#3a87ad" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span>
|
<span colorpicker class="input-group-addon btn btn-default" data-color="#3a87ad" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="well">
|
<div class="well well-3d">
|
||||||
<p class="input-group">
|
<p class="input-group">
|
||||||
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
|
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
|
||||||
<input type="search" class="form-control" ng-attr-placeholder="{{ 'usergroup.search_groups' | translate }}" ng-model="searchGroup">
|
<input type="search" class="form-control" ng-attr-placeholder="{{ 'usergroup.search_groups' | translate }}" ng-model="searchGroup">
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="well">
|
<div class="well well-3d">
|
||||||
<p class="input-group">
|
<p class="input-group">
|
||||||
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
|
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
|
||||||
<input type="search" class="form-control" ng-attr-placeholder="{{ 'usergroup.search_users' | translate }}" ng-model="searchUser">
|
<input type="search" class="form-control" ng-attr-placeholder="{{ 'usergroup.search_users' | translate }}" ng-model="searchUser">
|
||||||
|
@ -34,9 +34,16 @@
|
|||||||
|
|
||||||
// Documents list
|
// Documents list
|
||||||
.table-documents {
|
.table-documents {
|
||||||
|
margin-top: 18px !important;
|
||||||
|
|
||||||
thead th {
|
thead th {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 500;
|
||||||
|
background-color: #f6f9fc;
|
||||||
|
border: none !important;
|
||||||
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody tr {
|
tbody tr {
|
||||||
@ -46,24 +53,9 @@
|
|||||||
.label {
|
.label {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
border: none;
|
||||||
.row-full {
|
|
||||||
overflow: hidden;
|
|
||||||
margin-top: -20px !important;
|
|
||||||
min-height: 80vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.well-full {
|
|
||||||
margin-left: -15px;
|
|
||||||
padding-bottom: 1000px;
|
|
||||||
margin-bottom: -980px;
|
|
||||||
height: 100%;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
box-shadow: inset -2px 0 0 #e5e5e5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,6 +312,55 @@ input[readonly].share-link {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Settings
|
||||||
|
.settings-menu {
|
||||||
|
.panel-default {
|
||||||
|
border: 1px solid #eee;
|
||||||
|
box-shadow: 0 7px 14px 0 rgba(50,50,93,.1), 0 3px 6px 0 rgba(0,0,0,.07);
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
& > .panel-heading {
|
||||||
|
border-bottom: none;
|
||||||
|
background: #f9f9f9;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-group-item {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-group-item.active {
|
||||||
|
background: none;
|
||||||
|
color: #337ab7;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-content {
|
||||||
|
.well {
|
||||||
|
box-shadow: 0 7px 14px 0 rgba(50,50,93,.1), 0 3px 6px 0 rgba(0,0,0,.07);
|
||||||
|
background: none;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
.table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: 500;
|
||||||
|
background-color: #f6f9fc;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Feedback
|
// Feedback
|
||||||
.feedback {
|
.feedback {
|
||||||
display: block;
|
display: block;
|
||||||
@ -451,10 +492,51 @@ input[readonly].share-link {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buttons
|
.mb-19 {
|
||||||
|
margin-bottom: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// BS customizations
|
||||||
.btn {
|
.btn {
|
||||||
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||||
font-weight: 400;
|
font-weight: 500;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 0 1px rgba(50,50,93,.1), 0 2px 5px 0 rgba(50,50,93,.08), 0 1px 1.5px 0 rgba(0,0,0,.07), 0 1px 2px 0 rgba(0,0,0,.08), 0 0 0 0 transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 0 1px rgba(49,49,93,.03), 0 2px 5px 0 rgba(49,49,93,.1), 0 1px 2px 0 rgba(0,0,0,.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu {
|
||||||
|
border: none;
|
||||||
|
box-shadow: 0 0 0 1px rgba(136,152,170,.1), 0 15px 35px 0 rgba(49,49,93,.1), 0 5px 15px 0 rgba(0,0,0,.13);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default {
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav > li {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-nav > .active > a,
|
||||||
|
.navbar-default .navbar-nav > .active > a:hover,
|
||||||
|
.navbar-default .navbar-nav > .active > a:focus {
|
||||||
|
color: #2ab2dc;
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.well-3d {
|
||||||
|
border: 1px solid #eee;
|
||||||
|
box-shadow: 0 7px 14px 0 rgba(50,50,93,.1), 0 3px 6px 0 rgba(0,0,0,.07);
|
||||||
|
background: none;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@ public class TestThemeResource extends BaseJerseyTest {
|
|||||||
// Get the stylesheet anonymously
|
// Get the stylesheet anonymously
|
||||||
String stylesheet = target().path("/theme/stylesheet").request()
|
String stylesheet = target().path("/theme/stylesheet").request()
|
||||||
.get(String.class);
|
.get(String.class);
|
||||||
Assert.assertTrue(stylesheet.contains("background-color: #24292e;"));
|
Assert.assertTrue(stylesheet.contains("background-color: #ffffff;"));
|
||||||
|
|
||||||
// Get the theme configuration anonymously
|
// Get the theme configuration anonymously
|
||||||
JsonObject json = target().path("/theme").request()
|
JsonObject json = target().path("/theme").request()
|
||||||
.get(JsonObject.class);
|
.get(JsonObject.class);
|
||||||
Assert.assertEquals("Sismics Docs", json.getString("name"));
|
Assert.assertEquals("Sismics Docs", json.getString("name"));
|
||||||
Assert.assertEquals("#24292e", json.getString("color"));
|
Assert.assertEquals("#ffffff", json.getString("color"));
|
||||||
Assert.assertEquals("", json.getString("css"));
|
Assert.assertEquals("", json.getString("css"));
|
||||||
|
|
||||||
// Update the main color as admin
|
// Update the main color as admin
|
||||||
|
Loading…
Reference in New Issue
Block a user