New Ask popup

Fix inputosaurus fake span width detection
Add Esc trigger to all popups (#29)
Many minor fixes
This commit is contained in:
RainLoop Team 2013-12-14 03:27:12 +04:00
parent 214d905f90
commit dcc486a114
57 changed files with 1200 additions and 307 deletions

View file

@ -171,6 +171,7 @@ module.exports = function (grunt) {
"dev/ViewModels/PopupsPluginViewModel.js",
"dev/ViewModels/PopupsActivateViewModel.js",
"dev/ViewModels/PopupsLanguagesViewModel.js",
"dev/ViewModels/PopupsAskViewModel.js",
"dev/ViewModels/AdminLoginViewModel.js",
@ -260,6 +261,7 @@ module.exports = function (grunt) {
"dev/ViewModels/PopupsAddAccountViewModel.js",
"dev/ViewModels/PopupsIdentityViewModel.js",
"dev/ViewModels/PopupsLanguagesViewModel.js",
"dev/ViewModels/PopupsAskViewModel.js",
"dev/ViewModels/LoginViewModel.js",

View file

@ -35,8 +35,27 @@ AdminPlugins.prototype.configurePlugin = function (oPlugin)
RL.remote().plugin(this.onPluginLoadRequest, oPlugin.name);
};
AdminPlugins.prototype.onBuild = function ()
AdminPlugins.prototype.onBuild = function (oDom)
{
var self = this;
oDom
.on('click', '.e-item .configure-plugin-action', function () {
var oPlugin = ko.dataFor(this);
if (oPlugin)
{
self.configurePlugin(oPlugin);
}
})
.on('click', '.e-item .disable-plugin', function () {
var oPlugin = ko.dataFor(this);
if (oPlugin)
{
self.disablePlugin(oPlugin);
}
})
;
this.enabledPlugins.subscribe(function (bValue) {
RL.remote().saveAdminConfig(Utils.emptyFunction, {
'EnabledPlugins': bValue ? '1' : '0'

View file

@ -240,7 +240,6 @@ AbstractApp.prototype.pub = function (sName, aArgs)
{
if (!Utils.isUnd(this.oSubs[sName]))
{
window.console.log(sName);
_.each(this.oSubs[sName], function (aItem) {
if (aItem[0])
{

View file

@ -110,6 +110,7 @@ Enums.ClientSideKeyName = {
*/
Enums.EventKeyCode = {
'Backspace': 8,
'Tab': 9,
'Enter': 13,
'Esc': 27,
'PageUp': 33,

View file

@ -40,6 +40,7 @@
@import "Scroll.less";
@import "SystemDropDown.less";
@import "Login.less";
@import "Ask.less";
@import "FolderList.less";
@import "FolderClear.less";
@import "FolderCreate.less";

20
dev/Styles/Ask.less Normal file
View file

@ -0,0 +1,20 @@
.popups {
.b-ask-content {
&.modal {
z-index: 10000;
}
.modal-header {
background-color: #fff;
}
.modal-body {
text-align: center;
}
.desc-place {
font-size: 18px;
}
}
}

View file

@ -1,2 +1,5 @@
input[type="text"], input[type="password"], input[type="email"], input[type="search"] {
height: 20px;
line-height: 21px;
}

View file

@ -45,12 +45,6 @@
}
}
.inputosaurus-fake-span {
position: absolute;
top: 0;
left: -5000px;
}
.inputosaurus-input {
margin: 1px 10px 1px 0px;
@ -66,4 +60,10 @@
.ui-autocomplete {
z-index: 2000;
}
}
.inputosaurus-fake-span {
position: absolute;
top: 0;
left: -5000px;
}

View file

@ -108,8 +108,18 @@ PopupsAddAccountViewModel.prototype.onShow = function ()
this.emailFocus(true);
};
PopupsAddAccountViewModel.prototype.onBuild = function ()
{
this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin'));
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};

View file

@ -105,3 +105,17 @@ PopupsAdvancedSearchViewModel.prototype.onShow = function ()
this.fromFocus(true);
};
PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};

View file

@ -0,0 +1,116 @@
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
/**
* @constructor
* @extends KnoinAbstractViewModel
*/
function PopupsAskViewModel()
{
KnoinAbstractViewModel.call(this, 'Popups', 'PopupsAsk');
this.askDesc = ko.observable('');
this.yesButton = ko.observable('');
this.noButton = ko.observable('');
this.yesFocus = ko.observable(false);
this.noFocus = ko.observable(false);
this.fYesAction = null;
this.fNoAction = null;
Knoin.constructorEnd(this);
}
Utils.extendAsViewModel('PopupsAskViewModel', PopupsAskViewModel);
PopupsAskViewModel.prototype.clearPopup = function ()
{
this.askDesc('');
this.yesButton(Utils.i18n('POPUPS_ASK/BUTTON_YES'));
this.noButton(Utils.i18n('POPUPS_ASK/BUTTON_NO'));
this.yesFocus(false);
this.noFocus(false);
this.fYesAction = null;
this.fNoAction = null;
};
PopupsAskViewModel.prototype.yesClick = function ()
{
if (Utils.isFunc(this.fYesAction))
{
this.fYesAction.call(null);
}
this.cancelCommand();
};
PopupsAskViewModel.prototype.noClick = function ()
{
if (Utils.isFunc(this.fNoAction))
{
this.fNoAction.call(null);
}
this.cancelCommand();
};
/**
* @param {string} sAskDesc
* @param {Function=} fYesFunc
* @param {Function=} fNoFunc
* @param {string=} sYesButton
* @param {string=} sNoButton
*/
PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYesButton, sNoButton)
{
this.clearPopup();
this.fYesAction = fYesFunc || null;
this.fNoAction = fNoFunc || null;
this.askDesc(sAskDesc || '');
if (sYesButton)
{
this.yesButton(sYesButton);
}
if (sYesButton)
{
this.yesButton(sNoButton);
}
this.yesFocus(true);
};
PopupsAskViewModel.prototype.onHide = function ()
{
};
PopupsAskViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && self.modalVisibility())
{
if (Enums.EventKeyCode.Tab === oEvent.keyCode || Enums.EventKeyCode.Right === oEvent.keyCode || Enums.EventKeyCode.Left === oEvent.keyCode)
{
if (self.yesFocus())
{
self.noFocus(true);
}
else
{
self.yesFocus(true);
}
bResult = false;
}
}
return bResult;
});
};

View file

@ -801,6 +801,17 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.triggerForResize();
};
PopupsComposeViewModel.prototype.tryToClosePopup = function ()
{
var self = this;
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'closeCommand');
}
}]);
};
PopupsComposeViewModel.prototype.onBuild = function ()
{
this.initEditor();
@ -826,6 +837,11 @@ PopupsComposeViewModel.prototype.onBuild = function ()
self.sendCommand();
bResult = false;
}
else if (Enums.EventKeyCode.Esc === oEvent.keyCode)
{
self.tryToClosePopup();
bResult = false;
}
}
return bResult;

View file

@ -457,6 +457,17 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
}
})
;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'closeCommand');
bResult = false;
}
return bResult;
});
};
PopupsContactsViewModel.prototype.onShow = function ()

View file

@ -186,6 +186,20 @@ PopupsDomainViewModel.prototype.onShow = function (oDomain)
}
};
PopupsDomainViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
PopupsDomainViewModel.prototype.clearForm = function ()
{
this.edit(false);

View file

@ -95,3 +95,17 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder);
}
};
PopupsFolderClearViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};

View file

@ -105,3 +105,17 @@ PopupsFolderCreateViewModel.prototype.onShow = function ()
this.clearPopup();
this.focusTrigger(true);
};
PopupsFolderCreateViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};

View file

@ -103,3 +103,17 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification);
};
PopupsFolderSystemViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};

View file

@ -120,7 +120,6 @@ PopupsIdentityViewModel.prototype.clearPopup = function ()
};
/**
*
* @param {?IdentityModel} oIdentity
*/
PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
@ -145,3 +144,17 @@ PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
this.email.focused(true);
}
};
PopupsIdentityViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};

View file

@ -54,6 +54,20 @@ PopupsLanguagesViewModel.prototype.onHide = function ()
this.exp(false);
};
PopupsLanguagesViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
{
RL.data().mainLanguage(sLang);

View file

@ -111,3 +111,28 @@ PopupsPluginViewModel.prototype.onShow = function (oPlugin)
}
}
};
PopupsPluginViewModel.prototype.tryToClosePopup = function ()
{
var self = this;
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
}
}]);
};
PopupsPluginViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
self.tryToClosePopup();
bResult = false;
}
return bResult;
});
};

View file

@ -1,8 +1,8 @@
{
"name": "RainLoop",
"title": "RainLoop Webmail",
"version": "1.5.0",
"release": "532",
"version": "1.5.1",
"release": "546",
"description": "Simple, modern & fast web-based email client",
"homepage": "http://rainloop.net",
"main": "Gruntfile.js",

View file

@ -33,7 +33,7 @@
</div>
<div data-bind="visible: 'sqlite' !== contactsType()">
<div class="legend">
PDO (MySQL / PostgreSQL / ...)
PDO (MySQL / PostgreSQL)
</div>
<div class="control-group">
<label class="control-label">
@ -42,10 +42,8 @@
<div class="controls">
<input type="text" class="span6" data-bind="value: pdoDsn, saveTrigger: pdoDsnTrigger" />
<div data-bind="saveTrigger: pdoDsnTrigger"></div>
<blockquote style="margin-top: 10px">
<blockquote style="margin: 10px 0 0 0">
<p class="muted">
<strong>Examples:</strong>
<br />
mysql:host=127.0.0.1;port=3306;dbname=rainloop
<br />
pgsql:host=127.0.0.1;port=5432;dbname=rainloop

View file

@ -1,4 +1,4 @@
<div class="b-admin-domains" >
<div class="b-admin-domains g-ui-user-select-none">
<div class="legend">
Domains
</div>
@ -18,7 +18,7 @@
&nbsp;&nbsp;
loading...
</div>
<table class="table table-hover b-admin-domains-list-table g-ui-user-select-none" data-bind="i18nUpdate: domains">
<table class="table table-hover b-admin-domains-list-table" data-bind="i18nUpdate: domains">
<colgroup>
<col />
<col style="width: 140px" />

View file

@ -1,15 +1,10 @@
<tr class="e-item" data-bind="css: {'disabled': disabled }">
<td>
<td class="configure-plugin-action e-action">
<i class="plugin-img icon-lightning"></i>
<span class="plugin-name" data-bind="text: name"></span>
</td>
<td>
<span class="configure-plugin" data-bind="click: function (oPlugin) { $root.configurePlugin(oPlugin); }">
<i class="icon-settings5 e-action"></i>
</span>
</td>
<td>
<span class="disable-plugin" data-bind="click: function (oPlugin) { $root.disablePlugin(oPlugin); }">
<span class="disable-plugin">
<i data-bind="css: {'e-action icon-checkbox-checked': !disabled(), 'e-action icon-checkbox-unchecked': disabled}"></i>
</span>
</td>

View file

@ -1,4 +1,4 @@
<div class="b-admin-plugins">
<div class="b-admin-plugins g-ui-user-select-none">
<div class="row">
<div class="alert span8" data-bind="visible: '' !== pluginsError()">
@ -39,7 +39,6 @@
<colgroup>
<col />
<col style="width: 30px" />
<col style="width: 30px" />
</colgroup>
<tbody data-bind="template: { name: 'AdminSettingsPluginListItem', foreach: plugins }"></tbody>
</table>

View file

@ -1,5 +1,5 @@
<div class="popups">
<div class="modal hide b-account-add-content" data-bind="modal: modalVisibility">
<div class="modal hide b-account-add-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div>
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>

View file

@ -1,86 +1,86 @@
<div class="popups">
<div class="modal hide b-advanced-search-content" data-bind="modal: modalVisibility">
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3>
<span class="i18n" data-i18n-text="SEARCH/TITLE_ADV"></span>
</h3>
</div>
<div class="modal-body">
<form class="form-horizontal" action="#/" autocomplete="off" onsubmit="return false;" data-bind="command: searchCommand">
<div class="row">
<div class="span4">
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_FROM"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: from, onEnter: searchCommand, hasfocus: fromFocus, onEsc: cancelCommand" />
</div>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_TO"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: to, onEnter: searchCommand, onEsc: cancelCommand" />
</div>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_SUBJECT"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: subject, onEnter: searchCommand, onEsc: cancelCommand" />
</div>
</div>
</div>
<div class="span4">
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_TEXT"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: text, onEnter: searchCommand, onEsc: cancelCommand" />
</div>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE"></span>
</label>
<div class="controls">
<select data-bind="value: selectedDateValue">
<option value="-1" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_ALL"></option>
<option value="3" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_3_DAYS"></option>
<option value="7" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_7_DAYS"></option>
<option value="30" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_MONTH"></option>
<option value="90" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_3_MONTHS"></option>
<option value="180" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_6_MONTHS"></option>
<option value="365" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_YEAR"></option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">
</label>
<div class="controls">
<label data-bind="click: function () { hasAttachments(!hasAttachments()); }">
<i data-bind="css: hasAttachments() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_HAS_ATTACHMENTS"></span>
</label>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="submit" class="btn buttonAdvSearch" data-bind="command: searchCommand">
<i class="icon-search"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SEARCH/BUTTON_ADV_SEARCH"></span>
</a>
</div>
</div>
<div class="popups">
<div class="modal hide b-advanced-search-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3>
<span class="i18n" data-i18n-text="SEARCH/TITLE_ADV"></span>
</h3>
</div>
<div class="modal-body">
<form class="form-horizontal" action="#/" autocomplete="off" onsubmit="return false;" data-bind="command: searchCommand">
<div class="row">
<div class="span4">
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_FROM"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: from, onEnter: searchCommand, hasfocus: fromFocus, onEsc: cancelCommand" />
</div>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_TO"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: to, onEnter: searchCommand, onEsc: cancelCommand" />
</div>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_SUBJECT"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: subject, onEnter: searchCommand, onEsc: cancelCommand" />
</div>
</div>
</div>
<div class="span4">
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_TEXT"></span>
</label>
<div class="controls">
<input class="uiInput inputFrom" type="text" data-bind="value: text, onEnter: searchCommand, onEsc: cancelCommand" />
</div>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE"></span>
</label>
<div class="controls">
<select data-bind="value: selectedDateValue">
<option value="-1" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_ALL"></option>
<option value="3" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_3_DAYS"></option>
<option value="7" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_7_DAYS"></option>
<option value="30" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_MONTH"></option>
<option value="90" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_3_MONTHS"></option>
<option value="180" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_6_MONTHS"></option>
<option value="365" class="i18n" data-i18n-text="SEARCH/LABEL_ADV_DATE_YEAR"></option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label">
</label>
<div class="controls">
<label data-bind="click: function () { hasAttachments(!hasAttachments()); }">
<i data-bind="css: hasAttachments() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SEARCH/LABEL_ADV_HAS_ATTACHMENTS"></span>
</label>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="submit" class="btn buttonAdvSearch" data-bind="command: searchCommand">
<i class="icon-search"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SEARCH/BUTTON_ADV_SEARCH"></span>
</a>
</div>
</div>
</div>

View file

@ -0,0 +1,26 @@
<div class="popups">
<div class="modal hide b-ask-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div>
<div class="modal-body">
<br />
<br />
<span class="desc-place" data-bind="html: askDesc"></span>
<br />
<br />
<br />
</div>
<div class="modal-footer">
<button class="btn buttonYes" data-bind="click: yesClick, hasFocus: yesFocus">
<i class="icon-ok"></i>
&nbsp;&nbsp;
<span data-bind="text: yesButton"></span>
</button>
<button class="btn buttonNo" data-bind="click: noClick, hasFocus: noFocus">
<i class=" icon-remove"></i>
&nbsp;&nbsp;
<span data-bind="text: noButton"></span>
</button>
</div>
</div>
</div>
</div>

View file

@ -19,6 +19,30 @@
<div class="b-list-toopbar">
<input class="i18n span3 e-search" type="text" placeholder="Search" data-18n-placeholder="CONTACS/SEARCH_INPUT_PLACEHOLDER" data-bind="value: search" />
</div>
<!--
<div class="btn-toolbar b-list-toopbar g-ui-user-select-none">
<div class="btn-group">
<input class="i18n span3 e-search" type="text" placeholder="Search" data-18n-placeholder="CONTACS/SEARCH_INPUT_PLACEHOLDER" data-bind="value: search" />
</div>
<div class="btn-group pull-right">
<a class="btn dropdown-toggle button-filter" data-toggle="dropdown">
<i class="icon-lightning"></i>
</a>
<ul class="dropdown-menu g-ui-menu">
<li class="e-item">
<a class="e-link">
Personal address book
</a>
</li>
<li class="e-item">
<a class="e-link">
Collected
</a>
</li>
</ul>
</div>
</div>
-->
<div class="b-list-content g-ui-user-select-none" data-bind="nano: true, css: {'hideContactListCheckbox': !useCheckboxesInList()}">
<div class="content g-scrollbox">
<div class="content-wrapper">

View file

@ -1,122 +1,122 @@
<div class="popups">
<div class="modal hide b-domain-content" data-bind="modal: modalVisibility, css: {'domain-edit': edit, 'domain-white-list-page': whiteListPage}">
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3 data-bind="text: headerText"></h3>
</div>
<div class="modal-body">
<form class="form-horizontal domain-form" action="#/" onsubmit="return false;">
<div class="row" data-bind="visible: !edit()">
<div class="span8">
Name
<br />
<input type="text" data-bind="value: name, valueUpdate: 'afterkeydown'" />
<span class="error-desc" data-bind="text: savingError"></span>
</div>
</div>
<br />
<div class="row">
<div class="span4" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingImapError }">
<div class="legend imap-header">
IMAP
</div>
Server
<br />
<input type="text" data-bind="value: imapServer, valueUpdate: 'afterkeydown', hasfocus: imapServerFocus" />
<br />
<br />
Port
<br />
<input type="text" data-bind="value: imapPort, valueUpdate: 'afterkeydown'" />
<br />
<br />
Secure
<br />
<select class="span2" data-bind="value: imapSecure">
<option value="0">None</option>
<option value="1">SSL</option>
<option value="2">TLS</option>
</select>
<br />
<br />
<label data-bind="click: function () { imapShortLogin(!imapShortLogin()); }">
<i data-bind="css: imapShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Use short login form
</label>
</div>
<div class="span4" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSmtpError }">
<div class="legend smtp-header">
SMTP
</div>
Server
<br />
<input type="text" data-bind="value: smtpServer, valueUpdate: 'afterkeydown', hasfocus: smtpServerFocus" />
<br />
<br />
Port
<br />
<input type="text" data-bind="value: smtpPort, valueUpdate: 'afterkeydown'" />
<br />
<br />
Secure
<br />
<select class="span2" data-bind="value: smtpSecure">
<option value="0">None</option>
<option value="1">SSL</option>
<option value="2">TLS</option>
</select>
<br />
<br />
<label data-bind="click: function () { smtpShortLogin(!smtpShortLogin()); }">
<i data-bind="css: smtpShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Use short login form
</label>
<label data-bind="click: function () { smtpAuth(!smtpAuth()); }">
<i data-bind="css: smtpAuth() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Use authentication
</label>
</div>
<div class="span8">
<div class="legend white-list-header">
White List
</div>
<div class="alert alert-block span6 alert-null-left-margin" style="width: 562px;">
List of users webmail is allowed to access.
Use a space as delimiter.
</div>
<textarea class="input-xxlarge" style="width: 600px" rows="8" data-bind="value: whiteList"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn button-test-connection pull-left" data-bind="command: testConnectionCommand, css: {
'btn-success': testingDone() && !testingImapError() && !testingSmtpError(),
'btn-danger': testingDone() && (testingImapError() || testingSmtpError()) }">
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner-2 animated': testing(), 'icon-white': testingDone()}"></i>
&nbsp;&nbsp;
Test Connection
</a>
<a class="btn button-white-list pull-left" data-bind="command: whiteListCommand">
<i data-bind="css: {'icon-arrow-right-2': !whiteListPage(), 'icon-arrow-left': whiteListPage()}"></i>
&nbsp;&nbsp;
<span data-bind="visible: !whiteListPage()">White List</span>
<span data-bind="visible: whiteListPage()">Back</span>
</a>
<a class="btn buttonClose" data-bind="command: cancelCommand">
<i class="icon-remove"></i>
&nbsp;&nbsp;
Close
</a>
<a class="btn buttonClear" data-bind="command: createOrAddCommand">
<i data-bind="css: edit() ? 'icon-ok' : 'icon-plus', visible: !saving()"></i>
<i class="icon-spinner-2 animated" data-bind="visible: saving"></i>
&nbsp;&nbsp;
<span data-bind="text: edit() ? 'Update' : 'Add'"></span>
</a>
</div>
</div>
<div class="popups">
<div class="modal hide b-domain-content g-ui-user-select-none" data-bind="modal: modalVisibility, css: {'domain-edit': edit, 'domain-white-list-page': whiteListPage}">
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3 data-bind="text: headerText"></h3>
</div>
<div class="modal-body">
<form class="form-horizontal domain-form" action="#/" onsubmit="return false;">
<div class="row" data-bind="visible: !edit()">
<div class="span8">
Name
<br />
<input type="text" data-bind="value: name, valueUpdate: 'afterkeydown'" />
<span class="error-desc" data-bind="text: savingError"></span>
</div>
</div>
<br />
<div class="row">
<div class="span4" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingImapError }">
<div class="legend imap-header">
IMAP
</div>
Server
<br />
<input type="text" data-bind="value: imapServer, valueUpdate: 'afterkeydown', hasfocus: imapServerFocus" />
<br />
<br />
Port
<br />
<input type="text" data-bind="value: imapPort, valueUpdate: 'afterkeydown'" />
<br />
<br />
Secure
<br />
<select class="span2" data-bind="value: imapSecure">
<option value="0">None</option>
<option value="1">SSL</option>
<option value="2">TLS</option>
</select>
<br />
<br />
<label data-bind="click: function () { imapShortLogin(!imapShortLogin()); }">
<i data-bind="css: imapShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Use short login form
</label>
</div>
<div class="span4" data-bind="css: { 'testing-done': testingDone, 'testing-error': testingSmtpError }">
<div class="legend smtp-header">
SMTP
</div>
Server
<br />
<input type="text" data-bind="value: smtpServer, valueUpdate: 'afterkeydown', hasfocus: smtpServerFocus" />
<br />
<br />
Port
<br />
<input type="text" data-bind="value: smtpPort, valueUpdate: 'afterkeydown'" />
<br />
<br />
Secure
<br />
<select class="span2" data-bind="value: smtpSecure">
<option value="0">None</option>
<option value="1">SSL</option>
<option value="2">TLS</option>
</select>
<br />
<br />
<label data-bind="click: function () { smtpShortLogin(!smtpShortLogin()); }">
<i data-bind="css: smtpShortLogin() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Use short login form
</label>
<label data-bind="click: function () { smtpAuth(!smtpAuth()); }">
<i data-bind="css: smtpAuth() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
&nbsp;&nbsp;
Use authentication
</label>
</div>
<div class="span8">
<div class="legend white-list-header">
White List
</div>
<div class="alert alert-block span6 alert-null-left-margin" style="width: 562px;">
List of users webmail is allowed to access.
Use a space as delimiter.
</div>
<textarea class="input-xxlarge" style="width: 600px" rows="8" data-bind="value: whiteList"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn button-test-connection pull-left" data-bind="command: testConnectionCommand, css: {
'btn-success': testingDone() && !testingImapError() && !testingSmtpError(),
'btn-danger': testingDone() && (testingImapError() || testingSmtpError()) }">
<i data-bind="css: {'icon-info': !testing(), 'icon-spinner-2 animated': testing(), 'icon-white': testingDone()}"></i>
&nbsp;&nbsp;
Test Connection
</a>
<a class="btn button-white-list pull-left" data-bind="command: whiteListCommand">
<i data-bind="css: {'icon-arrow-right-2': !whiteListPage(), 'icon-arrow-left': whiteListPage()}"></i>
&nbsp;&nbsp;
<span data-bind="visible: !whiteListPage()">White List</span>
<span data-bind="visible: whiteListPage()">Back</span>
</a>
<a class="btn buttonClose" data-bind="command: cancelCommand">
<i class="icon-remove"></i>
&nbsp;&nbsp;
Close
</a>
<a class="btn buttonClear" data-bind="command: createOrAddCommand">
<i data-bind="css: edit() ? 'icon-ok' : 'icon-plus', visible: !saving()"></i>
<i class="icon-spinner-2 animated" data-bind="visible: saving"></i>
&nbsp;&nbsp;
<span data-bind="text: edit() ? 'Update' : 'Add'"></span>
</a>
</div>
</div>
</div>

View file

@ -1,34 +1,34 @@
<div class="popups">
<div class="modal hide b-folder-clear-content" data-bind="modal: modalVisibility">
<div>
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3>
<span class="i18n" data-i18n-text="POPUPS_CLEAR_FOLDER/TITLE_CLEAR_FOLDER" data-bind="visible: !clearingProcess()"></span>
<span class="i18n" data-i18n-text="POPUPS_CLEAR_FOLDER/TITLE_CLEARING_PROCESS" data-bind="visible: clearingProcess"></span>
</h3>
</div>
<div class="modal-body">
<div>
<i class="icon-warning" style="color:red" />
&nbsp;&nbsp;
<strong>
<span class="i18n" data-i18n-html="POPUPS_CLEAR_FOLDER/DANGER_DESC_WARNING"></span>
</strong>
<br />
<br />
<span data-bind="html: dangerDescHtml"></span>
<br />
<span class="i18n" data-i18n-html="POPUPS_CLEAR_FOLDER/DANGER_DESC_HTML_2"></span>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-danger buttonClear" data-bind="command: clearCommand">
<i class="icon-fire" data-bind="css: {'icon-fire': !clearingProcess(), 'icon-spinner-2 animated': clearingProcess()}" ></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="POPUPS_CLEAR_FOLDER/BUTTON_CLEAR"></span>
</a>
</div>
</div>
</div>
</div>
<div class="popups">
<div class="modal hide b-folder-clear-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div>
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3>
<span class="i18n" data-i18n-text="POPUPS_CLEAR_FOLDER/TITLE_CLEAR_FOLDER" data-bind="visible: !clearingProcess()"></span>
<span class="i18n" data-i18n-text="POPUPS_CLEAR_FOLDER/TITLE_CLEARING_PROCESS" data-bind="visible: clearingProcess"></span>
</h3>
</div>
<div class="modal-body">
<div>
<i class="icon-warning" style="color:red" />
&nbsp;&nbsp;
<strong>
<span class="i18n" data-i18n-html="POPUPS_CLEAR_FOLDER/DANGER_DESC_WARNING"></span>
</strong>
<br />
<br />
<span data-bind="html: dangerDescHtml"></span>
<br />
<span class="i18n" data-i18n-html="POPUPS_CLEAR_FOLDER/DANGER_DESC_HTML_2"></span>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-danger buttonClear" data-bind="command: clearCommand">
<i class="icon-fire" data-bind="css: {'icon-fire': !clearingProcess(), 'icon-spinner-2 animated': clearingProcess()}" ></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="POPUPS_CLEAR_FOLDER/BUTTON_CLEAR"></span>
</a>
</div>
</div>
</div>
</div>

View file

@ -1,5 +1,5 @@
<div class="popups">
<div class="modal hide b-folder-create-content" data-bind="modal: modalVisibility">
<div class="modal hide b-folder-create-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div>
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>

View file

@ -1,5 +1,5 @@
<div class="popups">
<div class="modal hide b-folder-system-content" data-bind="modal: modalVisibility">
<div class="modal hide b-folder-system-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>
<h3>

View file

@ -1,5 +1,5 @@
<div class="popups">
<div class="modal hide b-identity-content" data-bind="modal: modalVisibility">
<div class="modal hide b-identity-content g-ui-user-select-none" data-bind="modal: modalVisibility">
<div>
<div class="modal-header">
<button type="button" class="close" data-bind="command: cancelCommand">&times;</button>

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Versandt"
FORWARD_MESSAGE_TOP_SUBJECT = "Thema"
EMPTY_TO_ERROR_DESC = "Geben Sie bitte mindestens einen Empfänger an"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Sent"
FORWARD_MESSAGE_TOP_SUBJECT = "Subject"
EMPTY_TO_ERROR_DESC = "Please specify at least one recipient"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Enviado"
FORWARD_MESSAGE_TOP_SUBJECT = "Asunto"
EMPTY_TO_ERROR_DESC = "Por favor especifique al menos un destinatario"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Envoyé"
FORWARD_MESSAGE_TOP_SUBJECT = "Sujet"
EMPTY_TO_ERROR_DESC = "S'il vous plaît spécifier au moins un destinataire"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choisir la langue"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Sent"
FORWARD_MESSAGE_TOP_SUBJECT = "Viðfangsefni"
EMPTY_TO_ERROR_DESC = "Vinsamlegast taktu fram að minnsta kosti einn viðtakanda"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "보냄"
FORWARD_MESSAGE_TOP_SUBJECT = "제목"
EMPTY_TO_ERROR_DESC = "수신인을 한 명 이상 선택하세요"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "사용할 언어를 선택하세요"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Nosūtīts"
FORWARD_MESSAGE_TOP_SUBJECT = "Tēma"
EMPTY_TO_ERROR_DESC = "Pievienojat vismaz vienu saņēmēju"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Verzonden"
FORWARD_MESSAGE_TOP_SUBJECT = "Onderwerp"
EMPTY_TO_ERROR_DESC = "Gelieve minstens 1 ontvanger aan te duiden"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Kies uw taal"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Wysłany"
FORWARD_MESSAGE_TOP_SUBJECT = "Temat"
EMPTY_TO_ERROR_DESC = "Wprowadź co najmniej jednego odbiorcę"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Enviar"
FORWARD_MESSAGE_TOP_SUBJECT = "Assunto"
EMPTY_TO_ERROR_DESC = "Por favor, especifique pelo menos um destinatário"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Enviar"
FORWARD_MESSAGE_TOP_SUBJECT = "Assunto"
EMPTY_TO_ERROR_DESC = "Por favor, especifique pelo menos um destinatário"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Choose language"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "Отправлено"
FORWARD_MESSAGE_TOP_SUBJECT = "Тема"
EMPTY_TO_ERROR_DESC = "Укажите как минимум одного получателя"
[POPUPS_ASK]
BUTTON_YES = "Да"
BUTTON_NO = "Нет"
DESC_WANT_CLOSE_THIS_WINDOW = "Вы уверены, что хотите закрыть это окно?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "Выберите язык"

View file

@ -171,6 +171,11 @@ FORWARD_MESSAGE_TOP_SENT = "发送"
FORWARD_MESSAGE_TOP_SUBJECT = "主题"
EMPTY_TO_ERROR_DESC = "请至少选择一位接收人"
[POPUPS_ASK]
BUTTON_YES = "Yes"
BUTTON_NO = "No"
DESC_WANT_CLOSE_THIS_WINDOW = "Are you sure you want to close this window?"
[POPUPS_LANGUAGES]
TITLE_LANGUAGES = "选择语言"

View file

@ -5647,11 +5647,6 @@ html.no-rgba .modal {
.inputosaurus-container li.inputosaurus-selected {
background-color: #ddd;
}
.inputosaurus-container .inputosaurus-fake-span {
position: absolute;
top: 0;
left: -5000px;
}
.inputosaurus-container .inputosaurus-input {
margin: 1px 10px 1px 0px;
height: 22px;
@ -5664,6 +5659,11 @@ html.no-rgba .modal {
.ui-autocomplete {
z-index: 2000;
}
.inputosaurus-fake-span {
position: absolute;
top: 0;
left: -5000px;
}
.g-ui-user-select-none {
-webkit-user-select: none;
-khtml-user-select: none;
@ -6132,6 +6132,18 @@ html.rl-no-preview-pane #rl-right .ui-resizable-handle {
.b-login-content .flag-selector {
margin-bottom: 0;
}
.popups .b-ask-content.modal {
z-index: 10000;
}
.popups .b-ask-content .modal-header {
background-color: #fff;
}
.popups .b-ask-content .modal-body {
text-align: center;
}
.popups .b-ask-content .desc-place {
font-size: 18px;
}
.b-folders .b-toolbar {
position: absolute;
top: 0;
@ -8410,3 +8422,10 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
.editorFontStylePicker .editorFpFonts .editorFpFont {
padding: 5px;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"] {
height: 20px;
line-height: 21px;
}

File diff suppressed because one or more lines are too long

View file

@ -3492,11 +3492,6 @@ html.no-rgba .modal {
.inputosaurus-container li.inputosaurus-selected {
background-color: #ddd;
}
.inputosaurus-container .inputosaurus-fake-span {
position: absolute;
top: 0;
left: -5000px;
}
.inputosaurus-container .inputosaurus-input {
margin: 1px 10px 1px 0px;
height: 22px;
@ -3509,6 +3504,11 @@ html.no-rgba .modal {
.ui-autocomplete {
z-index: 2000;
}
.inputosaurus-fake-span {
position: absolute;
top: 0;
left: -5000px;
}
.g-ui-user-select-none {
-webkit-user-select: none;
-khtml-user-select: none;
@ -3977,6 +3977,18 @@ html.rl-no-preview-pane #rl-right .ui-resizable-handle {
.b-login-content .flag-selector {
margin-bottom: 0;
}
.popups .b-ask-content.modal {
z-index: 10000;
}
.popups .b-ask-content .modal-header {
background-color: #fff;
}
.popups .b-ask-content .modal-body {
text-align: center;
}
.popups .b-ask-content .desc-place {
font-size: 18px;
}
.b-folders .b-toolbar {
position: absolute;
top: 0;
@ -6255,3 +6267,10 @@ html.rl-message-fullscreen .messageView .b-content .buttonFull {
.editorFontStylePicker .editorFpFonts .editorFpFont {
padding: 5px;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"] {
height: 20px;
line-height: 21px;
}

View file

@ -372,6 +372,7 @@ Enums.ClientSideKeyName = {
*/
Enums.EventKeyCode = {
'Backspace': 8,
'Tab': 9,
'Enter': 13,
'Esc': 27,
'PageUp': 33,
@ -4641,6 +4642,20 @@ PopupsDomainViewModel.prototype.onShow = function (oDomain)
}
};
PopupsDomainViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
PopupsDomainViewModel.prototype.clearForm = function ()
{
this.edit(false);
@ -4772,6 +4787,31 @@ PopupsPluginViewModel.prototype.onShow = function (oPlugin)
}
}
};
PopupsPluginViewModel.prototype.tryToClosePopup = function ()
{
var self = this;
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
}
}]);
};
PopupsPluginViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
self.tryToClosePopup();
bResult = false;
}
return bResult;
});
};
/**
* @constructor
@ -4937,12 +4977,141 @@ PopupsLanguagesViewModel.prototype.onHide = function ()
this.exp(false);
};
PopupsLanguagesViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
{
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
*/
function PopupsAskViewModel()
{
KnoinAbstractViewModel.call(this, 'Popups', 'PopupsAsk');
this.askDesc = ko.observable('');
this.yesButton = ko.observable('');
this.noButton = ko.observable('');
this.yesFocus = ko.observable(false);
this.noFocus = ko.observable(false);
this.fYesAction = null;
this.fNoAction = null;
Knoin.constructorEnd(this);
}
Utils.extendAsViewModel('PopupsAskViewModel', PopupsAskViewModel);
PopupsAskViewModel.prototype.clearPopup = function ()
{
this.askDesc('');
this.yesButton(Utils.i18n('POPUPS_ASK/BUTTON_YES'));
this.noButton(Utils.i18n('POPUPS_ASK/BUTTON_NO'));
this.yesFocus(false);
this.noFocus(false);
this.fYesAction = null;
this.fNoAction = null;
};
PopupsAskViewModel.prototype.yesClick = function ()
{
if (Utils.isFunc(this.fYesAction))
{
this.fYesAction.call(null);
}
this.cancelCommand();
};
PopupsAskViewModel.prototype.noClick = function ()
{
if (Utils.isFunc(this.fNoAction))
{
this.fNoAction.call(null);
}
this.cancelCommand();
};
/**
* @param {string} sAskDesc
* @param {Function=} fYesFunc
* @param {Function=} fNoFunc
* @param {string=} sYesButton
* @param {string=} sNoButton
*/
PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYesButton, sNoButton)
{
this.clearPopup();
this.fYesAction = fYesFunc || null;
this.fNoAction = fNoFunc || null;
this.askDesc(sAskDesc || '');
if (sYesButton)
{
this.yesButton(sYesButton);
}
if (sYesButton)
{
this.yesButton(sNoButton);
}
this.yesFocus(true);
};
PopupsAskViewModel.prototype.onHide = function ()
{
};
PopupsAskViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && self.modalVisibility())
{
if (Enums.EventKeyCode.Tab === oEvent.keyCode || Enums.EventKeyCode.Right === oEvent.keyCode || Enums.EventKeyCode.Left === oEvent.keyCode)
{
if (self.yesFocus())
{
self.noFocus(true);
}
else
{
self.yesFocus(true);
}
bResult = false;
}
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -5772,8 +5941,27 @@ AdminPlugins.prototype.configurePlugin = function (oPlugin)
RL.remote().plugin(this.onPluginLoadRequest, oPlugin.name);
};
AdminPlugins.prototype.onBuild = function ()
AdminPlugins.prototype.onBuild = function (oDom)
{
var self = this;
oDom
.on('click', '.e-item .configure-plugin-action', function () {
var oPlugin = ko.dataFor(this);
if (oPlugin)
{
self.configurePlugin(oPlugin);
}
})
.on('click', '.e-item .disable-plugin', function () {
var oPlugin = ko.dataFor(this);
if (oPlugin)
{
self.disablePlugin(oPlugin);
}
})
;
this.enabledPlugins.subscribe(function (bValue) {
RL.remote().saveAdminConfig(Utils.emptyFunction, {
'EnabledPlugins': bValue ? '1' : '0'
@ -7119,7 +7307,6 @@ AbstractApp.prototype.pub = function (sName, aArgs)
{
if (!Utils.isUnd(this.oSubs[sName]))
{
window.console.log(sName);
_.each(this.oSubs[sName], function (aItem) {
if (aItem[0])
{

File diff suppressed because one or more lines are too long

View file

@ -372,6 +372,7 @@ Enums.ClientSideKeyName = {
*/
Enums.EventKeyCode = {
'Backspace': 8,
'Tab': 9,
'Enter': 13,
'Esc': 27,
'PageUp': 33,
@ -7654,6 +7655,20 @@ PopupsFolderClearViewModel.prototype.onShow = function (oFolder)
this.selectedFolder(oFolder);
}
};
PopupsFolderClearViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
@ -7760,6 +7775,20 @@ PopupsFolderCreateViewModel.prototype.onShow = function ()
this.clearPopup();
this.focusTrigger(true);
};
PopupsFolderCreateViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
@ -7864,6 +7893,20 @@ PopupsFolderSystemViewModel.prototype.onShow = function (iNotificationType)
this.notification(sNotification);
};
PopupsFolderSystemViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
@ -8666,6 +8709,17 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.triggerForResize();
};
PopupsComposeViewModel.prototype.tryToClosePopup = function ()
{
var self = this;
kn.showScreenPopup(PopupsAskViewModel, [Utils.i18n('POPUPS_ASK/DESC_WANT_CLOSE_THIS_WINDOW'), function () {
if (self.modalVisibility())
{
kn.delegateRun(self, 'closeCommand');
}
}]);
};
PopupsComposeViewModel.prototype.onBuild = function ()
{
this.initEditor();
@ -8691,6 +8745,11 @@ PopupsComposeViewModel.prototype.onBuild = function ()
self.sendCommand();
bResult = false;
}
else if (Enums.EventKeyCode.Esc === oEvent.keyCode)
{
self.tryToClosePopup();
bResult = false;
}
}
return bResult;
@ -9711,6 +9770,17 @@ PopupsContactsViewModel.prototype.onBuild = function (oDom)
}
})
;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'closeCommand');
bResult = false;
}
return bResult;
});
};
PopupsContactsViewModel.prototype.onShow = function ()
@ -9836,6 +9906,20 @@ PopupsAdvancedSearchViewModel.prototype.onShow = function ()
this.fromFocus(true);
};
PopupsAdvancedSearchViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
@ -9945,10 +10029,20 @@ PopupsAddAccountViewModel.prototype.onShow = function ()
this.emailFocus(true);
};
PopupsAddAccountViewModel.prototype.onBuild = function ()
{
this.allowCustomLogin(!!RL.settingsGet('AllowCustomLogin'));
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
@ -10071,7 +10165,6 @@ PopupsIdentityViewModel.prototype.clearPopup = function ()
};
/**
*
* @param {?IdentityModel} oIdentity
*/
PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
@ -10096,6 +10189,20 @@ PopupsIdentityViewModel.prototype.onShow = function (oIdentity)
this.email.focused(true);
}
};
PopupsIdentityViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
/**
* @constructor
@ -10151,12 +10258,141 @@ PopupsLanguagesViewModel.prototype.onHide = function ()
this.exp(false);
};
PopupsLanguagesViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && Enums.EventKeyCode.Esc === oEvent.keyCode && self.modalVisibility())
{
kn.delegateRun(self, 'cancelCommand');
bResult = false;
}
return bResult;
});
};
PopupsLanguagesViewModel.prototype.changeLanguage = function (sLang)
{
RL.data().mainLanguage(sLang);
this.cancelCommand();
};
/**
* @constructor
* @extends KnoinAbstractViewModel
*/
function PopupsAskViewModel()
{
KnoinAbstractViewModel.call(this, 'Popups', 'PopupsAsk');
this.askDesc = ko.observable('');
this.yesButton = ko.observable('');
this.noButton = ko.observable('');
this.yesFocus = ko.observable(false);
this.noFocus = ko.observable(false);
this.fYesAction = null;
this.fNoAction = null;
Knoin.constructorEnd(this);
}
Utils.extendAsViewModel('PopupsAskViewModel', PopupsAskViewModel);
PopupsAskViewModel.prototype.clearPopup = function ()
{
this.askDesc('');
this.yesButton(Utils.i18n('POPUPS_ASK/BUTTON_YES'));
this.noButton(Utils.i18n('POPUPS_ASK/BUTTON_NO'));
this.yesFocus(false);
this.noFocus(false);
this.fYesAction = null;
this.fNoAction = null;
};
PopupsAskViewModel.prototype.yesClick = function ()
{
if (Utils.isFunc(this.fYesAction))
{
this.fYesAction.call(null);
}
this.cancelCommand();
};
PopupsAskViewModel.prototype.noClick = function ()
{
if (Utils.isFunc(this.fNoAction))
{
this.fNoAction.call(null);
}
this.cancelCommand();
};
/**
* @param {string} sAskDesc
* @param {Function=} fYesFunc
* @param {Function=} fNoFunc
* @param {string=} sYesButton
* @param {string=} sNoButton
*/
PopupsAskViewModel.prototype.onShow = function (sAskDesc, fYesFunc, fNoFunc, sYesButton, sNoButton)
{
this.clearPopup();
this.fYesAction = fYesFunc || null;
this.fNoAction = fNoFunc || null;
this.askDesc(sAskDesc || '');
if (sYesButton)
{
this.yesButton(sYesButton);
}
if (sYesButton)
{
this.yesButton(sNoButton);
}
this.yesFocus(true);
};
PopupsAskViewModel.prototype.onHide = function ()
{
};
PopupsAskViewModel.prototype.onBuild = function ()
{
var self = this;
$window.on('keydown', function (oEvent) {
var bResult = true;
if (oEvent && self.modalVisibility())
{
if (Enums.EventKeyCode.Tab === oEvent.keyCode || Enums.EventKeyCode.Right === oEvent.keyCode || Enums.EventKeyCode.Left === oEvent.keyCode)
{
if (self.yesFocus())
{
self.noFocus(true);
}
else
{
self.yesFocus(true);
}
bResult = false;
}
}
return bResult;
});
};
/**
* @constructor
* @extends KnoinAbstractViewModel
@ -15742,7 +15978,6 @@ AbstractApp.prototype.pub = function (sName, aArgs)
{
if (!Utils.isUnd(this.oSubs[sName]))
{
window.console.log(sName);
_.each(this.oSubs[sName], function (aItem) {
if (aItem[0])
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -23,6 +23,8 @@
version: "0.1.6",
fakeSpan: $('<span class="inputosaurus-fake-span"></span>'),
eventprefix: "inputosaurus",
options: {
@ -72,7 +74,6 @@
// Create the elements
els.ul = $('<ul class="inputosaurus-container"></ul>');
els.fakeSpan = $('<span class="inputosaurus-fake-span"></span>');
els.input = $('<input type="email" />');
els.inputCont = $('<li class="inputosaurus-input inputosaurus-required"></li>');
els.origInputCont = $('<li class="inputosaurus-input-hidden inputosaurus-required"></li>');
@ -94,7 +95,6 @@
els.inputCont.append(els.input);
els.ul.append(els.inputCont);
els.ul.append(els.origInputCont);
els.ul.append(els.fakeSpan);
o.width && els.ul.css('width', o.width);
@ -235,13 +235,17 @@
}
},
resizeInput : function () {
this._resizeInput();
},
// the input dynamically resizes based on the length of its value
_resizeInput : function(ev) {
var widget = (ev && ev.data.widget) || this;
widget.elements.fakeSpan.text(widget.elements.input.val());
inputosaurustext.fakeSpan.text(widget.elements.input.val());
// window.setTimeout(function () {
var txtWidth = 25 + widget.elements.fakeSpan.width();
var txtWidth = 25 + inputosaurustext.fakeSpan.width();
txtWidth = txtWidth > 50 ? txtWidth : 50;
txtWidth = txtWidth < 500 ? txtWidth : 500;
widget.elements.input.width(txtWidth);
@ -577,6 +581,8 @@
}
};
$('body').append(inputosaurustext.fakeSpan);
$.widget("ui.inputosaurus", inputosaurustext);
})(jQuery);

File diff suppressed because one or more lines are too long