Code refactoring (Translator, Stores, ko)

This commit is contained in:
RainLoop Team 2015-01-26 03:09:22 +04:00
parent 929bffccef
commit b42ce01e7e
102 changed files with 6775 additions and 6511 deletions

View file

@ -1233,6 +1233,7 @@ class Actions
$aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
$aResult['DropboxApiKey'] = \trim($oConfig->Get('social', 'dropbox_api_key', ''));
if (!$aResult['AllowDropboxSocial'])
{
$aResult['DropboxApiKey'] = '';
@ -1288,7 +1289,6 @@ class Actions
$aResult['TwitterConsumerKey'] = (string) $oConfig->Get('social', 'twitter_consumer_key', '');
$aResult['TwitterConsumerSecret'] = (string) $oConfig->Get('social', 'twitter_consumer_secret', '');
$aResult['AllowDropboxSocial'] = (bool) $oConfig->Get('social', 'dropbox_enable', false);
$aResult['DropboxApiKey'] = (string) $oConfig->Get('social', 'dropbox_api_key', '');

View file

@ -20,9 +20,9 @@
<div class="controls">
<div class="flag-selector">
<span class="flag-wrapper">
<span data-bind="css: 'flag flag-' + mainLanguage()" style=""></span>
<span data-bind="css: 'flag flag-' + language()" style=""></span>
</span>
<span class="flag-name" data-bind="text: mainLanguageFullName, click: selectLanguage"></span>
<span class="flag-name" data-bind="text: languageFullName, click: selectLanguage"></span>
&nbsp;&nbsp;
<div data-bind="component: {
name: 'SaveTrigger',
@ -40,7 +40,7 @@
name: 'Select',
params: {
options: themesOptions,
value: mainTheme,
value: theme,
trigger: themeTrigger,
optionsText: 'optText',
optionsValue: 'optValue',

View file

@ -21,22 +21,22 @@
<div data-bind="component: {
name: 'Checkbox',
params: {
value: googleEnable.auth,
value: googleEnableAuth,
label: 'Authentication'
}
}"></div>
<div data-bind="component: {
name: 'Checkbox',
params: {
value: googleEnable.drive,
value: googleEnableDrive,
label: 'Google Drive Integration (Compose view)'
}
}"></div>
<div data-bind="component: {
name: 'Checkbox',
params: {
value: googleEnable.preview,
label: 'Google Viewer Integration (Preview Microsoft Word, Excel and PowerPoint files)'
value: googleEnablePreview,
label: 'Google Viewer Integration (Preview for Microsoft Word, Excel and PowerPoint files)'
}
}"></div>
</blockquote>
@ -54,7 +54,7 @@
name: 'xx',
value: googleClientID,
trigger: googleTrigger1,
enable: googleEnable.requireClientSettings,
enable: googleEnableRequireClientSettings,
size: 5
}
}"></div>
@ -70,7 +70,7 @@
params: {
value: googleClientSecret,
trigger: googleTrigger2,
enable: googleEnable.requireClientSettings,
enable: googleEnableRequireClientSettings,
size: 5
}
}"></div>
@ -88,7 +88,7 @@
value: googleApiKey,
trigger: googleTrigger3,
size: 5,
enable: googleEnable.requireApiKey
enable: googleEnableRequireApiKey
}
}"></div>
<blockquote style="margin-top: 10px; margin-bottom: 0">

View file

@ -106,7 +106,7 @@
<label class="flag-selector">
<i data-bind="css: langRequest() ? 'icon-spinner animated' : 'icon-world'"></i>
&nbsp;
<span class="flag-name" data-bind="text: mainLanguageFullName, click: selectLanguage"></span>
<span class="flag-name" data-bind="text: languageFullName, click: selectLanguage"></span>
</label>
</div>
</div>

View file

@ -10,9 +10,9 @@
<div class="controls">
<div class="flag-selector">
<span class="flag-wrapper">
<span data-bind="css: 'flag flag-' + mainLanguage()" style=""></span>
<span data-bind="css: 'flag flag-' + language()" style=""></span>
</span>
<span class="flag-name" data-bind="text: mainLanguageFullName, click: selectLanguage"></span>
<span class="flag-name" data-bind="text: languageFullName, click: selectLanguage"></span>
&nbsp;&nbsp;
<div data-bind="component: {
name: 'SaveTrigger',
@ -66,8 +66,8 @@
name: 'Select',
params: {
label: 'SETTINGS_GENERAL/LABEL_MESSAGE_PER_PAGE',
options: mainMessagesPerPageArray,
value: mainMessagesPerPage,
options: messagesPerPageArray,
value: messagesPerPage,
trigger: mppTrigger,
size: 2,
width: 70
@ -108,24 +108,24 @@
</div>
</div>
</div>
<div class="form-horizontal" data-bind="visible: isDesktopNotificationsSupported()">
<div class="form-horizontal" data-bind="visible: isDesktopNotificationSupported">
<div class="legend">
<span class="i18n i18n-animation" data-i18n-text="SETTINGS_GENERAL/LABEL_CHROME_NOTIFICATION"></span>
</div>
<div class="control-group">
<div class="controls">
<div data-bind="visible: isDesktopNotificationsSupported">
<div data-bind="visible: isDesktopNotificationSupported">
<div data-bind="component: {
name: 'Checkbox',
params: {
label: 'SETTINGS_GENERAL/LABEL_CHROME_NOTIFICATION_DESC',
value: useDesktopNotifications,
disable: isDesktopNotificationsDenied,
value: enableDesktopNotification,
disable: isDesktopNotificationDenied,
inline: true
}
}"></div>
&nbsp;
<span data-bind="visible: isDesktopNotificationsDenied">
<span data-bind="visible: isDesktopNotificationDenied">
<span class="i18n" style="color: #999" data-i18n-text="SETTINGS_GENERAL/LABEL_CHROME_NOTIFICATION_DESC_DENIED"></span>
</span>
</div>

View file

@ -1,5 +1,5 @@
<div class="b-settings-social g-ui-user-select-none">
<div class="form-horizontal" data-bind="visible: googleEnable() && googleEnable.auth()">
<div class="form-horizontal" data-bind="visible: googleEnable() && googleEnableAuth()">
<div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_SOCIAL/LEGEND_GOOGLE"></span>
</div>

View file

@ -10,7 +10,7 @@
</div>
</div>
<div class="b-themes-list" data-bind="foreach: themesObjects">
<div class="e-item" data-bind="click: function () { $root.mainTheme(name); }, css: { 'selected': selected }">
<div class="e-item" data-bind="click: function () { $root.theme(name); }, css: { 'selected': selected }">
<div class="e-name" data-bind="text: nameDisplay"></div>
<img class="e-image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-bind="attr: { 'src': themePreviewSrc }" />
</div>