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

@ -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>