mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup admin code
This commit is contained in:
parent
75c879836c
commit
3572d00a10
16 changed files with 178 additions and 244 deletions
|
|
@ -105,8 +105,6 @@ export class ContactsAdminSettings {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
this.onTestContactsResponse = this.onTestContactsResponse.bind(this);
|
|
||||||
|
|
||||||
decorateKoCommands(this, {
|
decorateKoCommands(this, {
|
||||||
testContactsCommand: self => self.pdoDsn() && self.pdoUser()
|
testContactsCommand: self => self.pdoDsn() && self.pdoUser()
|
||||||
});
|
});
|
||||||
|
|
@ -118,15 +116,7 @@ export class ContactsAdminSettings {
|
||||||
this.testContactsErrorMessage('');
|
this.testContactsErrorMessage('');
|
||||||
this.testing(true);
|
this.testing(true);
|
||||||
|
|
||||||
Remote.testContacts(this.onTestContactsResponse, {
|
Remote.testContacts((iError, data) => {
|
||||||
ContactsPdoType: this.contactsType(),
|
|
||||||
ContactsPdoDsn: this.pdoDsn(),
|
|
||||||
ContactsPdoUser: this.pdoUser(),
|
|
||||||
ContactsPdoPassword: this.pdoPassword()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onTestContactsResponse(iError, data) {
|
|
||||||
this.testContactsSuccess(false);
|
this.testContactsSuccess(false);
|
||||||
this.testContactsError(false);
|
this.testContactsError(false);
|
||||||
this.testContactsErrorMessage('');
|
this.testContactsErrorMessage('');
|
||||||
|
|
@ -143,6 +133,12 @@ export class ContactsAdminSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.testing(false);
|
this.testing(false);
|
||||||
|
}, {
|
||||||
|
ContactsPdoType: this.contactsType(),
|
||||||
|
ContactsPdoDsn: this.pdoDsn(),
|
||||||
|
ContactsPdoUser: this.pdoUser(),
|
||||||
|
ContactsPdoPassword: this.pdoPassword()
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,6 @@ export class DomainsAdminSettings {
|
||||||
this.domains = DomainAdminStore;
|
this.domains = DomainAdminStore;
|
||||||
|
|
||||||
this.domainForDeletion = ko.observable(null).deleteAccessHelper();
|
this.domainForDeletion = ko.observable(null).deleteAccessHelper();
|
||||||
|
|
||||||
this.onDomainListChangeRequest = this.onDomainListChangeRequest.bind(this);
|
|
||||||
this.onDomainLoadRequest = this.onDomainLoadRequest.bind(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
createDomain() {
|
createDomain() {
|
||||||
|
|
@ -28,30 +25,22 @@ export class DomainsAdminSettings {
|
||||||
|
|
||||||
deleteDomain(domain) {
|
deleteDomain(domain) {
|
||||||
DomainAdminStore.remove(domain);
|
DomainAdminStore.remove(domain);
|
||||||
Remote.domainDelete(this.onDomainListChangeRequest, domain.name);
|
Remote.domainDelete(DomainAdminStore.fetch, domain.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
disableDomain(domain) {
|
disableDomain(domain) {
|
||||||
domain.disabled(!domain.disabled());
|
domain.disabled(!domain.disabled());
|
||||||
Remote.domainDisable(this.onDomainListChangeRequest, domain.name, domain.disabled());
|
Remote.domainDisable(DomainAdminStore.fetch, domain.name, domain.disabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
onBuild(oDom) {
|
onBuild(oDom) {
|
||||||
oDom.addEventListener('click', event => {
|
oDom.addEventListener('click', event => {
|
||||||
let el = event.target.closestWithin('.b-admin-domains-list-table .e-item .e-action', oDom);
|
let el = event.target.closestWithin('.b-admin-domains-list-table .e-action', oDom);
|
||||||
el && ko.dataFor(el) && Remote.domain(this.onDomainLoadRequest, ko.dataFor(el).name);
|
el && ko.dataFor(el) && Remote.domain(
|
||||||
|
(iError, oData) => iError || showScreenPopup(DomainPopupView, [oData.Result]), ko.dataFor(el).name
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
DomainAdminStore.fetch();
|
DomainAdminStore.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onDomainLoadRequest(iError, oData) {
|
|
||||||
if (!iError) {
|
|
||||||
showScreenPopup(DomainPopupView, [oData.Result]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onDomainListChangeRequest() {
|
|
||||||
DomainAdminStore.fetch();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,14 @@ import Remote from 'Remote/Admin/Fetch';
|
||||||
|
|
||||||
import { PluginPopupView } from 'View/Popup/Plugin';
|
import { PluginPopupView } from 'View/Popup/Plugin';
|
||||||
|
|
||||||
export class PluginsAdminSettings {
|
export class PluginsAdminSettings
|
||||||
|
{
|
||||||
constructor() {
|
constructor() {
|
||||||
this.enabledPlugins = ko.observable(!!SettingsGet('EnabledPlugins'));
|
this.enabledPlugins = ko.observable(!!SettingsGet('EnabledPlugins'));
|
||||||
|
|
||||||
this.plugins = PluginAdminStore;
|
this.plugins = PluginAdminStore;
|
||||||
this.pluginsError = PluginAdminStore.error;
|
this.pluginsError = PluginAdminStore.error;
|
||||||
|
|
||||||
this.onPluginLoadRequest = this.onPluginLoadRequest.bind(this);
|
|
||||||
this.onPluginDisableRequest = this.onPluginDisableRequest.bind(this);
|
|
||||||
|
|
||||||
this.enabledPlugins.subscribe(value =>
|
this.enabledPlugins.subscribe(value =>
|
||||||
Remote.saveAdminConfig(null, {
|
Remote.saveAdminConfig(null, {
|
||||||
EnabledPlugins: value ? 1 : 0
|
EnabledPlugins: value ? 1 : 0
|
||||||
|
|
@ -30,20 +28,30 @@ export class PluginsAdminSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
disablePlugin(plugin) {
|
disablePlugin(plugin) {
|
||||||
plugin.disabled(!plugin.disabled());
|
let b = !plugin.disabled();
|
||||||
Remote.pluginDisable(this.onPluginDisableRequest, plugin.name, plugin.disabled());
|
plugin.disabled(b);
|
||||||
|
Remote.pluginDisable((iError, data) => {
|
||||||
|
if (iError) {
|
||||||
|
PluginAdminStore.error(
|
||||||
|
(Notification.UnsupportedPluginPackage === iError && data && data.ErrorMessage)
|
||||||
|
? data.ErrorMessage
|
||||||
|
: getNotification(iError)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
PluginAdminStore.fetch();
|
||||||
|
}, plugin.name, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
configurePlugin(plugin) {
|
configurePlugin(plugin) {
|
||||||
Remote.plugin(this.onPluginLoadRequest, plugin.name);
|
Remote.plugin((iError, data) => iError || showScreenPopup(PluginPopupView, [data.Result]), plugin.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
onBuild(oDom) {
|
onBuild(oDom) {
|
||||||
oDom.addEventListener('click', event => {
|
oDom.addEventListener('click', event => {
|
||||||
let el = event.target.closestWithin('.e-item .configure-plugin-action', oDom);
|
let el = event.target.closestWithin('.configure-plugin-action', oDom);
|
||||||
el && ko.dataFor(el) && this.configurePlugin(ko.dataFor(el));
|
el && ko.dataFor(el) && this.configurePlugin(ko.dataFor(el));
|
||||||
|
|
||||||
el = event.target.closestWithin('.e-item .disabled-plugin', oDom);
|
el = event.target.closestWithin('.disabled-plugin', oDom);
|
||||||
el && ko.dataFor(el) && this.disablePlugin(ko.dataFor(el));
|
el && ko.dataFor(el) && this.disablePlugin(ko.dataFor(el));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -52,22 +60,4 @@ export class PluginsAdminSettings {
|
||||||
PluginAdminStore.error('');
|
PluginAdminStore.error('');
|
||||||
PluginAdminStore.fetch();
|
PluginAdminStore.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
onPluginLoadRequest(iError, data) {
|
|
||||||
if (!iError) {
|
|
||||||
showScreenPopup(PluginPopupView, [data.Result]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onPluginDisableRequest(iError, data) {
|
|
||||||
if (iError) {
|
|
||||||
if (Notification.UnsupportedPluginPackage === iError && data && data.ErrorMessage) {
|
|
||||||
PluginAdminStore.error(data.ErrorMessage);
|
|
||||||
} else {
|
|
||||||
PluginAdminStore.error(getNotification(iError));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PluginAdminStore.fetch();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,6 @@ export class SecurityAdminSettings {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
this.onNewAdminPasswordResponse = this.onNewAdminPasswordResponse.bind(this);
|
|
||||||
|
|
||||||
decorateKoCommands(this, {
|
decorateKoCommands(this, {
|
||||||
saveNewAdminPasswordCommand: self => self.adminLogin().trim() && self.adminPassword()
|
saveNewAdminPasswordCommand: self => self.adminLogin().trim() && self.adminPassword()
|
||||||
});
|
});
|
||||||
|
|
@ -93,16 +91,7 @@ export class SecurityAdminSettings {
|
||||||
this.adminPasswordUpdateError(false);
|
this.adminPasswordUpdateError(false);
|
||||||
this.adminPasswordUpdateSuccess(false);
|
this.adminPasswordUpdateSuccess(false);
|
||||||
|
|
||||||
Remote.saveNewAdminPassword(this.onNewAdminPasswordResponse, {
|
Remote.saveNewAdminPassword((iError, data) => {
|
||||||
'Login': this.adminLogin(),
|
|
||||||
'Password': this.adminPassword(),
|
|
||||||
'NewPassword': this.adminPasswordNew()
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
onNewAdminPasswordResponse(iError, data) {
|
|
||||||
if (iError) {
|
if (iError) {
|
||||||
this.adminPasswordUpdateError(true);
|
this.adminPasswordUpdateError(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -114,6 +103,13 @@ export class SecurityAdminSettings {
|
||||||
|
|
||||||
this.weakPassword(!!data.Result.Weak);
|
this.weakPassword(!!data.Result.Weak);
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'Login': this.adminLogin(),
|
||||||
|
'Password': this.adminPassword(),
|
||||||
|
'NewPassword': this.adminPasswordNew()
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onHide() {
|
onHide() {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
width: 600px;
|
width: 600px;
|
||||||
|
|
||||||
.e-item {
|
|
||||||
|
|
||||||
.domain-name {
|
.domain-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
@ -18,22 +16,16 @@
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
.domain-name, .domain-alias {
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-delete {
|
.button-delete {
|
||||||
margin-right: 15px;
|
position: relative;
|
||||||
|
right: 0;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
white-space: nowrap;
|
||||||
|
|
||||||
.delete-access {
|
&.delete-access {
|
||||||
&.button-delete {
|
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
margin-right: 0;
|
right: -15px;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -41,16 +33,19 @@
|
||||||
.delete-domain, .disabled-domain {
|
.delete-domain, .disabled-domain {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled .disabled-domain {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.delete-domain, .disabled-domain {
|
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled {
|
||||||
|
.domain-name, .domain-alias {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.disabled-domain {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
width: 700px;
|
width: 700px;
|
||||||
|
|
||||||
.e-item {
|
|
||||||
|
|
||||||
.package-img {
|
.package-img {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
|
@ -32,5 +30,4 @@
|
||||||
.package-actions {
|
.package-actions {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,14 @@
|
||||||
|
|
||||||
.b-admin-plugins-list-table {
|
.b-admin-plugins-list-table {
|
||||||
|
max-width: 620px; /* span8 */
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
background-color: #eee;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.e-item {
|
.disabled {
|
||||||
.plugin-img {
|
|
||||||
font-size: 12px;
|
|
||||||
margin-right: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
.plugin-img, .plugin-name {
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
.disabled-plugin {
|
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.b-admin-plugin-property {
|
.b-admin-plugin-property {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export class MenuSettingsUserView extends AbstractViewLeft {
|
||||||
onBuild(dom) {
|
onBuild(dom) {
|
||||||
dom.addEventListener('click', event =>
|
dom.addEventListener('click', event =>
|
||||||
ThemeStore.isMobile()
|
ThemeStore.isMobile()
|
||||||
&& event.target.closest('.b-settings-menu a', dom)
|
&& event.target.closestWithin('.b-settings-menu a', dom)
|
||||||
&& leftPanelDisabled(true)
|
&& leftPanelDisabled(true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,12 +95,6 @@ host=127.0.0.1;port=5432;dbname=snappymail
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group" data-bind="visible: '' !== testContactsErrorMessage()">
|
<div class="alert span8" data-bind="text: testContactsErrorMessage, visible: '' !== testContactsErrorMessage()"></div>
|
||||||
<div class="controls">
|
|
||||||
<div class="row">
|
|
||||||
<div class="alert span8" data-bind="text: testContactsErrorMessage"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<tr class="e-item" data-bind="css: {'disabled': disabled }">
|
|
||||||
<td class="e-action">
|
|
||||||
<span class="domain-name" data-bind="text: name"></span>
|
|
||||||
<span class="domain-alias" data-bind="if: alias">(alias)</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="btn btn-small btn-small-small btn-danger pull-right button-delete button-delete-transitions" data-bind="css: {'delete-access': deleteAccess()}, click: function(oDomain) { $root.deleteDomain(oDomain); }"
|
|
||||||
data-i18n="TAB_DOMAINS/DELETE_ARE_YOU_SURE"></a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span class="delete-domain" data-bind="visible: !deleteAccess(), click: function (oDomain) { $root.domainForDeletion(oDomain); }">
|
|
||||||
<i class="fontastic">🗑</i>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span class="disabled-domain fontastic" data-bind="click: function (oDomain) { $root.disableDomain(oDomain); }, text: disabled() ? '☐' : '☑'"></span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
@ -25,7 +25,22 @@
|
||||||
<col style="width: 1%" />
|
<col style="width: 1%" />
|
||||||
<col style="width: 1%" />
|
<col style="width: 1%" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody data-bind="template: { name: 'AdminSettingsDomainListItem', foreach: domains }"></tbody>
|
<tbody data-bind="foreach: domains">
|
||||||
|
<tr data-bind="css: {'disabled': disabled }">
|
||||||
|
<td class="e-action">
|
||||||
|
<span class="domain-name" data-bind="text: name"></span>
|
||||||
|
<span class="domain-alias" data-bind="if: alias">(alias)</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="btn btn-small btn-small-small btn-danger button-delete button-delete-transitions" data-bind="css: {'delete-access': deleteAccess()}, click: function(oDomain) { $root.deleteDomain(oDomain); }"
|
||||||
|
data-i18n="TAB_DOMAINS/DELETE_ARE_YOU_SURE"></a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span class="delete-domain fontastic" data-bind="visible: !deleteAccess(), click: function (oDomain) { $root.domainForDeletion(oDomain); }">🗑</span>
|
||||||
|
</td>
|
||||||
|
<td class="disabled-domain fontastic" data-bind="click: function (oDomain) { $root.disableDomain(oDomain); }, text: disabled() ? '☐' : '☑'"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
<tr class="e-item">
|
|
||||||
<td>
|
|
||||||
<span class="package-name" data-bind="text: name"></span>
|
|
||||||
<span class="package-installed pull-right" data-bind="text: installed"></span>
|
|
||||||
<div class="package-desc" data-bind="text: desc"></div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span class="package-version" data-bind="text: version"></span>
|
|
||||||
</td>
|
|
||||||
<!--
|
|
||||||
<td class="package-release" data-bind="text: release"></td>
|
|
||||||
-->
|
|
||||||
<td class="package-actions">
|
|
||||||
<i class="icon-download e-action button-download" data-bind="visible: !loading() && canBeUpdated, click: function () { $root.installPackage($data); }"></i>
|
|
||||||
|
|
||||||
<i class="fontastic e-action button-delete" data-bind="visible: !loading() && canBeDeleted, click: function () { $root.deletePackage($data); }">🗑</i>
|
|
||||||
<i class="icon-spinner" data-bind="visible: loading"></i>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
@ -5,5 +5,23 @@
|
||||||
<!-- <col style="width: 100px" /> -->
|
<!-- <col style="width: 100px" /> -->
|
||||||
<col style="width: 80px" />
|
<col style="width: 80px" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody data-bind="template: { name: 'AdminSettingsPackagesListItem', foreach: f }"></tbody>
|
<tbody data-bind="foreach: f">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span class="package-name" data-bind="text: name"></span>
|
||||||
|
<span class="package-installed pull-right" data-bind="text: installed"></span>
|
||||||
|
<div class="package-desc" data-bind="text: desc"></div>
|
||||||
|
</td>
|
||||||
|
<td class="package-version" data-bind="text: version"></td>
|
||||||
|
<!--
|
||||||
|
<td class="package-release" data-bind="text: release"></td>
|
||||||
|
-->
|
||||||
|
<td class="package-actions">
|
||||||
|
<i class="icon-download e-action button-download" data-bind="visible: !loading() && canBeUpdated, click: function () { $root.installPackage($data); }"></i>
|
||||||
|
|
||||||
|
<i class="fontastic e-action button-delete" data-bind="visible: !loading() && canBeDeleted, click: function () { $root.deletePackage($data); }">🗑</i>
|
||||||
|
<i class="icon-spinner" data-bind="visible: loading"></i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<tr class="e-item" data-bind="css: {'disabled': disabled }">
|
|
||||||
<td class="configure-plugin-action e-action plugin-name" data-bind="text: name"></td>
|
|
||||||
<td class="disabled-plugin e-action fontastic" data-bind="text: disabled() ? '☐' : '☑'"></td>
|
|
||||||
</tr>
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
<div class="b-admin-plugin-property">
|
<div class="b-admin-plugin-property">
|
||||||
<label class="control-label">
|
<label class="control-label" data-bind="text: Label, visible: 5 !== Type"></label>
|
||||||
<span data-bind="text: Label, visible: 5 !== Type"></span>
|
|
||||||
</label>
|
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<!-- ko if: 0 === Type -->
|
<!-- ko if: 0 === Type -->
|
||||||
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
|
|
|
||||||
|
|
@ -1,44 +1,43 @@
|
||||||
<div class="b-admin-plugins g-ui-user-select-none">
|
<div class="b-admin-plugins g-ui-user-select-none">
|
||||||
|
|
||||||
<div class="row">
|
<div class="alert" style="margin-top: 10px;" data-bind="visible: '' !== pluginsError()">
|
||||||
<div class="alert span8" style="margin-top: 10px;" data-bind="visible: '' !== pluginsError()">
|
|
||||||
<button type="button" class="close" data-bind="click: function () { pluginsError('') }">×</button>
|
<button type="button" class="close" data-bind="click: function () { pluginsError('') }">×</button>
|
||||||
<span data-bind="text: pluginsError"></span>
|
<span data-bind="text: pluginsError"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<span data-i18n="TAB_PLUGINS/LEGEND_PLUGINS"></span>
|
<span data-i18n="TAB_PLUGINS/LEGEND_PLUGINS"></span>
|
||||||
<i class="icon-spinner" style="margin: 5px" data-bind="visible: plugins.loading"></i>
|
<i class="icon-spinner" style="margin: 5px" data-bind="visible: plugins.loading"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<div data-bind="component: {
|
<div data-bind="component: {
|
||||||
name: 'Checkbox',
|
name: 'Checkbox',
|
||||||
params: { value: enabledPlugins, label: 'TAB_PLUGINS/LABEL_ENABLE_PLUGINS' }
|
params: { value: enabledPlugins, label: 'TAB_PLUGINS/LABEL_ENABLE_PLUGINS' }
|
||||||
}"></div>
|
}"></div>
|
||||||
</div>
|
|
||||||
<br />
|
<br />
|
||||||
<div class="row">
|
|
||||||
<div class="alert alert-info span8" data-bind="visible: 0 === plugins().length">
|
<div class="alert alert-info" data-bind="visible: 0 === plugins().length">
|
||||||
<span data-i18n="TAB_PLUGINS/ALERT_NO_PLUGINS"></span>
|
<span data-i18n="TAB_PLUGINS/ALERT_NO_PLUGINS"></span>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<strong><a href="#/packages" data-i18n="TAB_PLUGINS/LINK_INSTALL_NEW"></a></strong>
|
<strong><a href="#/packages" data-i18n="TAB_PLUGINS/LINK_INSTALL_NEW"></a></strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="span8" data-bind="visible: 0 < plugins().length">
|
|
||||||
|
<div data-bind="visible: 0 < plugins().length">
|
||||||
<blockquote><p class="muted" data-i18n="TAB_PLUGINS/HINT_CLICK_NAME"></p></blockquote>
|
<blockquote><p class="muted" data-i18n="TAB_PLUGINS/HINT_CLICK_NAME"></p></blockquote>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="span8">
|
|
||||||
<table class="table table-hover b-admin-plugins-list-table" data-bind="i18nUpdate: plugins, visible: 0 < plugins().length, css: {'disabled': !enabledPlugins()}">
|
<table class="table table-hover b-admin-plugins-list-table" data-bind="i18nUpdate: plugins, visible: 0 < plugins().length, css: {'disabled': !enabledPlugins()}">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col />
|
<col />
|
||||||
<col style="width: 30px" />
|
<col style="width: 30px" />
|
||||||
</colgroup>
|
</colgroup>
|
||||||
<tbody data-bind="template: { name: 'AdminSettingsPluginListItem', foreach: plugins }"></tbody>
|
<tbody data-bind="foreach: plugins">
|
||||||
|
<tr data-bind="css: {'disabled': disabled }">
|
||||||
|
<td class="configure-plugin-action e-action plugin-name" data-bind="text: name"></td>
|
||||||
|
<td class="disabled-plugin e-action fontastic" data-bind="text: disabled() ? '☐' : '☑'"></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue