Code refactoring

a lot of small fixes (Closes #173)
Added login field (ownCloud package)
This commit is contained in:
RainLoop Team 2014-05-24 02:14:16 +04:00
parent a059b3d063
commit fed896776f
129 changed files with 1016 additions and 804 deletions

View file

@ -60,7 +60,7 @@ class HtmlUtils
{
$sHtmlAttrs = $aMatch[1];
}
$aMatch = array();
if (preg_match('/<body([^>]+)>/im', $sHtml, $aMatch) && !empty($aMatch[1]))
{
@ -71,7 +71,7 @@ class HtmlUtils
$sHtml = \preg_replace('/<\/body>/im', '', $sHtml);
$sHtml = \preg_replace('/<html([^>]*)>/im', '', $sHtml);
$sHtml = \preg_replace('/<\/html>/im', '', $sHtml);
return $sHtml;
}
@ -83,8 +83,8 @@ class HtmlUtils
public static function ClearTags($sHtml)
{
$aRemoveTags = array(
'head', 'link', 'base', 'meta', 'title', 'style', 'script', 'bgsound',
'object', 'embed', 'applet', 'mocha', 'iframe', 'frame', 'frameset'
'head', 'link', 'base', 'meta', 'title', 'style', 'script', 'bgsound', 'keygen', 'source',
'object', 'embed', 'applet', 'mocha', 'iframe', 'frame', 'frameset', 'video', 'audio'
);
$aToRemove = array(
@ -116,6 +116,7 @@ class HtmlUtils
'/on(DblClick)/si',
'/on(Error)/si',
'/on(Focus)/si',
'/on(FormChange)/si',
'/on(KeyDown)/si',
'/on(KeyPress)/si',
'/on(KeyUp)/si',
@ -418,7 +419,7 @@ class HtmlUtils
foreach ($aNodes as /* @var $oElement \DOMElement */ $oElement)
{
$sTagNameLower = \strtolower($oElement->tagName);
// convert body attributes to styles
if ('body' === $sTagNameLower)
{
@ -429,7 +430,7 @@ class HtmlUtils
'bottommargin' => '',
'rightmargin' => ''
);
if (isset($oElement->attributes))
{
foreach ($oElement->attributes as $sAttributeName => /* @var $oAttributeNode \DOMNode */ $oAttributeNode)
@ -451,7 +452,7 @@ class HtmlUtils
if (\is_array($aItem))
{
$oElement->removeAttribute($aItem[0]);
switch ($sIndex)
{
case 'text':
@ -484,7 +485,7 @@ class HtmlUtils
{
$oElement->setAttribute('src', 'javascript:false');
}
if (\in_array($sTagNameLower, array('a', 'form', 'area')))
{
$oElement->setAttribute('target', '_blank');
@ -500,12 +501,22 @@ class HtmlUtils
// $oElement->removeAttribute('style');
// }
@$oElement->removeAttribute('id');
@$oElement->removeAttribute('class');
@$oElement->removeAttribute('contenteditable');
@$oElement->removeAttribute('designmode');
@$oElement->removeAttribute('data-bind');
@$oElement->removeAttribute('xmlns');
foreach (array(
'id', 'class', 'contenteditable', 'designmode', 'formaction', 'data-bind', 'xmlns'
) as $sAttr)
{
@$oElement->removeAttribute($sAttr);
}
foreach (array(
'load', 'blur', 'error', 'focus', 'formchange', 'change',
'click', 'dblclick', 'keydown', 'keypress', 'keyup',
'mousedown', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover', 'mouseup',
'move', 'resize', 'resizeend', 'resizestart', 'scroll', 'select', 'submit', 'upload'
) as $sAttr)
{
@$oElement->removeAttribute('on'.$sAttr);
}
if ($oElement->hasAttribute('href'))
{
@ -544,7 +555,7 @@ class HtmlUtils
{
$oElement->setAttribute('data-x-src', $sSrc);
}
$bHasExternals = true;
}
else if ('data:image/' === \strtolower(\substr(\trim($sSrc), 0, 11)))
@ -626,7 +637,7 @@ class HtmlUtils
foreach ($aNodes as /* @var $oElement \DOMElement */ $oElement)
{
$sTagNameLower = \strtolower($oElement->tagName);
if ($oElement->hasAttribute('data-x-src-cid'))
{
$sCid = $oElement->getAttribute('data-x-src-cid');
@ -640,7 +651,7 @@ class HtmlUtils
$oElement->setAttribute('src', 'cid:'.$sCid);
}
}
if ($oElement->hasAttribute('data-x-src-location'))
{
$sSrc = $oElement->getAttribute('data-x-src-location');
@ -838,10 +849,10 @@ class HtmlUtils
return $sText;
}
/**
* @param string $sText
*
*
* @return string
*/
public static function ConvertHtmlToPlain($sText)
@ -937,7 +948,7 @@ class HtmlUtils
'\'',
''
), $sText);
$sText = str_ireplace('<div>',"\n<div>", $sText);
$sText = strip_tags($sText, '');
$sText = preg_replace("/\n\\s+\n/", "\n", $sText);

View file

@ -1295,7 +1295,7 @@ class Actions
$aResult['Language'] = $this->ValidateLanguage($sLanguage);
$aResult['UserLanguage'] = $bUserLanguage;
$aResult['LangLink'] = APP_INDEX_FILE.'?/Lang/0/'.($bAdmin ? 'en' : $aResult['Language']).'/'.$sStaticCache.'/';
$aResult['TemplatesLink'] = APP_INDEX_FILE.'?/Templates/0/'.$sStaticCache.'/';
$aResult['TemplatesLink'] = APP_INDEX_FILE.'?/Templates/0/'.($bAdmin ? 'Admin' : 'App').'/'.$sStaticCache.'/';
$aResult['PluginsLink'] = $sPluginsLink;
$aResult['EditorDefaultType'] = 'Html' === $aResult['EditorDefaultType'] ? 'Html' : 'Plain';
@ -6079,7 +6079,10 @@ class Actions
{
$oConfig = $this->Config();
$aResult = array(\RainLoop\Enumerations\Capa::PREM);
$aResult = array(
\RainLoop\Enumerations\Capa::PREM,
\RainLoop\Enumerations\Capa::FILTERS
);
if ($oConfig->Get('webmail', 'allow_additional_accounts', false))
{

View file

@ -1,15 +1,16 @@
<?php
namespace RainLoop\Enumerations;
class Capa
{
const PREM = 'PREM';
const TWO_FACTOR = 'TWO_FACTOR';
const OPEN_PGP = 'OPEN_PGP';
const PREFETCH = 'PREFETCH';
const GRAVATAR = 'GRAVATAR';
const THEMES = 'THEMES';
const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS';
const ADDITIONAL_IDENTITIES = 'ADDITIONAL_IDENTITIES';
}
<?php
namespace RainLoop\Enumerations;
class Capa
{
const PREM = 'PREM';
const TWO_FACTOR = 'TWO_FACTOR';
const OPEN_PGP = 'OPEN_PGP';
const PREFETCH = 'PREFETCH';
const GRAVATAR = 'GRAVATAR';
const THEMES = 'THEMES';
const FILTERS = 'FILTERS';
const ADDITIONAL_ACCOUNTS = 'ADDITIONAL_ACCOUNTS';
const ADDITIONAL_IDENTITIES = 'ADDITIONAL_IDENTITIES';
}

View file

@ -19,6 +19,11 @@ class ServiceActions
*/
protected $aPaths;
/**
* @var string
*/
protected $sQuery;
/**
* @param \MailSo\Base\Http $oHttp
* @param \RainLoop\Actions $oActions
@ -30,6 +35,7 @@ class ServiceActions
$this->oHttp = $oHttp;
$this->oActions = $oActions;
$this->aPaths = array();
$this->sQuery = '';
}
/**
@ -449,16 +455,18 @@ class ServiceActions
$this->oActions->verifyCacheByKey($this->sQuery);
}
$bAdmin = false !== \strpos($this->sQuery, 'Admin');
$sCacheFileName = '';
if ($bCacheEnabled)
{
$sCacheFileName = 'TEMPLATES:'.$this->oActions->Plugins()->Hash().APP_VERSION;
$sCacheFileName = 'TEMPLATES:'.($bAdmin ? 'Admin/' : 'App/').$this->oActions->Plugins()->Hash().APP_VERSION;
$sResult = $this->Cacher()->Get($sCacheFileName);
}
if (0 === \strlen($sResult))
{
$sResult = $this->compileTemplates(false);
$sResult = $this->compileTemplates($bAdmin);
if ($bCacheEnabled && 0 < \strlen($sCacheFileName))
{
$this->Cacher()->Set($sCacheFileName, $sResult);
@ -1021,20 +1029,16 @@ class ServiceActions
/**
* @param bool $bAdmin = false
* @param bool $bWrapByScriptTag = true
*
* @return string
*/
private function compileTemplates($bAdmin = false, $bWrapByScriptTag = false)
private function compileTemplates($bAdmin = false)
{
$sHtml = \RainLoop\Utils::CompileTemplates(APP_VERSION_ROOT_PATH.'app/templates/Views', $this->oActions).
$sHtml = \RainLoop\Utils::CompileTemplates(APP_VERSION_ROOT_PATH.'app/templates/Views/'.($bAdmin ? 'Admin' : 'App'), $this->oActions).
\RainLoop\Utils::CompileTemplates(APP_VERSION_ROOT_PATH.'app/templates/Views/Common', $this->oActions).
$this->oActions->Plugins()->CompileTemplate($bAdmin);
return
($bWrapByScriptTag ? '<script type="text/javascript" data-cfasync="false">' : '').
'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml)).';'.
($bWrapByScriptTag ? '</script>' : '')
;
return 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml)).';';
}
/**

View file

@ -11,7 +11,7 @@
<!--[if lte IE 7]>
<meta http-equiv="refresh" content="0; URL={{BaseAppIndexFile}}?/BadBrowser" />
<![endif]-->
<script type="text/javascript">
<script type="text/javascript" data-cfasync="false">
function __fIncludeScr(sSrc) {
document.write(unescape('%3Csc' + 'ript data-cfasync="false" type="text/jav' + 'ascr' + 'ipt" sr' + 'c="' + sSrc + '"%3E%3C/' + 'scr' + 'ipt%3E'));
}

View file

@ -1,24 +1,24 @@
<div class="b-admin-left g-ui-user-select-none">
<div class="b-toolbar">
<div class="btn-group show-on-panel-disabled">
<a class="btn buttonResize" data-bind="click: function () { leftPanelDisabled(!leftPanelDisabled()); }">
<i data-bind="css: {'icon-resize-out': leftPanelDisabled(), 'icon-resize-in': !leftPanelDisabled()}"></i>
</a>
</div>
</div>
<div class="b-content thm-settings-menu opacity-on-panel-disabled">
<div class="b-admin-menu" data-bind="foreach: menu">
<!-- ko if: disabled -->
<span class="e-item disabled">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</span>
<!-- /ko -->
<!-- ko ifnot: disabled -->
<a class="e-item selectable" href="#" data-bind="css: {'selected': selected }, attr: { 'href': $root.link(route) }">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</a>
<!-- /ko -->
</div>
</div>
<div class="b-content show-on-panel-disabled" data-bind="click: function () { leftPanelDisabled(false); }"></div>
<div class="b-admin-left g-ui-user-select-none">
<div class="b-toolbar">
<div class="btn-group show-on-panel-disabled">
<a class="btn buttonResize" data-bind="click: function () { leftPanelDisabled(!leftPanelDisabled()); }">
<i data-bind="css: {'icon-resize-out': leftPanelDisabled(), 'icon-resize-in': !leftPanelDisabled()}"></i>
</a>
</div>
</div>
<div class="b-content thm-settings-menu opacity-on-panel-disabled">
<div class="b-admin-menu" data-bind="foreach: menu">
<!-- ko if: disabled -->
<span class="e-item disabled">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</span>
<!-- /ko -->
<!-- ko ifnot: disabled -->
<a class="e-item selectable" href="#" data-bind="css: {'selected': selected }, attr: { 'href': $root.link(route) }">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</a>
<!-- /ko -->
</div>
</div>
<div class="b-content show-on-panel-disabled" data-bind="click: function () { leftPanelDisabled(false); }"></div>
</div>

View file

@ -16,28 +16,41 @@
<h1 style="margin-bottom: 0;">RainLoop</h1>
<h4 style="margin-top: 0;"><span data-bind="text: version"></span></h4>
<h4 style="color: #aaa; font-weight: normal;">Simple, modern & fast web-based email client</h4>
<h5 style="color: #aaa; font-weight: normal; margin-top: 40px;">
<h5 style="font-weight: normal; margin-top: 40px;">
<div data-bind="visible: 'error' === statusType()">
<i class="icon-warning" style="color: red"></i>
&nbsp;&nbsp;
<span data-bind="text: errorDesc">Error</span>
<span data-bind="text: errorDesc"></span>
</div>
<div data-bind="visible: 'available' === statusType()">
<i class="icon-warning" style="color: blue"></i>
<i class="icon-bolt" style="color: red"></i>
&nbsp;&nbsp;
New <b data-bind="text: coreRemoteVersion"></b> version is available.
<span data-bind="visible: '' !== coreRemoteRelease()">
(<span data-bind="text: coreRemoteRelease"></span>)
</span>
<br />
<br />
<span data-bind="visible: coreUpdatable() && coreAccess()">
<span class="g-ui-link" data-bind="click: updateCoreData">Update</span>
<a class="btn" data-bind="click: updateCoreData">
<i class="icon-sync"></i>
&nbsp;&nbsp;
Update
</a>
&nbsp;&nbsp;&nbsp;
</span>
<span data-bind="visible: coreAccess()">
<a class="g-ui-link" href="http://rainloop.net/downloads/" target="_blank">Download</a>
<a class="btn" href="http://rainloop.net/downloads/" target="_blank">
<i class="icon-download"></i>
&nbsp;&nbsp;
Download
</a>
&nbsp;&nbsp;&nbsp;
<a class="g-ui-link" href="http://rainloop.net/changelog/" target="_blank">Changelog</a>
<a class="btn" href="http://rainloop.net/changelog/" target="_blank">
<i class="icon-file-text"></i>
&nbsp;&nbsp;
Changelog
</a>
</span>
</div>
<div data-bind="visible: 'up-to-date' === statusType()">

View file

@ -36,7 +36,7 @@
<div data-bind="visible: licensingProcess()">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
checking...
Checking&hellip;
</div>
<div data-bind="visible: !licensingProcess()">
<div class="alert alert-block span8" style="margin-left: 0" data-bind="visible: !licensing()">

View file

@ -1,28 +1,28 @@
<div class="b-admin-plugin-property">
<label class="control-label">
<span data-bind="text: Label, visible: 5 !== Type"></span>
</label>
<div class="controls">
<!-- ko if: 0 === Type || 1 === Type -->
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="value: value" />
<!-- /ko -->
<!-- ko if: 3 === Type -->
<input type="password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="value: value" />
<!-- /ko -->
<!-- ko if: 2 === Type -->
<textarea autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="value: value"></textarea>
<!-- /ko -->
<!-- ko if: 4 === Type -->
<select data-bind="options: Default, value: value"></select>
<!-- /ko -->
<!-- ko if: 5 === Type -->
<label data-bind="click: function () { value(!value()); }">
<i data-bind="css: value() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
<span data-bind="text: Label"></span>
</label>
<!-- /ko -->
<span class="help-block" style="color: #ccc" data-bind="text: Desc, visible: '' !== Desc"></span>
</div>
<br />
<div class="b-admin-plugin-property">
<label class="control-label">
<span data-bind="text: Label, visible: 5 !== Type"></span>
</label>
<div class="controls">
<!-- ko if: 0 === Type || 1 === Type -->
<input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="value: value" />
<!-- /ko -->
<!-- ko if: 3 === Type -->
<input type="password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="value: value" />
<!-- /ko -->
<!-- ko if: 2 === Type -->
<textarea autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" data-bind="value: value"></textarea>
<!-- /ko -->
<!-- ko if: 4 === Type -->
<select data-bind="options: Default, value: value"></select>
<!-- /ko -->
<!-- ko if: 5 === Type -->
<label data-bind="click: function () { value(!value()); }">
<i data-bind="css: value() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
<span data-bind="text: Label"></span>
</label>
<!-- /ko -->
<span class="help-block" style="color: #ccc" data-bind="text: Desc, visible: '' !== Desc"></span>
</div>
<br />
</div>

View file

@ -3,15 +3,6 @@
<div class="legend">
Security
</div>
<div class="control-group">
<div class="controls">
<label data-bind="click: function () { csrfProtection(!csrfProtection()); }">
<i data-bind="css: csrfProtection() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
<abbr title="Cross-site request forgery" class="initialism">CSRF</abbr> protection
</label>
</div>
</div>
<div class="control-group">
<div class="controls">
<label data-bind="click: function () { capaOpenPGP(!capaOpenPGP()); }">
@ -36,6 +27,7 @@
</div>
</div>
</div>
<br />
<div class="form-horizontal">
<div class="legend">
Changer Admin Password

View file

@ -1,7 +1,7 @@
<div class="e-item b-folder-system-item">
<a class="e-link" data-bind="droppable: function (oEvent, oUi) { $root.messagesDrop($data, oUi); }, css: { 'selected': selected, 'selectable': selectable, 'print-count': 0 < printableUnreadCount().length, 'anim-action-class': actionBlink }">
<span class="badge pull-right count" data-bind="text: printableUnreadCount"></span>
&nbsp;
<span class="name" data-bind="text: localName()"></span>
</a>
<div class="e-item b-folder-system-item">
<a class="e-link" data-bind="droppable: function (oEvent, oUi) { $root.messagesDrop($data, oUi); }, css: { 'selected': selected, 'selectable': selectable, 'print-count': 0 < printableUnreadCount().length, 'anim-action-class': actionBlink }">
<span class="badge pull-right count" data-bind="text: printableUnreadCount"></span>
&nbsp;
<span class="name" data-bind="text: localName()"></span>
</a>
</div>

View file

@ -1,56 +1,56 @@
<style>
html, body {
margin: 0;
padding: 0;
background-color: #fff;
font-family: arial, sans-serif;
}
.tbl {width:100%;font-family:normal 11px Tahoma, Arial, Helvetica, "sans-serif"}
.tt {padding:5px;border:solid #ddd;border-width:0px 0px 1px 0px}
.tv {padding:5px;border:solid #ddd;border-width:0px 0px 1px 1px}
.tb {padding:15px}
a {color: blue; text-decoration: underline}
a:visited {color: #609}
a:active {color: red}
blockquote {border-left: 2px solid black; margin: 0; padding: 0px 10px}
pre {margin: 0px; padding: 0px; font-family: arial, sans-serif; background: #fff; border: none; white-space: normal}
</style>
<table cellpadding="0" cellspacing="0" class="tbl">
<tbody>
<tr>
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_FROM"></td>
<td class="tv" data-bind="text: popupFrom"></td>
</tr>
<tr>
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_TO"></td>
<td class="tv" data-bind="text: popupTo"></td>
</tr>
<tr data-bind="visible: '' !== popupCc">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_CC"></td>
<td class="tv" data-bind="text: popupCc"></td>
</tr>
<tr data-bind="visible: '' !== popupBcc">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_BCC"></td>
<td class="tv" data-bind="text: popupBcc"></td>
</tr>
<tr data-bind="visible: '' !== popupDate">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_DATE"></td>
<td class="tv" data-bind="text: popupDate"></td>
</tr>
<tr>
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_SUBJECT"></td>
<td class="tv" data-bind="text: popupSubject"></td>
</tr>
<tr data-bind="visible: '' !== popupAttachments">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_ATTACHMENTS"></td>
<td class="tv" data-bind="text: popupAttachments"></td>
</tr>
<tr>
<td colspan="2" class="tb">
<div data-bind="html: popupBody"></div>
</td>
</tr>
</tbody>
<style>
html, body {
margin: 0;
padding: 0;
background-color: #fff;
font-family: arial, sans-serif;
}
.tbl {width:100%;font-family:normal 11px Tahoma, Arial, Helvetica, "sans-serif"}
.tt {padding:5px;border:solid #ddd;border-width:0px 0px 1px 0px}
.tv {padding:5px;border:solid #ddd;border-width:0px 0px 1px 1px}
.tb {padding:15px}
a {color: blue; text-decoration: underline}
a:visited {color: #609}
a:active {color: red}
blockquote {border-left: 2px solid black; margin: 0; padding: 0px 10px}
pre {margin: 0px; padding: 0px; font-family: arial, sans-serif; background: #fff; border: none; white-space: normal}
</style>
<table cellpadding="0" cellspacing="0" class="tbl">
<tbody>
<tr>
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_FROM"></td>
<td class="tv" data-bind="text: popupFrom"></td>
</tr>
<tr>
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_TO"></td>
<td class="tv" data-bind="text: popupTo"></td>
</tr>
<tr data-bind="visible: '' !== popupCc">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_CC"></td>
<td class="tv" data-bind="text: popupCc"></td>
</tr>
<tr data-bind="visible: '' !== popupBcc">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_BCC"></td>
<td class="tv" data-bind="text: popupBcc"></td>
</tr>
<tr data-bind="visible: '' !== popupDate">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_DATE"></td>
<td class="tv" data-bind="text: popupDate"></td>
</tr>
<tr>
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_SUBJECT"></td>
<td class="tv" data-bind="text: popupSubject"></td>
</tr>
<tr data-bind="visible: '' !== popupAttachments">
<td class="tt i18n" data-i18n-text="MESSAGE/PRINT_LABEL_ATTACHMENTS"></td>
<td class="tv" data-bind="text: popupAttachments"></td>
</tr>
<tr>
<td colspan="2" class="tb">
<div data-bind="html: popupBody"></div>
</td>
</tr>
</tbody>
</table>

View file

@ -1,3 +1,3 @@
<div class="settingsCustom">
CUSTOM
<div class="settingsCustom">
CUSTOM
</div>

View file

@ -0,0 +1,38 @@
<div class="b-settings-filters g-ui-user-select-none">
<div class="form-horizontal">
<div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/LEGEND_FILTERS"></span>
</div>
</div>
<div class="row">
<div data-bind="foreach: filters">
<div class="filter" style="background-color: #ddd">
FILTER
<div data-bind="foreach: conditions">
COND
<br />
<span class="delete-condition" data-bind="click: function (oCondition) { $parent.deleteCondition(oCondition); }">
<i class="icon-trash"></i>
</span>
<br />
</div>
<br />
<a class="btn" data-bind="click: addCondition">
<i class="icon-plus"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/BUTTON_ADD_CONDITION"></span>
</a>
<br />
<span class="delete-filter" data-bind="click: function (oFilter) { $parent.deleteFilter(oFilter); }">
<i class="icon-trash"></i>
</span>
</div>
<br />
</div>
</div>
<a class="btn" data-bind="click: addFilter">
<i class="icon-filter"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_FILTERS/BUTTON_ADD_FILTER"></span>
</a>
</div>

View file

@ -1,24 +1,24 @@
<div class="b-settins-left g-ui-user-select-none">
<div class="b-toolbar">
<div class="btn-group">
<a class="btn buttonResize" data-bind="click: function () { leftPanelDisabled(!leftPanelDisabled()); }">
<i data-bind="css: {'icon-resize-out': leftPanelDisabled(), 'icon-resize-in': !leftPanelDisabled()}"></i>
</a>
</div>
</div>
<div class="b-content thm-settings-menu opacity-on-panel-disabled">
<div class="b-settings-menu" data-bind="foreach: menu">
<!-- ko if: disabled -->
<span class="e-item disabled">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</span>
<!-- /ko -->
<!-- ko ifnot: disabled -->
<a class="e-item selectable" href="#" data-bind="css: {'selected': selected }, attr: { 'href': $root.link(route) }">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</a>
<!-- /ko -->
</div>
</div>
<div class="b-content show-on-panel-disabled" data-bind="click: function () { leftPanelDisabled(false); }"></div>
<div class="b-settins-left g-ui-user-select-none">
<div class="b-toolbar">
<div class="btn-group">
<a class="btn buttonResize" data-bind="click: function () { leftPanelDisabled(!leftPanelDisabled()); }">
<i data-bind="css: {'icon-resize-out': leftPanelDisabled(), 'icon-resize-in': !leftPanelDisabled()}"></i>
</a>
</div>
</div>
<div class="b-content thm-settings-menu opacity-on-panel-disabled">
<div class="b-settings-menu" data-bind="foreach: menu">
<!-- ko if: disabled -->
<span class="e-item disabled">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</span>
<!-- /ko -->
<!-- ko ifnot: disabled -->
<a class="e-item selectable" href="#" data-bind="css: {'selected': selected }, attr: { 'href': $root.link(route) }">
<span class="i18n e-link" data-bind="attr: { 'data-i18n-text': label }"></span>
</a>
<!-- /ko -->
</div>
</div>
<div class="b-content show-on-panel-disabled" data-bind="click: function () { leftPanelDisabled(false); }"></div>
</div>

View file

@ -1,14 +1,6 @@
<div class="b-system-drop-down g-ui-user-select-none">
<div class="b-toolbar">
<div class="btn-toolbar">
<!-- <div class="btn-group pull-right">
<a class="btn btn-narrow" data-bind="click: logoutClick">
<i class="icon-power"></i>
</a>
</div>
<div class="btn-group pull-right">
&nbsp;&nbsp;&nbsp;
</div>-->
<div class="btn-group pull-right dropdown colored-toggle" data-bind="registrateBootstrapDropdown: true, openDropdownTrigger: accountMenuDropdownTrigger">
<a id="top-system-dropdown-id" href="#" tabindex="-1" class="btn btn-ellipsis btn-block dropdown-toggle system-dropdown"
data-toggle="dropdown" data-tooltip-placement="left"