Fix IE8 bugs

This commit is contained in:
RainLoop Team 2014-02-25 23:22:17 +04:00
parent 82576b3ee2
commit 8711e22b5b
9 changed files with 106 additions and 48 deletions

View file

@ -60,6 +60,29 @@ ko.bindingHandlers.popover = {
} }
}; };
ko.bindingHandlers.csstext = {
'init': function (oElement, fValueAccessor) {
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
}
else
{
$(oElement).text(ko.utils.unwrapObservable(fValueAccessor()));
}
},
'update': function (oElement, fValueAccessor) {
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
}
else
{
$(oElement).text(ko.utils.unwrapObservable(fValueAccessor()));
}
}
};
ko.bindingHandlers.resizecrop = { ko.bindingHandlers.resizecrop = {
'init': function (oElement) { 'init': function (oElement) {
$(oElement).addClass('resizecrop').resizecrop({ $(oElement).addClass('resizecrop').resizecrop({

View file

@ -82,7 +82,15 @@ function SettingsThemes()
if (oThemeStyle && oThemeStyle[0]) if (oThemeStyle && oThemeStyle[0])
{ {
oThemeStyle.attr('data-href', sUrl).attr('data-theme', aData[0]).text(aData[1]); oThemeStyle.attr('data-href', sUrl).attr('data-theme', aData[0]);
if (oThemeStyle && oThemeStyle[0] && oThemeStyle[0].styleSheet && !Utils.isUnd(oThemeStyle[0].styleSheet.cssText))
{
oThemeStyle[0].styleSheet.cssText = aData[1];
}
else
{
oThemeStyle.text(aData[1]);
}
} }
self.themeTrigger(Enums.SaveSettingsStep.TrueResult); self.themeTrigger(Enums.SaveSettingsStep.TrueResult);

View file

@ -1,4 +1,4 @@
<style data-bind="text: logoCss"></style> <style data-bind="csstext: logoCss"></style>
<div class="b-login-content"> <div class="b-login-content">
<div class="loginFormWrapper"> <div class="loginFormWrapper">
<center> <center>

View file

@ -17,46 +17,19 @@
</label> </label>
</div> </div>
</div> </div>
<!--
<div class="control-group" data-bind="visible: isAnimationSupported">
<label class="control-label" style="padding-top: 0;">
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_ANIMATION"></span>
</label>
<div class="controls">
<label>
<input type="radio" name="interfaceAnimation" value="Full" data-bind="checked: interfaceAnimation" style="display: none" />
<i data-bind="css: 'Full' === interfaceAnimation() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_ANIMATION_FULL"></span>
</label>
<label>
<input type="radio" name="interfaceAnimation" value="Normal" data-bind="checked: interfaceAnimation" style="display: none" />
<i data-bind="css: 'Normal' === interfaceAnimation() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_ANIMATION_NORMAL"></span>
</label>
<label>
<input type="radio" name="interfaceAnimation" value="None" data-bind="checked: interfaceAnimation" style="display: none" />
<i data-bind="css: 'None' === interfaceAnimation() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_ANIMATION_NONE"></span>
</label>
</div>
</div>
-->
<div class="control-group"> <div class="control-group">
<label class="control-label" style="padding-top: 0;"> <label class="control-label" style="padding-top: 0;">
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_EDITOR"></span> <span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_EDITOR"></span>
</label> </label>
<div class="controls"> <div class="controls">
<label> <label for="richTextEditorTypeID1">
<input type="radio" name="richTextEditorType" value="Html" data-bind="checked: editorDefaultType" style="display: none" /> <input id="richTextEditorTypeID1" type="radio" name="richTextEditorType" value="Html" data-bind="checked: editorDefaultType" style="position: absolute; left: -10000px" />
<i data-bind="css: 'Html' === editorDefaultType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i> <i data-bind="css: 'Html' === editorDefaultType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp; &nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_EDITOR_HTML_AS_DEFAULT"></span> <span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_EDITOR_HTML_AS_DEFAULT"></span>
</label> </label>
<label> <label for="richTextEditorTypeID2">
<input type="radio" name="richTextEditorType" value="Plain" data-bind="checked: editorDefaultType" style="display: none" /> <input id="richTextEditorTypeID2" type="radio" name="richTextEditorType" value="Plain" data-bind="checked: editorDefaultType" style="position: absolute; left: -10000px" />
<i data-bind="css: 'Plain' === editorDefaultType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i> <i data-bind="css: 'Plain' === editorDefaultType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp; &nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_AS_DEFAULT"></span> <span class="i18n" data-i18n-text="SETTINGS_GENERAL/LABEL_EDITOR_PLAIN_AS_DEFAULT"></span>

View file

@ -22,14 +22,14 @@
<span class="i18n" data-i18n-text="SETTINGS_THEMES/LABEL_CUSTOM_TYPE"></span> <span class="i18n" data-i18n-text="SETTINGS_THEMES/LABEL_CUSTOM_TYPE"></span>
</label> </label>
<div class="controls"> <div class="controls">
<label> <label for="customThemeTypeID1">
<input type="radio" name="customThemeType" value="Light" data-bind="checked: customThemeType" style="display: none" /> <input id="customThemeTypeID1" type="radio" name="customThemeType" value="Light" data-bind="checked: customThemeType" style="position: absolute; left: -10000px" />
<i data-bind="css: 'Light' === customThemeType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i> <i data-bind="css: 'Light' === customThemeType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp; &nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_THEMES/LABEL_CUSTOM_TYPE_LIGHT"></span> <span class="i18n" data-i18n-text="SETTINGS_THEMES/LABEL_CUSTOM_TYPE_LIGHT"></span>
</label> </label>
<label> <label for="customThemeTypeID2">
<input type="radio" name="customThemeType" value="Dark" data-bind="checked: customThemeType" style="display: none" /> <input id="customThemeTypeID2" type="radio" name="customThemeType" value="Dark" data-bind="checked: customThemeType" style="position: absolute; left: -10000px" />
<i data-bind="css: 'Dark' === customThemeType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i> <i data-bind="css: 'Dark' === customThemeType() ? ' icon-radio-checked' : 'icon-radio-unchecked'"></i>
&nbsp;&nbsp; &nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_THEMES/LABEL_CUSTOM_TYPE_DARK"></span> <span class="i18n" data-i18n-text="SETTINGS_THEMES/LABEL_CUSTOM_TYPE_DARK"></span>

View file

@ -2608,6 +2608,29 @@ ko.bindingHandlers.popover = {
} }
}; };
ko.bindingHandlers.csstext = {
'init': function (oElement, fValueAccessor) {
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
}
else
{
$(oElement).text(ko.utils.unwrapObservable(fValueAccessor()));
}
},
'update': function (oElement, fValueAccessor) {
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
}
else
{
$(oElement).text(ko.utils.unwrapObservable(fValueAccessor()));
}
}
};
ko.bindingHandlers.resizecrop = { ko.bindingHandlers.resizecrop = {
'init': function (oElement) { 'init': function (oElement) {
$(oElement).addClass('resizecrop').resizecrop({ $(oElement).addClass('resizecrop').resizecrop({

File diff suppressed because one or more lines are too long

View file

@ -2608,6 +2608,29 @@ ko.bindingHandlers.popover = {
} }
}; };
ko.bindingHandlers.csstext = {
'init': function (oElement, fValueAccessor) {
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
}
else
{
$(oElement).text(ko.utils.unwrapObservable(fValueAccessor()));
}
},
'update': function (oElement, fValueAccessor) {
if (oElement && oElement.styleSheet && !Utils.isUnd(oElement.styleSheet.cssText))
{
oElement.styleSheet.cssText = ko.utils.unwrapObservable(fValueAccessor());
}
else
{
$(oElement).text(ko.utils.unwrapObservable(fValueAccessor()));
}
}
};
ko.bindingHandlers.resizecrop = { ko.bindingHandlers.resizecrop = {
'init': function (oElement) { 'init': function (oElement) {
$(oElement).addClass('resizecrop').resizecrop({ $(oElement).addClass('resizecrop').resizecrop({
@ -13161,7 +13184,15 @@ function SettingsThemes()
if (oThemeStyle && oThemeStyle[0]) if (oThemeStyle && oThemeStyle[0])
{ {
oThemeStyle.attr('data-href', sUrl).attr('data-theme', aData[0]).text(aData[1]); oThemeStyle.attr('data-href', sUrl).attr('data-theme', aData[0]);
if (oThemeStyle && oThemeStyle[0] && oThemeStyle[0].styleSheet && !Utils.isUnd(oThemeStyle[0].styleSheet.cssText))
{
oThemeStyle[0].styleSheet.cssText = aData[1];
}
else
{
oThemeStyle.text(aData[1]);
}
} }
self.themeTrigger(Enums.SaveSettingsStep.TrueResult); self.themeTrigger(Enums.SaveSettingsStep.TrueResult);

File diff suppressed because one or more lines are too long