Merge branch 'feature/new-mobile'
This commit is contained in:
commit
35ed40ce15
|
@ -1,4 +1,4 @@
|
||||||
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.1.2-blue.svg?style=flat)
|
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html)
|
||||||
|
|
||||||
## web-apps
|
## web-apps
|
||||||
|
|
||||||
|
|
|
@ -102,54 +102,33 @@ Common.Utils = _.extend(new(function() {
|
||||||
Chart : 7,
|
Chart : 7,
|
||||||
MailMerge : 8
|
MailMerge : 8
|
||||||
},
|
},
|
||||||
|
isMobile = /android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera),
|
||||||
me = this,
|
me = this,
|
||||||
checkSize = function() {
|
checkSize = function() {
|
||||||
me.zoom = 1;
|
me.zoom = 1;
|
||||||
if (false)
|
if (isChrome && !isOpera && !isMobile && document && document.firstElementChild && document.body)
|
||||||
{
|
{
|
||||||
// этот код - рабочий, но только если этот ифрейм открыт на весь размер браузера
|
// делаем простую проверку
|
||||||
// (window.outerWidth и window.innerWidth зависимы)
|
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
if (window.innerWidth > 300)
|
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
me.zoom = window.outerWidth / window.innerWidth;
|
if (window.devicePixelRatio > 0.1)
|
||||||
|
{
|
||||||
if (Math.abs(me.zoom - 1) < 0.1)
|
if (window.devicePixelRatio < 1.99)
|
||||||
me.zoom = 1;
|
{
|
||||||
|
var _devicePixelRatio = 1;
|
||||||
me.zoom = window.outerWidth / window.innerWidth;
|
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
|
}
|
||||||
var _devicePixelRatio = window.devicePixelRatio / me.zoom;
|
else
|
||||||
|
{
|
||||||
// device pixel ratio: кратно 0.5
|
var _devicePixelRatio = 2;
|
||||||
_devicePixelRatio = (5 * (((2.5 + 10 * _devicePixelRatio) / 5) >> 0)) / 10;
|
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
}
|
||||||
|
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
||||||
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
//document.firstElementChild.style.zoom = "reset";
|
||||||
//document.firstElementChild.style.zoom = "reset";
|
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
||||||
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
}
|
||||||
}
|
else
|
||||||
else
|
document.firstElementChild.style.zoom = "normal";
|
||||||
{
|
|
||||||
// делаем простую проверку
|
|
||||||
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
|
|
||||||
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
|
|
||||||
if (window.devicePixelRatio > 0.1)
|
|
||||||
{
|
|
||||||
if (window.devicePixelRatio < 1.99)
|
|
||||||
{
|
|
||||||
var _devicePixelRatio = 1;
|
|
||||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var _devicePixelRatio = 2;
|
|
||||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
|
||||||
}
|
|
||||||
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
|
||||||
//document.firstElementChild.style.zoom = "reset";
|
|
||||||
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
document.firstElementChild.style.zoom = "normal";
|
|
||||||
}
|
}
|
||||||
me.innerWidth = window.innerWidth * me.zoom;
|
me.innerWidth = window.innerWidth * me.zoom;
|
||||||
me.innerHeight = window.innerHeight * me.zoom;
|
me.innerHeight = window.innerHeight * me.zoom;
|
||||||
|
|
|
@ -52,7 +52,7 @@ define([
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||||
|
|
||||||
this.txtVersionNum = '4.2';
|
this.txtVersionNum = '4.3';
|
||||||
this.txtAscMail = 'support@onlyoffice.com';
|
this.txtAscMail = 'support@onlyoffice.com';
|
||||||
this.txtAscTelNum = '+371 660-16425';
|
this.txtAscTelNum = '+371 660-16425';
|
||||||
this.txtAscUrl = 'www.onlyoffice.com';
|
this.txtAscUrl = 'www.onlyoffice.com';
|
||||||
|
|
|
@ -104,7 +104,7 @@ define([
|
||||||
});
|
});
|
||||||
var cnt_panel = $window.find('.content-panel');
|
var cnt_panel = $window.find('.content-panel');
|
||||||
cnt_panel.width(this.contentWidth);
|
cnt_panel.width(this.contentWidth);
|
||||||
$window.width($window.find('.menu-panel').width() + cnt_panel.outerWidth() + 1);
|
$window.width($window.find('.menu-panel').width() + cnt_panel.outerWidth() + 2);
|
||||||
|
|
||||||
this.content_panels = $window.find('.settings-panel');
|
this.content_panels = $window.find('.settings-panel');
|
||||||
if (this.btnsCategory.length>0)
|
if (this.btnsCategory.length>0)
|
||||||
|
|
|
@ -62,7 +62,7 @@ define([
|
||||||
'<div class="separator horizontal"/>',
|
'<div class="separator horizontal"/>',
|
||||||
'<div class="footer" style="text-align: center;">',
|
'<div class="footer" style="text-align: center;">',
|
||||||
'<button id="id-btn-diagram-editor-apply" class="btn normal dlg-btn primary custom" result="ok" style="margin-right: 10px;">' + this.textSave + '</button>',
|
'<button id="id-btn-diagram-editor-apply" class="btn normal dlg-btn primary custom" result="ok" style="margin-right: 10px;">' + this.textSave + '</button>',
|
||||||
'<button id="id-btn-diagram-editor-cancel" class="btn normal dlg-btn disabled" result="cancel">' + this.textClose + '</button>',
|
'<button id="id-btn-diagram-editor-cancel" class="btn normal dlg-btn" result="cancel">' + this.textClose + '</button>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join('');
|
].join('');
|
||||||
|
|
||||||
|
|
|
@ -454,8 +454,8 @@
|
||||||
color: @gray-deep;
|
color: @gray-deep;
|
||||||
background-color: @secondary;
|
background-color: @secondary;
|
||||||
|
|
||||||
&:hover,
|
&:hover:not(.disabled),
|
||||||
&.hover {
|
&.hover:not(.disabled) {
|
||||||
background-color: @secondary-hover;
|
background-color: @secondary-hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,8 +463,8 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: @primary;
|
background-color: @primary;
|
||||||
|
|
||||||
&:hover,
|
&:hover:not(.disabled),
|
||||||
&.hover {
|
&.hover:not(.disabled) {
|
||||||
background-color: @primary-hover;
|
background-color: @primary-hover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="drop-advanced-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="drop-advanced-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="drop-advanced-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="drop-advanced-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -188,7 +188,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="drop-advanced-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="drop-advanced-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="drop-advanced-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="drop-advanced-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -444,7 +444,7 @@ define([
|
||||||
if (!this.mnuColorPicker) {
|
if (!this.mnuColorPicker) {
|
||||||
this.btnColor.setMenu( new Common.UI.Menu({
|
this.btnColor.setMenu( new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="paragraph-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -212,7 +212,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="paragraphadv-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="paragraphadv-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="paragraphadv-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="paragraphadv-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -266,7 +266,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="paragraphadv-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="paragraphadv-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="paragraphadv-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="paragraphadv-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1561,7 +1561,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1581,7 +1581,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1600,7 +1600,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1619,7 +1619,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1638,7 +1638,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -642,7 +642,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="table-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -660,7 +660,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="table-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -881,7 +881,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="tableadv-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="tableadv-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="tableadv-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="tableadv-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -901,7 +901,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="tableadv-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="tableadv-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="tableadv-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="tableadv-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -921,7 +921,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="tableadv-table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="tableadv-table-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="tableadv-table-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="tableadv-table-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1054,7 +1054,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1073,7 +1073,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1092,7 +1092,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -253,7 +253,7 @@ define([
|
||||||
template : _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #000;"></span><%= caption %></a>')
|
template : _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #000;"></span><%= caption %></a>')
|
||||||
},
|
},
|
||||||
{caption:'--'},
|
{caption:'--'},
|
||||||
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -267,7 +267,7 @@ define([
|
||||||
split : true,
|
split : true,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1440,7 +1440,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1459,7 +1459,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1478,7 +1478,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1497,7 +1497,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -985,7 +985,7 @@ define([
|
||||||
disabled: true,
|
disabled: true,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="slide-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="slide-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="slide-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="slide-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1005,7 +1005,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="slide-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="slide-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="slide-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="slide-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1024,7 +1024,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="slide-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="slide-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="slide-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="slide-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1043,7 +1043,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="slide-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="slide-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="slide-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="slide-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -538,7 +538,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="table-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -556,7 +556,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="table-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1456,7 +1456,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1476,7 +1476,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1495,7 +1495,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1514,7 +1514,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1533,7 +1533,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -322,7 +322,7 @@ define([
|
||||||
split : true,
|
split : true,
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -141,12 +141,11 @@ require([
|
||||||
'Settings',
|
'Settings',
|
||||||
'EditContainer',
|
'EditContainer',
|
||||||
'EditText',
|
'EditText',
|
||||||
// 'EditParagraph',
|
|
||||||
'EditTable',
|
'EditTable',
|
||||||
'EditImage',
|
'EditImage',
|
||||||
'EditShape',
|
'EditShape',
|
||||||
// 'EditChart',
|
// 'EditChart',
|
||||||
// 'EditHyperlink',
|
'EditLink',
|
||||||
'AddContainer',
|
'AddContainer',
|
||||||
'AddTable',
|
'AddTable',
|
||||||
'AddShape',
|
'AddShape',
|
||||||
|
@ -206,12 +205,11 @@ require([
|
||||||
'presentationeditor/mobile/app/controller/Settings',
|
'presentationeditor/mobile/app/controller/Settings',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditContainer',
|
'presentationeditor/mobile/app/controller/edit/EditContainer',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditText',
|
'presentationeditor/mobile/app/controller/edit/EditText',
|
||||||
// 'presentationeditor/mobile/app/controller/edit/EditParagraph',
|
|
||||||
'presentationeditor/mobile/app/controller/edit/EditTable',
|
'presentationeditor/mobile/app/controller/edit/EditTable',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditImage',
|
'presentationeditor/mobile/app/controller/edit/EditImage',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditShape',
|
'presentationeditor/mobile/app/controller/edit/EditShape',
|
||||||
// 'presentationeditor/mobile/app/controller/edit/EditChart',
|
// 'presentationeditor/mobile/app/controller/edit/EditChart',
|
||||||
// 'presentationeditor/mobile/app/controller/edit/EditHyperlink',
|
'presentationeditor/mobile/app/controller/edit/EditLink',
|
||||||
'presentationeditor/mobile/app/controller/add/AddContainer',
|
'presentationeditor/mobile/app/controller/add/AddContainer',
|
||||||
'presentationeditor/mobile/app/controller/add/AddTable',
|
'presentationeditor/mobile/app/controller/add/AddTable',
|
||||||
'presentationeditor/mobile/app/controller/add/AddShape',
|
'presentationeditor/mobile/app/controller/add/AddShape',
|
||||||
|
|
|
@ -152,12 +152,11 @@ require([
|
||||||
// 'Settings',
|
// 'Settings',
|
||||||
// 'EditContainer',
|
// 'EditContainer',
|
||||||
'EditText',
|
'EditText',
|
||||||
// 'EditParagraph'
|
|
||||||
'EditTable',
|
'EditTable',
|
||||||
'EditImage',
|
'EditImage',
|
||||||
'EditShape',
|
'EditShape',
|
||||||
// 'EditChart',
|
// 'EditChart',
|
||||||
// 'EditHyperlink',
|
'EditLink',
|
||||||
'AddContainer',
|
'AddContainer',
|
||||||
'AddTable',
|
'AddTable',
|
||||||
'AddShape',
|
'AddShape',
|
||||||
|
@ -217,12 +216,11 @@ require([
|
||||||
// 'presentationeditor/mobile/app/controller/Settings',
|
// 'presentationeditor/mobile/app/controller/Settings',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditContainer',
|
'presentationeditor/mobile/app/controller/edit/EditContainer',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditText',
|
'presentationeditor/mobile/app/controller/edit/EditText',
|
||||||
// 'presentationeditor/mobile/app/controller/edit/EditParagraph'
|
|
||||||
'presentationeditor/mobile/app/controller/edit/EditTable',
|
'presentationeditor/mobile/app/controller/edit/EditTable',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditImage',
|
'presentationeditor/mobile/app/controller/edit/EditImage',
|
||||||
'presentationeditor/mobile/app/controller/edit/EditShape',
|
'presentationeditor/mobile/app/controller/edit/EditShape',
|
||||||
// 'presentationeditor/mobile/app/controller/edit/EditChart',
|
// 'presentationeditor/mobile/app/controller/edit/EditChart',
|
||||||
// 'presentationeditor/mobile/app/controller/edit/EditHyperlink',
|
'presentationeditor/mobile/app/controller/edit/EditLink',
|
||||||
'presentationeditor/mobile/app/controller/add/AddContainer',
|
'presentationeditor/mobile/app/controller/add/AddContainer',
|
||||||
'presentationeditor/mobile/app/controller/add/AddTable',
|
'presentationeditor/mobile/app/controller/add/AddTable',
|
||||||
'presentationeditor/mobile/app/controller/add/AddShape',
|
'presentationeditor/mobile/app/controller/add/AddShape',
|
||||||
|
|
|
@ -46,8 +46,7 @@ define([
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
PE.Controllers.AddLink = Backbone.Controller.extend(_.extend((function() {
|
PE.Controllers.AddLink = Backbone.Controller.extend(_.extend((function() {
|
||||||
var _linkObject = undefined,
|
var c_oHyperlinkType = {
|
||||||
c_oHyperlinkType = {
|
|
||||||
InternalLink:0,
|
InternalLink:0,
|
||||||
WebLink: 1
|
WebLink: 1
|
||||||
},
|
},
|
||||||
|
@ -105,11 +104,15 @@ define([
|
||||||
var $target = $(e.currentTarget);
|
var $target = $(e.currentTarget);
|
||||||
|
|
||||||
if ($target && $target.prop('id') === 'add-link') {
|
if ($target && $target.prop('id') === 'add-link') {
|
||||||
|
_linkType = c_oHyperlinkType.WebLink;
|
||||||
|
_slideLink = _slideNum = 0;
|
||||||
|
_isDisplayChanged = false;
|
||||||
var text = this.api.can_AddHyperlink();
|
var text = this.api.can_AddHyperlink();
|
||||||
if (text !== false) {
|
if (text !== false) {
|
||||||
_linkObject = new Asc.CHyperlinkProperty();
|
$('#add-link-display input').val((text !== null) ? text : this.textDefault);
|
||||||
_linkObject.put_Text(text);
|
$('#add-link-display').toggleClass('disabled', text === null);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initSettings();
|
this.initSettings();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -123,11 +126,7 @@ define([
|
||||||
_slidesCount = me.api.getCountPages();
|
_slidesCount = me.api.getCountPages();
|
||||||
$('#page-addlink-slidenumber input').val([_slideLink]);
|
$('#page-addlink-slidenumber input').val([_slideLink]);
|
||||||
$('#addlink-slide-number .item-after label').text(_slideNum+1);
|
$('#addlink-slide-number .item-after label').text(_slideNum+1);
|
||||||
} else if (_linkObject) {
|
} else {
|
||||||
var text = _linkObject.get_Text();
|
|
||||||
$('#add-link-display input').val((text!==null) ? text : me.textDefault);
|
|
||||||
$('#add-link-display').toggleClass('disabled',text===null);
|
|
||||||
|
|
||||||
$('#add-link-type .item-after').text((_linkType==c_oHyperlinkType.WebLink) ? me.textExternalLink : me.textInternalLink);
|
$('#add-link-type .item-after').text((_linkType==c_oHyperlinkType.WebLink) ? me.textExternalLink : me.textInternalLink);
|
||||||
$('#add-link-url')[(_linkType==c_oHyperlinkType.WebLink) ? 'show' : 'hide']();
|
$('#add-link-url')[(_linkType==c_oHyperlinkType.WebLink) ? 'show' : 'hide']();
|
||||||
$('#add-link-number')[(_linkType==c_oHyperlinkType.WebLink) ? 'hide' : 'show']();
|
$('#add-link-number')[(_linkType==c_oHyperlinkType.WebLink) ? 'hide' : 'show']();
|
||||||
|
|
|
@ -157,7 +157,7 @@ define([
|
||||||
editors.push({
|
editors.push({
|
||||||
caption: me.textHyperlink,
|
caption: me.textHyperlink,
|
||||||
id: 'edit-link',
|
id: 'edit-link',
|
||||||
layout: PE.getController('EditHyperlink').getView('EditHyperlink').rootLayout()
|
layout: PE.getController('EditLink').getView('EditLink').rootLayout()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@ define([
|
||||||
_settings.push('shape');
|
_settings.push('shape');
|
||||||
no_text = false;
|
no_text = false;
|
||||||
} else if (Asc.c_oAscTypeSelectElement.Hyperlink == type) {
|
} else if (Asc.c_oAscTypeSelectElement.Hyperlink == type) {
|
||||||
// _settings.push('hyperlink');
|
_settings.push('hyperlink');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!no_text)
|
if (!no_text)
|
||||||
|
|
362
apps/presentationeditor/mobile/app/controller/edit/EditLink.js
Normal file
362
apps/presentationeditor/mobile/app/controller/edit/EditLink.js
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* (c) Copyright Ascensio System Limited 2010-2016
|
||||||
|
*
|
||||||
|
* This program is a free software product. You can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||||
|
* version 3 as published by the Free Software Foundation. In accordance with
|
||||||
|
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||||
|
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||||
|
* of any third-party rights.
|
||||||
|
*
|
||||||
|
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||||
|
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
*
|
||||||
|
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||||
|
* EU, LV-1021.
|
||||||
|
*
|
||||||
|
* The interactive user interfaces in modified source and object code versions
|
||||||
|
* of the Program must display Appropriate Legal Notices, as required under
|
||||||
|
* Section 5 of the GNU AGPL version 3.
|
||||||
|
*
|
||||||
|
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||||
|
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||||
|
* grant you any rights under trademark law for use of our trademarks.
|
||||||
|
*
|
||||||
|
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||||
|
* well as technical writing content are licensed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||||
|
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EditLink.js
|
||||||
|
* Presentation Editor
|
||||||
|
*
|
||||||
|
* Created by Julia Radzhabova on 12/06/16
|
||||||
|
* Copyright (c) 2016 Ascensio System SIA. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
define([
|
||||||
|
'core',
|
||||||
|
'presentationeditor/mobile/app/view/edit/EditLink'
|
||||||
|
], function (core) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
PE.Controllers.EditLink = Backbone.Controller.extend(_.extend((function() {
|
||||||
|
// Private
|
||||||
|
var _stack = [],
|
||||||
|
_linkObject = undefined,
|
||||||
|
c_oHyperlinkType = {
|
||||||
|
InternalLink:0,
|
||||||
|
WebLink: 1
|
||||||
|
},
|
||||||
|
c_oSlideLink = {
|
||||||
|
Next: 0,
|
||||||
|
Previouse: 1,
|
||||||
|
Last: 2,
|
||||||
|
First: 3,
|
||||||
|
Num: 4
|
||||||
|
},
|
||||||
|
_linkType = c_oHyperlinkType.WebLink,
|
||||||
|
_slideLink = 0,
|
||||||
|
_slideNum = 0,
|
||||||
|
_slidesCount = 0,
|
||||||
|
_isDisplayChanged = false;
|
||||||
|
|
||||||
|
return {
|
||||||
|
models: [],
|
||||||
|
collections: [],
|
||||||
|
views: [
|
||||||
|
'EditLink'
|
||||||
|
],
|
||||||
|
|
||||||
|
initialize: function () {
|
||||||
|
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
|
||||||
|
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
|
||||||
|
|
||||||
|
this.addListeners({
|
||||||
|
'EditLink': {
|
||||||
|
'page:show' : this.onPageShow
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
uiApp.onPageBack('editlink-type editlink-slidenumber', function (page) {
|
||||||
|
me.initSettings();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
setApi: function (api) {
|
||||||
|
var me = this;
|
||||||
|
me.api = api;
|
||||||
|
|
||||||
|
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
|
||||||
|
},
|
||||||
|
|
||||||
|
onLaunch: function () {
|
||||||
|
this.createView('EditLink').render();
|
||||||
|
},
|
||||||
|
|
||||||
|
initEvents: function () {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
$('#edit-link-edit').single('click', _.bind(me.onEditLink, me));
|
||||||
|
$('#edit-link-remove').single('click', _.bind(me.onRemoveLink, me));
|
||||||
|
},
|
||||||
|
|
||||||
|
categoryShow: function (e) {
|
||||||
|
var $target = $(e.currentTarget);
|
||||||
|
|
||||||
|
if ($target && $target.prop('id') === 'edit-link' && _linkObject) {
|
||||||
|
var url = _linkObject.get_Value();
|
||||||
|
if (url===null || url===undefined || url=='' )
|
||||||
|
_linkType = c_oHyperlinkType.WebLink;
|
||||||
|
else {
|
||||||
|
var indAction = url.indexOf("ppaction://hlink");
|
||||||
|
if (0 == indAction) {
|
||||||
|
if (url == "ppaction://hlinkshowjump?jump=firstslide") {
|
||||||
|
_slideLink = 2;
|
||||||
|
} else if (url == "ppaction://hlinkshowjump?jump=lastslide") {
|
||||||
|
_slideLink = 3;
|
||||||
|
}
|
||||||
|
else if (url == "ppaction://hlinkshowjump?jump=nextslide") {
|
||||||
|
_slideLink = 0;
|
||||||
|
}
|
||||||
|
else if (url == "ppaction://hlinkshowjump?jump=previousslide") {
|
||||||
|
_slideLink = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_slideLink = 4;
|
||||||
|
_slidesCount = this.api.getCountPages();
|
||||||
|
var mask = "ppaction://hlinksldjumpslide",
|
||||||
|
indSlide = url.indexOf(mask);
|
||||||
|
if (0 == indSlide) {
|
||||||
|
_slideNum = parseInt(url.substring(mask.length));
|
||||||
|
if (_slideNum < 0) _slideNum = 0;
|
||||||
|
if (_slideNum >= _slidesCount) _slideNum = _slidesCount - 1;
|
||||||
|
} else
|
||||||
|
_slideNum = 0;
|
||||||
|
}
|
||||||
|
_linkType = c_oHyperlinkType.InternalLink;
|
||||||
|
} else {
|
||||||
|
_linkType = c_oHyperlinkType.WebLink;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var text = _linkObject.get_Text();
|
||||||
|
if (text !== false) {
|
||||||
|
$('#edit-link-display input').val((text !== null) ? text : this.textDefault);
|
||||||
|
$('#edit-link-display').toggleClass('disabled', text === null);
|
||||||
|
}
|
||||||
|
if (_linkType==c_oHyperlinkType.WebLink) {
|
||||||
|
var value = _linkObject.get_Value();
|
||||||
|
$('#edit-link-url input').val(value ? [value.replace(new RegExp(" ", 'g'), "%20")] : '');
|
||||||
|
}
|
||||||
|
$('#edit-link-tip input').val([_linkObject.get_ToolTip()]);
|
||||||
|
|
||||||
|
this.initSettings();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
initSettings: function (pageId) {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
if (pageId == '#editlink-type') {
|
||||||
|
$('#page-editlink-type input').val([_linkType]);
|
||||||
|
} else if (pageId == '#editlink-slidenumber') {
|
||||||
|
_slidesCount = me.api.getCountPages();
|
||||||
|
$('#page-editlink-slidenumber input').val([_slideLink]);
|
||||||
|
$('#editlink-slide-number .item-after label').text(_slideNum+1);
|
||||||
|
} else {
|
||||||
|
$('#edit-link-type .item-after').text((_linkType==c_oHyperlinkType.WebLink) ? me.textExternalLink : me.textInternalLink);
|
||||||
|
$('#edit-link-url')[(_linkType==c_oHyperlinkType.WebLink) ? 'show' : 'hide']();
|
||||||
|
$('#edit-link-number')[(_linkType==c_oHyperlinkType.WebLink) ? 'hide' : 'show']();
|
||||||
|
|
||||||
|
if (_linkType==c_oHyperlinkType.WebLink) {
|
||||||
|
_.delay(function () {
|
||||||
|
$('.page[data-page=editlink-link] input[type=url]').focus();
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
var slidename = '';
|
||||||
|
switch (_slideLink) {
|
||||||
|
case 0:
|
||||||
|
slidename = me.textNext;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
slidename = me.textPrev;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
slidename = me.textFirst;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
slidename = me.textLast;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
slidename = me.textSlide + ' ' + (_slideNum+1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$('#edit-link-number .item-after').text(slidename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#edit-link-edit').toggleClass('disabled', (_linkType==c_oHyperlinkType.WebLink) && _.isEmpty($('#edit-link-url input').val()));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onPageShow: function (view, pageId) {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
$('#page-editlink-type li').single('click', _.buffered(me.onLinkType, 100, me));
|
||||||
|
$('#page-editlink-slidenumber li').single('click', _.buffered(me.onSlideLink, 100, me));
|
||||||
|
$('#editlink-slide-number .button').single('click',_.buffered(me.onSlideNumber, 100, me));
|
||||||
|
$('#edit-link-display input[type="text"]').single('input', _.bind(function(e) {
|
||||||
|
_isDisplayChanged = true;
|
||||||
|
}, this));
|
||||||
|
me.initSettings(pageId);
|
||||||
|
},
|
||||||
|
|
||||||
|
// Handlers
|
||||||
|
|
||||||
|
onEditLink: function () {
|
||||||
|
var me = this,
|
||||||
|
display = $('#edit-link-display input').val(),
|
||||||
|
tip = $('#edit-link-tip input').val(),
|
||||||
|
props = new Asc.CHyperlinkProperty(),
|
||||||
|
def_display = '';
|
||||||
|
|
||||||
|
if (_linkType==c_oHyperlinkType.WebLink) {
|
||||||
|
var url = $('#edit-link-url input').val(),
|
||||||
|
urltype = me.api.asc_getUrlType($.trim(url)),
|
||||||
|
isEmail = (urltype == 2);
|
||||||
|
if (urltype < 1) {
|
||||||
|
uiApp.alert(me.txtNotUrl);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
url = url.replace(/^\s+|\s+$/g,'');
|
||||||
|
if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) )
|
||||||
|
url = (isEmail ? 'mailto:' : 'http://' ) + url;
|
||||||
|
url = url.replace(new RegExp("%20",'g')," ");
|
||||||
|
|
||||||
|
props.put_Value( url );
|
||||||
|
props.put_ToolTip(tip);
|
||||||
|
def_display = url;
|
||||||
|
} else {
|
||||||
|
var url = "ppaction://hlink";
|
||||||
|
var slidetip = '';
|
||||||
|
switch (_slideLink) {
|
||||||
|
case 0:
|
||||||
|
url = url + "showjump?jump=nextslide";
|
||||||
|
slidetip = this.textNext;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
url = url + "showjump?jump=previousslide";
|
||||||
|
slidetip = this.textPrev;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
url = url + "showjump?jump=firstslide";
|
||||||
|
slidetip = this.textFirst;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
url = url + "showjump?jump=lastslide";
|
||||||
|
slidetip = this.textLast;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
url = url + "sldjumpslide" + _slideNum;
|
||||||
|
slidetip = this.textSlide + ' ' + (_slideNum+1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
props.put_Value( url );
|
||||||
|
props.put_ToolTip(_.isEmpty(tip) ? slidetip : tip);
|
||||||
|
def_display = slidetip;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$('#edit-link-display').hasClass('disabled') && (_isDisplayChanged || _.isEmpty(display))) {
|
||||||
|
props.put_Text(_.isEmpty(display) ? def_display : display);
|
||||||
|
} else
|
||||||
|
props.put_Text(null);
|
||||||
|
|
||||||
|
me.api.change_Hyperlink(props);
|
||||||
|
|
||||||
|
PE.getController('EditContainer').hideModal();
|
||||||
|
},
|
||||||
|
|
||||||
|
onRemoveLink: function () {
|
||||||
|
this.api && this.api.remove_Hyperlink();
|
||||||
|
PE.getController('EditContainer').hideModal();
|
||||||
|
},
|
||||||
|
|
||||||
|
onLinkType: function (e) {
|
||||||
|
var $target = $(e.currentTarget).find('input');
|
||||||
|
|
||||||
|
if ($target && this.api) {
|
||||||
|
_linkType = parseFloat($target.prop('value'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onSlideLink: function (e) {
|
||||||
|
var $target = $(e.currentTarget).find('input');
|
||||||
|
|
||||||
|
if ($target && this.api) {
|
||||||
|
_slideLink = parseFloat($target.prop('value'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onSlideNumber: function (e) {
|
||||||
|
var $button = $(e.currentTarget),
|
||||||
|
slide = _slideNum;
|
||||||
|
|
||||||
|
if ($button.hasClass('decrement')) {
|
||||||
|
slide = Math.max(0, --slide);
|
||||||
|
} else {
|
||||||
|
slide = Math.min(_slidesCount-1, ++slide);
|
||||||
|
}
|
||||||
|
_slideNum = slide;
|
||||||
|
$('#editlink-slide-number .item-after label').text(slide+1);
|
||||||
|
},
|
||||||
|
|
||||||
|
// API handlers
|
||||||
|
|
||||||
|
onApiFocusObject: function (objects) {
|
||||||
|
_stack = objects;
|
||||||
|
|
||||||
|
var links = [];
|
||||||
|
|
||||||
|
_.each(_stack, function (object) {
|
||||||
|
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink) {
|
||||||
|
links.push(object);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (links.length > 0) {
|
||||||
|
var object = links[links.length - 1]; // get top
|
||||||
|
_linkObject = object.get_ObjectValue();
|
||||||
|
} else {
|
||||||
|
_linkObject = undefined;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
|
||||||
|
_closeIfNeed: function () {
|
||||||
|
if (!this._isImageInStack()) {
|
||||||
|
PE.getController('EditContainer').hideModal();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"',
|
||||||
|
textDefault: 'Selected text',
|
||||||
|
textNext: 'Next Slide',
|
||||||
|
textPrev: 'Previous Slide',
|
||||||
|
textFirst: 'First Slide',
|
||||||
|
textLast: 'Last Slide',
|
||||||
|
textSlide: 'Slide',
|
||||||
|
textExternalLink: 'External Link',
|
||||||
|
textInternalLink: 'Slide in this Presentation'
|
||||||
|
};
|
||||||
|
})(), PE.Controllers.EditLink || {}))
|
||||||
|
});
|
175
apps/presentationeditor/mobile/app/template/EditLink.template
Normal file
175
apps/presentationeditor/mobile/app/template/EditLink.template
Normal file
|
@ -0,0 +1,175 @@
|
||||||
|
<!-- Root view -->
|
||||||
|
<div id="edit-link-root">
|
||||||
|
<div class="list-block">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div id="edit-link-type" class="item-content item-link">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textLinkType %></div>
|
||||||
|
<div class="item-after"><%= scope.textExternalLink %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div id="edit-link-url" class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label"><%= scope.textLink %></div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="url" placeholder="<%= scope.textLink %>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div id="edit-link-number" class="item-content item-link">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label"><%= scope.textLinkSlide %></div>
|
||||||
|
<div class="item-after"><%= scope.textNext %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div id="edit-link-display" class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label"><%= scope.textDisplay %></div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" placeholder="<%= scope.textDisplay %>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div id="edit-link-tip" class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label"><%= scope.textTip %></div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" placeholder="<%= scope.textTip %>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="list-block">
|
||||||
|
<% if (android) { %>
|
||||||
|
<a href="#" id="edit-link-edit" class="button button-raised button-fill disabled" style="margin: 20px 16px;"><%= scope.textEdit %></a>
|
||||||
|
<a href="#" id="edit-link-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemove %></a>
|
||||||
|
<% } else { %>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="#" id="edit-link-edit" class="list-button item-link disabled" style="text-align: center;"><%= scope.textEdit %></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" id="edit-link-remove" class="list-button item-link" style="text-align: center; color: #f00"><%= scope.textRemove %></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Link Type view -->
|
||||||
|
<div id="editlink-type">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||||
|
<div class="center sliding"><%= scope.textLinkType %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="page" id="page-editlink-type" data-page="editlink-type">
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="list-block">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-type" value="1">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textExternalLink %></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-type" value="0">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textInternalLink %></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Slide Number view -->
|
||||||
|
<div id="editlink-slidenumber">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner">
|
||||||
|
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||||
|
<div class="center sliding"><%= scope.textLinkSlide %></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="page" id="page-editlink-slidenumber" data-page="editlink-slidenumber">
|
||||||
|
<div class="page-content">
|
||||||
|
<div class="list-block">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-slide" value="0">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textNext %></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-slide" value="1">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textPrev %></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-slide" value="2">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textFirst %></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-slide" value="3">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textLast %></div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
<li id="editlink-slide-number">
|
||||||
|
<label class="label-radio item-content">
|
||||||
|
<input type="radio" name="editlink-slide" value="4">
|
||||||
|
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title"><%= scope.textNumber %></div>
|
||||||
|
<div class="item-after splitter">
|
||||||
|
<% if (!android) { %><label></label><% } %>
|
||||||
|
<p class="buttons-row">
|
||||||
|
<span class="button decrement"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
|
||||||
|
<% if (android) { %><label></label><% } %>
|
||||||
|
<span class="button increment"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -68,8 +68,6 @@ define([
|
||||||
|
|
||||||
$('#add-link-number').single('click', _.bind(me.showPageNumber, me));
|
$('#add-link-number').single('click', _.bind(me.showPageNumber, me));
|
||||||
$('#add-link-type').single('click', _.bind(me.showLinkType, me));
|
$('#add-link-type').single('click', _.bind(me.showLinkType, me));
|
||||||
|
|
||||||
me.initControls();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Render layout
|
// Render layout
|
||||||
|
@ -93,10 +91,6 @@ define([
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|
||||||
initControls: function () {
|
|
||||||
//
|
|
||||||
},
|
|
||||||
|
|
||||||
showPage: function (templateId) {
|
showPage: function (templateId) {
|
||||||
var rootView = PE.getController('AddContainer').rootView;
|
var rootView = PE.getController('AddContainer').rootView;
|
||||||
|
|
||||||
|
@ -139,8 +133,6 @@ define([
|
||||||
textFirst: 'First Slide',
|
textFirst: 'First Slide',
|
||||||
textLast: 'Last Slide',
|
textLast: 'Last Slide',
|
||||||
textNumber: 'Slide Number'
|
textNumber: 'Slide Number'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})(), PE.Views.AddLink || {}))
|
})(), PE.Views.AddLink || {}))
|
||||||
});
|
});
|
141
apps/presentationeditor/mobile/app/view/edit/EditLink.js
Normal file
141
apps/presentationeditor/mobile/app/view/edit/EditLink.js
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* (c) Copyright Ascensio System Limited 2010-2016
|
||||||
|
*
|
||||||
|
* This program is a free software product. You can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||||
|
* version 3 as published by the Free Software Foundation. In accordance with
|
||||||
|
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||||
|
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||||
|
* of any third-party rights.
|
||||||
|
*
|
||||||
|
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||||
|
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
*
|
||||||
|
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||||
|
* EU, LV-1021.
|
||||||
|
*
|
||||||
|
* The interactive user interfaces in modified source and object code versions
|
||||||
|
* of the Program must display Appropriate Legal Notices, as required under
|
||||||
|
* Section 5 of the GNU AGPL version 3.
|
||||||
|
*
|
||||||
|
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||||
|
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||||
|
* grant you any rights under trademark law for use of our trademarks.
|
||||||
|
*
|
||||||
|
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||||
|
* well as technical writing content are licensed under the terms of the
|
||||||
|
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||||
|
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EditLink.js
|
||||||
|
* Presentation Editor
|
||||||
|
*
|
||||||
|
* Created by Julia Radzhabova on 12/06/16
|
||||||
|
* Copyright (c) 2016 Ascensio System SIA. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
define([
|
||||||
|
'text!presentationeditor/mobile/app/template/EditLink.template',
|
||||||
|
'jquery',
|
||||||
|
'underscore',
|
||||||
|
'backbone'
|
||||||
|
], function (editTemplate, $, _, Backbone) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
PE.Views.EditLink = Backbone.View.extend(_.extend((function() {
|
||||||
|
// private
|
||||||
|
|
||||||
|
return {
|
||||||
|
// el: '.view-main',
|
||||||
|
|
||||||
|
template: _.template(editTemplate),
|
||||||
|
|
||||||
|
events: {
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize: function () {
|
||||||
|
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
|
||||||
|
},
|
||||||
|
|
||||||
|
initEvents: function () {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
$('#edit-link-number').single('click', _.bind(me.showPageNumber, me));
|
||||||
|
$('#edit-link-type').single('click', _.bind(me.showLinkType, me));
|
||||||
|
},
|
||||||
|
|
||||||
|
// Render layout
|
||||||
|
render: function () {
|
||||||
|
this.layout = $('<div/>').append(this.template({
|
||||||
|
android : Common.SharedSettings.get('android'),
|
||||||
|
phone : Common.SharedSettings.get('phone'),
|
||||||
|
scope : this
|
||||||
|
}));
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
rootLayout: function () {
|
||||||
|
if (this.layout) {
|
||||||
|
return this.layout
|
||||||
|
.find('#edit-link-root')
|
||||||
|
.html();
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
},
|
||||||
|
|
||||||
|
showPage: function (templateId) {
|
||||||
|
var rootView = PE.getController('EditContainer').rootView;
|
||||||
|
|
||||||
|
if (rootView && this.layout) {
|
||||||
|
var $content = this.layout.find(templateId);
|
||||||
|
|
||||||
|
// Android fix for navigation
|
||||||
|
if (Framework7.prototype.device.android) {
|
||||||
|
$content.find('.page').append($content.find('.navbar'));
|
||||||
|
}
|
||||||
|
|
||||||
|
rootView.router.load({
|
||||||
|
content: $content.html()
|
||||||
|
});
|
||||||
|
|
||||||
|
this.fireEvent('page:show', [this, templateId]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
showLinkType: function () {
|
||||||
|
this.showPage('#editlink-type');
|
||||||
|
},
|
||||||
|
|
||||||
|
showPageNumber: function () {
|
||||||
|
this.showPage('#editlink-slidenumber');
|
||||||
|
},
|
||||||
|
|
||||||
|
textLinkType: 'Link Type',
|
||||||
|
textExternalLink: 'External Link',
|
||||||
|
textInternalLink: 'Slide in this Presentation',
|
||||||
|
textLink: 'Link',
|
||||||
|
textLinkSlide: 'Link to',
|
||||||
|
textBack: 'Back',
|
||||||
|
textAddLink: 'Add Link',
|
||||||
|
textDisplay: 'Display',
|
||||||
|
textTip: 'Screen Tip',
|
||||||
|
textInsert: 'Insert',
|
||||||
|
textNext: 'Next Slide',
|
||||||
|
textPrev: 'Previous Slide',
|
||||||
|
textFirst: 'First Slide',
|
||||||
|
textLast: 'Last Slide',
|
||||||
|
textNumber: 'Slide Number',
|
||||||
|
textEdit: 'Edit Link',
|
||||||
|
textRemove: 'Remove Link'
|
||||||
|
}
|
||||||
|
})(), PE.Views.EditLink || {}))
|
||||||
|
});
|
|
@ -158,7 +158,7 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
// Syncronize focus with api
|
// Syncronize focus with api
|
||||||
$(document.body).on('focus', 'input, textarea:not(#ce-cell-content)', function(e) {
|
$(document.body).on('focus', 'input, textarea:not(#ce-cell-content)', function(e) {
|
||||||
if (this.isAppDisabled === true) return;
|
if (me.isAppDisabled === true) return;
|
||||||
|
|
||||||
if (e && e.target && !/area_id/.test(e.target.id)) {
|
if (e && e.target && !/area_id/.test(e.target.id)) {
|
||||||
if (/msg-reply/.test(e.target.className))
|
if (/msg-reply/.test(e.target.className))
|
||||||
|
@ -167,7 +167,8 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document.body).on('blur', 'input, textarea', function(e) {
|
$(document.body).on('blur', 'input, textarea', function(e) {
|
||||||
if (this.isAppDisabled === true) return;
|
if (me.isAppDisabled === true || me.isFrameClosed) return;
|
||||||
|
|
||||||
if (!me.isModalShowed && !(me.loadMask && me.loadMask.isVisible())) {
|
if (!me.isModalShowed && !(me.loadMask && me.loadMask.isVisible())) {
|
||||||
if (!e.relatedTarget ||
|
if (!e.relatedTarget ||
|
||||||
!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* Check if focus in combobox goes from input to it's menu button or menu items */
|
!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* Check if focus in combobox goes from input to it's menu button or menu items */
|
||||||
|
@ -284,6 +285,8 @@ define([
|
||||||
|
|
||||||
if (this.appOptions.location == 'us' || this.appOptions.location == 'ca')
|
if (this.appOptions.location == 'us' || this.appOptions.location == 'ca')
|
||||||
Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
|
Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
|
||||||
|
|
||||||
|
this.isFrameClosed = (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge);
|
||||||
},
|
},
|
||||||
|
|
||||||
loadDocument: function(data) {
|
loadDocument: function(data) {
|
||||||
|
@ -1617,6 +1620,7 @@ define([
|
||||||
break;
|
break;
|
||||||
case 'queryClose':
|
case 'queryClose':
|
||||||
if ($('body .asc-window:visible').length === 0) {
|
if ($('body .asc-window:visible').length === 0) {
|
||||||
|
this.isFrameClosed = true;
|
||||||
this.api.asc_closeCellEditor();
|
this.api.asc_closeCellEditor();
|
||||||
Common.Gateway.internalMessage('canClose', {mr:data.data.mr, answer: true});
|
Common.Gateway.internalMessage('canClose', {mr:data.data.mr, answer: true});
|
||||||
}
|
}
|
||||||
|
@ -1634,6 +1638,7 @@ define([
|
||||||
setChartData: function(chart) {
|
setChartData: function(chart) {
|
||||||
if (typeof chart === 'object' && this.api) {
|
if (typeof chart === 'object' && this.api) {
|
||||||
this.api.asc_addChartDrawingObject(chart);
|
this.api.asc_addChartDrawingObject(chart);
|
||||||
|
this.isFrameClosed = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1656,6 +1661,7 @@ define([
|
||||||
setMergeData: function(merge) {
|
setMergeData: function(merge) {
|
||||||
if (typeof merge === 'object' && this.api) {
|
if (typeof merge === 'object' && this.api) {
|
||||||
this.api.asc_setData(merge);
|
this.api.asc_setData(merge);
|
||||||
|
this.isFrameClosed = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ define([
|
||||||
var t = this, _options = {};
|
var t = this, _options = {};
|
||||||
|
|
||||||
_.extend(_options, {
|
_.extend(_options, {
|
||||||
width : 500,
|
width : 501,
|
||||||
height : 230,
|
height : 230,
|
||||||
contentWidth : 180,
|
contentWidth : 180,
|
||||||
header : true,
|
header : true,
|
||||||
|
@ -478,7 +478,7 @@ define([
|
||||||
var t = this, _options = {};
|
var t = this, _options = {};
|
||||||
|
|
||||||
_.extend(_options, {
|
_.extend(_options, {
|
||||||
width : 448,
|
width : 450,
|
||||||
height : 265,
|
height : 265,
|
||||||
contentWidth : 400,
|
contentWidth : 400,
|
||||||
header : false,
|
header : false,
|
||||||
|
|
|
@ -524,7 +524,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -543,7 +543,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-high-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-high-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-high-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-high-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -558,7 +558,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-low-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-low-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-low-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-low-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -573,7 +573,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-negative-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-negative-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-negative-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-negative-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -588,7 +588,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-first-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-first-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-first-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-first-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -603,7 +603,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-last-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-last-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-last-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-last-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -618,7 +618,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="spark-markers-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="spark-markers-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="spark-markers-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="spark-markers-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -1263,8 +1263,6 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
var changed = false,
|
var changed = false,
|
||||||
value = this.cmbEmptyCells.getValue();
|
value = this.cmbEmptyCells.getValue();
|
||||||
if (rawData.type !== Asc.c_oAscSparklineType.Line && this._arrEmptyCells.length>2) {
|
if (rawData.type !== Asc.c_oAscSparklineType.Line && this._arrEmptyCells.length>2) {
|
||||||
if (value == Asc.c_oAscEDispBlanksAs.Span)
|
|
||||||
value = Asc.c_oAscEDispBlanksAs.Gap;
|
|
||||||
this._arrEmptyCells.pop();
|
this._arrEmptyCells.pop();
|
||||||
changed = true;
|
changed = true;
|
||||||
} else if (rawData.type == Asc.c_oAscSparklineType.Line && this._arrEmptyCells.length<3) {
|
} else if (rawData.type == Asc.c_oAscSparklineType.Line && this._arrEmptyCells.length<3) {
|
||||||
|
@ -1273,9 +1271,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
}
|
}
|
||||||
if (changed) {
|
if (changed) {
|
||||||
this.cmbEmptyCells.setData(this._arrEmptyCells);
|
this.cmbEmptyCells.setData(this._arrEmptyCells);
|
||||||
this.cmbEmptyCells.setValue(value);
|
this.cmbEmptyCells.setValue((rawData.type !== Asc.c_oAscSparklineType.Line && value==Asc.c_oAscEDispBlanksAs.Span) ? this.textEmptyLine : value);
|
||||||
if (this._changedProps)
|
|
||||||
this._changedProps.asc_setDisplayEmpty(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateSparkStyles(this.chartSettings.asc_getStyles());
|
this.updateSparkStyles(this.chartSettings.asc_getStyles());
|
||||||
|
@ -1360,7 +1356,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ChartSettingsDlg.template'
|
||||||
if (this._state.SparkType !== Asc.c_oAscSparklineType.Line)
|
if (this._state.SparkType !== Asc.c_oAscSparklineType.Line)
|
||||||
this._arrEmptyCells.pop();
|
this._arrEmptyCells.pop();
|
||||||
this.cmbEmptyCells.setData(this._arrEmptyCells);
|
this.cmbEmptyCells.setData(this._arrEmptyCells);
|
||||||
this.cmbEmptyCells.setValue(props.asc_getDisplayEmpty());
|
|
||||||
|
var value = props.asc_getDisplayEmpty();
|
||||||
|
this.cmbEmptyCells.setValue((this._state.SparkType !== Asc.c_oAscSparklineType.Line && value==Asc.c_oAscEDispBlanksAs.Span) ? this.textEmptyLine : value);
|
||||||
|
|
||||||
this.chShowEmpty.setValue(props.asc_getDisplayHidden(), true);
|
this.chShowEmpty.setValue(props.asc_getDisplayHidden(), true);
|
||||||
this.chShowAxis.setValue(props.asc_getDisplayXAxis(), true);
|
this.chShowAxis.setValue(props.asc_getDisplayXAxis(), true);
|
||||||
|
|
|
@ -1445,7 +1445,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1465,7 +1465,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1484,7 +1484,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1503,7 +1503,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1522,7 +1522,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -264,7 +264,7 @@ define([
|
||||||
menuAlign: 'tl-tr',
|
menuAlign: 'tl-tr',
|
||||||
cls: 'color-tab',
|
cls: 'color-tab',
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="id-tab-menu-color" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="id-tab-menu-color" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="id-tab-menu-new-color" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="id-tab-menu-new-color" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
|
@ -1461,7 +1461,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1480,7 +1480,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1500,7 +1500,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1519,7 +1519,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1538,7 +1538,7 @@ define([
|
||||||
style: "width:45px;",
|
style: "width:45px;",
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -283,7 +283,7 @@ define([
|
||||||
lock : [_set.selImage, _set.editFormula, _set.selRange, _set.coAuth, _set.coAuthText, _set.lostConnect],
|
lock : [_set.selImage, _set.editFormula, _set.selRange, _set.coAuth, _set.coAuthText, _set.lostConnect],
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -306,7 +306,7 @@ define([
|
||||||
lock : [_set.selImage, _set.editCell, _set.coAuth, _set.coAuthText, _set.lostConnect],
|
lock : [_set.selImage, _set.editCell, _set.coAuth, _set.coAuthText, _set.lostConnect],
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
items: [
|
items: [
|
||||||
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||||
{ template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
{ template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -1523,7 +1523,7 @@ define([
|
||||||
menu : new Common.UI.Menu({
|
menu : new Common.UI.Menu({
|
||||||
menuAlign : 'tl-tr',
|
menuAlign : 'tl-tr',
|
||||||
items : [
|
items : [
|
||||||
{ template: _.template('<div id="id-toolbar-menu-bordercolor" style="width: 165px; height: 220px; margin: 10px;"></div>'), stopPropagation: true },
|
{ template: _.template('<div id="id-toolbar-menu-bordercolor" style="width: 169px; height: 220px; margin: 10px;"></div>'), stopPropagation: true },
|
||||||
{ template: _.template('<a id="id-toolbar-menu-new-bordercolor" style="padding-left:12px;">' + this.textNewColor + '</a>'), stopPropagation: true }
|
{ template: _.template('<a id="id-toolbar-menu-new-bordercolor" style="padding-left:12px;">' + this.textNewColor + '</a>'), stopPropagation: true }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue