ckeditor fixes

demo-plugin
TemproryApcStorage
This commit is contained in:
RainLoop Team
2015-02-12 21:54:12 +04:00
parent 000711086a
commit 844afadd6f
40 changed files with 2371 additions and 197 deletions

View File

@@ -101,16 +101,7 @@
*/
HtmlEditor.prototype.clearSignatureSigns = function (sText)
{
return sText
.replace("\u0002", '').replace("\u0002", '')
.replace("\u0002", '').replace("\u0002", '')
.replace("\u0003", '').replace("\u0003", '')
.replace("\u0003", '').replace("\u0003", '')
.replace("\u0004", '').replace("\u0004", '')
.replace("\u0004", '').replace("\u0004", '')
.replace("\u0005", '').replace("\u0005", '')
.replace("\u0005", '').replace("\u0005", '')
;
return sText.replace(/(\u0002|\u0003|\u0004|\u0005)/g, '');
};
/**
@@ -123,16 +114,20 @@
var sResult = '';
if (this.editor)
{
if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain)
try
{
sResult = this.editor.__plain.getRawData();
}
else
{
sResult = bWrapIsHtml ?
'<div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">' +
this.editor.getData() + '</div>' : this.editor.getData();
if ('plain' === this.editor.mode && this.editor.plugins.plain && this.editor.__plain)
{
sResult = this.editor.__plain.getRawData();
}
else
{
sResult = bWrapIsHtml ?
'<div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;">' +
this.editor.getData() + '</div>' : this.editor.getData();
}
}
catch (e) {}
if (bClearSignatureSigns)
{
@@ -147,20 +142,22 @@
{
if (this.editor)
{
if (bPlain)
{
if ('plain' === this.editor.mode)
try {
if (bPlain)
{
this.editor.setMode('wysiwyg');
if ('plain' === this.editor.mode)
{
this.editor.setMode('wysiwyg');
}
}
}
else
{
if ('wysiwyg' === this.editor.mode)
else
{
this.editor.setMode('plain');
if ('wysiwyg' === this.editor.mode)
{
this.editor.setMode('plain');
}
}
}
} catch(e) {}
this.resize();
}
@@ -319,7 +316,9 @@
{
if (this.editor)
{
this.editor.focusManager.blur(true);
try {
this.editor.focusManager.blur(true);
} catch (e) {}
}
};
@@ -327,11 +326,9 @@
{
if (this.editor && this.__resizable)
{
try
{
try {
this.editor.resize(this.$element.width(), this.$element.innerHeight());
}
catch (e) {}
} catch (e) {}
}
};

View File

@@ -28,7 +28,7 @@
this.allowDesktopNotification = ko.observable(false);
this.desktopNotificationPermisions = ko.computed(function () {
this.desktopNotificationPermissions = ko.computed(function () {
this.allowDesktopNotification();
@@ -65,14 +65,14 @@
'owner': this,
'read': function () {
return this.allowDesktopNotification() &&
Enums.DesktopNotification.Allowed === this.desktopNotificationPermisions();
Enums.DesktopNotification.Allowed === this.desktopNotificationPermissions();
},
'write': function (bValue) {
if (bValue)
{
var
NotificationClass = this.notificationClass(),
iPermission = this.desktopNotificationPermisions()
iPermission = this.desktopNotificationPermissions()
;
if (NotificationClass && Enums.DesktopNotification.Allowed === iPermission)
@@ -83,7 +83,7 @@
{
NotificationClass.requestPermission(function () {
self.allowDesktopNotification.valueHasMutated();
if (Enums.DesktopNotification.Allowed === self.desktopNotificationPermisions())
if (Enums.DesktopNotification.Allowed === self.desktopNotificationPermissions())
{
if (self.allowDesktopNotification())
{
@@ -134,12 +134,12 @@
NotificationUserStore.prototype.computedProperies = function ()
{
this.isDesktopNotificationSupported = ko.computed(function () {
return Enums.DesktopNotification.NotSupported !== this.desktopNotificationPermisions();
return Enums.DesktopNotification.NotSupported !== this.desktopNotificationPermissions();
}, this);
this.isDesktopNotificationDenied = ko.computed(function () {
return Enums.DesktopNotification.NotSupported === this.desktopNotificationPermisions() ||
Enums.DesktopNotification.Denied === this.desktopNotificationPermisions();
return Enums.DesktopNotification.NotSupported === this.desktopNotificationPermissions() ||
Enums.DesktopNotification.Denied === this.desktopNotificationPermissions();
}, this);
};

View File

@@ -99,5 +99,9 @@
.b-settings-content {
padding: 20px;
padding-left: 30px;
.legend {
width: 670px;
}
}
}

View File

@@ -22,7 +22,7 @@
}
.e-signature-place {
height: 300px;
height: 200px;
}
.textEmail {

View File

@@ -106,5 +106,9 @@
.b-settings-content {
padding: 20px;
padding-left: 30px;
.legend {
width: 600px;
}
}
}

View File

@@ -1,33 +1,38 @@
.b-settings-themes {
}
.b-themes-list {
.e-item {
display: inline-block;
border: 2px solid transparent;
cursor: pointer;
color: #000;
background-color: #fff;
padding: 16px;
margin: 5px;
&:hover {
border: 2px solid grey;
}
&.selected {
background-color: #eee;
border: 2px solid #000;
}
.e-image {
width: 100px;
height: 100px;
border: 1px solid #ddd;
}
}
}
.b-settings-content {
.b-settings-themes {
.legend {
width: 100%;
}
}
}
.b-themes-list {
.e-item {
display: inline-block;
border: 2px solid transparent;
cursor: pointer;
color: #000;
background-color: #fff;
padding: 16px;
margin: 5px;
&:hover {
border: 2px solid grey;
}
&.selected {
background-color: #eee;
border: 2px solid #000;
}
.e-image {
width: 100px;
height: 100px;
border: 1px solid #ddd;
}
}
}