Merge branch 'develop' into feature/compare

This commit is contained in:
Julia Radzhabova 2019-10-15 12:46:57 +03:00
commit a9c2c7a3e6
20 changed files with 119 additions and 89 deletions

View file

@ -739,8 +739,14 @@
} }
} }
var userAgent = navigator.userAgent.toLowerCase(),
check = function(regex){ return regex.test(userAgent); },
isIE = !check(/opera/) && (check(/msie/) || check(/trident/) || check(/edge/)),
isChrome = !isIE && check(/\bchrome\b/),
isSafari_mobile = !isIE && !isChrome && check(/safari/) && (navigator.maxTouchPoints>0);
path += app + "/"; path += app + "/";
path += config.type === "mobile" path += (config.type === "mobile" || isSafari_mobile)
? "mobile" ? "mobile"
: config.type === "embedded" : config.type === "embedded"
? "embed" ? "embed"

View file

@ -430,7 +430,7 @@ define([
}, },
addItemToRecent: function(record, silent) { addItemToRecent: function(record, silent) {
if (this.recent<1) return; if (!record || this.recent<1) return;
var font = this.store.findWhere({name: record.get('name'),type:FONT_TYPE_RECENT}); var font = this.store.findWhere({name: record.get('name'),type:FONT_TYPE_RECENT});
font && this.store.remove(font); font && this.store.remove(font);

View file

@ -391,12 +391,10 @@ define([
}, this.bar), }, this.bar),
mousedown: $.proxy(function (e) { mousedown: $.proxy(function (e) {
if (this.bar.options.draggable && !_.isUndefined(dragHelper) && (3 !== e.which)) { if (this.bar.options.draggable && !_.isUndefined(dragHelper) && (3 !== e.which)) {
if (!tab.isLockTheDrag) { if (this.bar.selectTabs.length > 1) {
if (this.bar.selectTabs.length > 1) { dragHelper.setHookTabs(e, this.bar, this.bar.selectTabs);
dragHelper.setHookTabs(e, this.bar, this.bar.selectTabs); } else {
} else { dragHelper.setHook(e, this.bar, tab);
dragHelper.setHook(e, this.bar, tab);
}
} }
} }
}, this) }, this)

View file

@ -155,8 +155,8 @@
else else
$scrollbarYRail.css({top: $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: scrollbarYRailHeight, display: scrollbarYActive ? "inherit": "none"}); $scrollbarYRail.css({top: $this.scrollTop(), right: scrollbarYRight - $this.scrollLeft(), height: scrollbarYRailHeight, display: scrollbarYActive ? "inherit": "none"});
$scrollbarX.css({left: scrollbarXLeft, width: scrollbarXWidth}); $scrollbarX && $scrollbarX.css({left: scrollbarXLeft, width: scrollbarXWidth});
$scrollbarY.css({top: scrollbarYTop, height: scrollbarYHeight}); $scrollbarY && $scrollbarY.css({top: scrollbarYTop, height: scrollbarYHeight});
}; };
var updateBarSizeAndPosition = function () { var updateBarSizeAndPosition = function () {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -24,7 +24,7 @@
.loadmask > .brendpanel { .loadmask > .brendpanel {
width: 100%; width: 100%;
height: 56px; min-height: 32px;
background: #446995; background: #446995;
} }
@ -81,11 +81,6 @@
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar li { .loadmask > .sktoolbar li {
@ -235,6 +230,14 @@
<div id="viewport"></div> <div id="viewport"></div>
<script> <script>
var params = getUrlParams(),
view = params["mode"] == 'view';
if (view) {
document.querySelector('.brendpanel > :nth-child(2)').remove();
document.querySelector('.sktoolbar').remove();
}
if (stopLoading) { if (stopLoading) {
document.body.removeChild(document.getElementById('loading-mask')); document.body.removeChild(document.getElementById('loading-mask'));
} else { } else {

View file

@ -221,6 +221,12 @@
<div id="viewport"></div> <div id="viewport"></div>
<script> <script>
var params = getUrlParams(),
view = params["mode"] == 'view';
if (view) {
document.querySelector('.brendpanel > :nth-child(2)').remove();
document.querySelector('.sktoolbar').remove();
}
if (stopLoading) { if (stopLoading) {
document.body.removeChild(document.getElementById('loading-mask')); document.body.removeChild(document.getElementById('loading-mask'));
} else { } else {

View file

@ -1520,6 +1520,7 @@ define([
if (change && this.mnuSlidePicker) if (change && this.mnuSlidePicker)
picker.options.layout_index = this.mnuSlidePicker.options.layout_index; picker.options.layout_index = this.mnuSlidePicker.options.layout_index;
this.mnuSlidePicker = picker; this.mnuSlidePicker = picker;
this.mnuSlidePicker._needRecalcSlideLayout = true;
}; };
me.btnsAddSlide.concat(me.btnChangeSlide).forEach(function (btn, index) { me.btnsAddSlide.concat(me.btnChangeSlide).forEach(function (btn, index) {
btn.menu.on('show:before', me.binding.onShowBeforeAddSlide, btn); btn.menu.on('show:before', me.binding.onShowBeforeAddSlide, btn);

View file

@ -23,7 +23,7 @@
.loadmask > .brendpanel { .loadmask > .brendpanel {
width: 100%; width: 100%;
height: 56px; min-height: 32px;
background: #aa5252; background: #aa5252;
} }
@ -80,11 +80,6 @@
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar li { .loadmask > .sktoolbar li {
@ -264,6 +259,14 @@
<div id="viewport"></div> <div id="viewport"></div>
<script> <script>
var params = getUrlParams(),
view = params["mode"] == 'view';
if (view) {
document.querySelector('.brendpanel > :nth-child(2)').remove();
document.querySelector('.sktoolbar').remove();
}
if (stopLoading) { if (stopLoading) {
document.body.removeChild(document.getElementById('loading-mask')); document.body.removeChild(document.getElementById('loading-mask'));
} else { } else {

View file

@ -25,7 +25,7 @@
.loadmask > .brendpanel { .loadmask > .brendpanel {
width: 100%; width: 100%;
height: 56px; min-height: 32px;
background: #aa5252; background: #aa5252;
} }
@ -82,11 +82,6 @@
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar li { .loadmask > .sktoolbar li {
@ -270,6 +265,14 @@
<div id="viewport"></div> <div id="viewport"></div>
<script> <script>
var params = getUrlParams(),
view = params["mode"] == 'view';
if (view) {
document.querySelector('.brendpanel > :nth-child(2)').remove();
document.querySelector('.sktoolbar').remove();
}
if (stopLoading) { if (stopLoading) {
document.body.removeChild(document.getElementById('loading-mask')); document.body.removeChild(document.getElementById('loading-mask'));
} else { } else {

View file

@ -70,13 +70,12 @@
flex-grow: 1; flex-grow: 1;
max-width: 1350px; max-width: 1350px;
width: 100%; width: 100%;
margin: 0 auto 56px;
} }
.loadmask > .placeholder .slide-v { .loadmask > .placeholder .slide-v {
display: flex; display: flex;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
padding-bottom: 56.1333%; padding-bottom: 80%;
} }
.loadmask > .placeholder .slide-container { .loadmask > .placeholder .slide-container {
@ -105,7 +104,7 @@
.loadmask > .placeholder .slide-container > .line:nth-child(1) { .loadmask > .placeholder .slide-container > .line:nth-child(1) {
height: 30%; height: 30%;
margin: 120px 80px 0; margin: 80px 80px 0;
} }
@keyframes flickerAnimation { @keyframes flickerAnimation {
@ -203,7 +202,7 @@
</style> </style>
</head> </head>
<body> <body>
<div id="loading-mask" class="loadmask"><div class="brendpanel"><div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="spacer"></div><div class="rect"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div><span class="circle"></span><span class="circle"></span><span class="circle"></span></div></div><div class="placeholder"><div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div></div></div> <div id="loading-mask" class="loadmask"><div class="placeholder"><div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div></div></div>
<script> <script>
if (stopLoading) { if (stopLoading) {

View file

@ -70,13 +70,12 @@
flex-grow: 1; flex-grow: 1;
max-width: 1350px; max-width: 1350px;
width: 100%; width: 100%;
margin: 0 auto 56px;
} }
.loadmask > .placeholder .slide-v { .loadmask > .placeholder .slide-v {
display: flex; display: flex;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
padding-bottom: 56.1333%; padding-bottom: 80%;
} }
.loadmask > .placeholder .slide-container { .loadmask > .placeholder .slide-container {
@ -105,7 +104,7 @@
.loadmask > .placeholder .slide-container > .line:nth-child(1) { .loadmask > .placeholder .slide-container > .line:nth-child(1) {
height: 30%; height: 30%;
margin: 120px 80px 0; margin: 80px 80px 0;
} }
@keyframes flickerAnimation { @keyframes flickerAnimation {
@ -199,7 +198,7 @@
</style> </style>
</head> </head>
<body> <body>
<div id="loading-mask" class="loadmask"><div class="brendpanel"><div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="spacer"></div><div class="rect"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div><span class="circle"></span><span class="circle"></span><span class="circle"></span></div></div><div class="placeholder"><div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div></div></div> <div id="loading-mask" class="loadmask"><div class="placeholder"><div class="slide-h"><div class="slide-v"><div class="slide-container"><div class="line"></div><div class="line empty"></div><div class="line"></div></div></div></div></div></div>
<div id="viewport"></div> <div id="viewport"></div>
<script> <script>

View file

@ -141,10 +141,10 @@ define([
panel.cmbPaperSize.setValue(this.txtCustom + ' (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(w).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' + panel.cmbPaperSize.setValue(this.txtCustom + ' (' + parseFloat(Common.Utils.Metric.fnRecalcFromMM(w).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ' x ' +
parseFloat(Common.Utils.Metric.fnRecalcFromMM(h).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ')'); parseFloat(Common.Utils.Metric.fnRecalcFromMM(h).toFixed(2)) + Common.Utils.Metric.getCurrentMetricName() + ')');
var fitwidth = opt.asc_getFitToWidth(), this.fitWidth = opt.asc_getFitToWidth();
fitheight = opt.asc_getFitToHeight(), this.fitHeight = opt.asc_getFitToHeight();
fitscale = opt.asc_getScale(); this.fitScale = opt.asc_getScale();
this.setScaling(panel, fitwidth, fitheight, fitscale); this.setScaling(panel, this.fitWidth, this.fitHeight, this.fitScale);
item = panel.cmbPaperOrientation.store.findWhere({value: opt.asc_getOrientation()}); item = panel.cmbPaperOrientation.store.findWhere({value: opt.asc_getOrientation()});
if (item) panel.cmbPaperOrientation.setValue(item.get('value')); if (item) panel.cmbPaperOrientation.setValue(item.get('value'));

View file

@ -149,8 +149,8 @@ define([
/** coauthoring begin **/ /** coauthoring begin **/
onWorkbookLocked: function(locked) { onWorkbookLocked: function(locked) {
this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked'); this.statusbar.tabbar[locked?'addClass':'removeClass']('coauth-locked');
this.statusbar.btnAddWorksheet.setDisabled(locked || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart || this.statusbar.btnAddWorksheet.setDisabled(locked || this.api.isCellEdited || this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.Chart ||
this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable); this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
var item, i = this.statusbar.tabbar.getCount(); var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) { while (i-- > 0) {
item = this.statusbar.tabbar.getAt(i); item = this.statusbar.tabbar.getAt(i);
@ -169,7 +169,7 @@ define([
tab = this.statusbar.tabbar.getAt(i); tab = this.statusbar.tabbar.getAt(i);
if (index == tab.sheetindex) { if (index == tab.sheetindex) {
tab[locked?'addClass':'removeClass']('coauth-locked'); tab[locked?'addClass':'removeClass']('coauth-locked');
tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable); //tab.isLockTheDrag = locked || (this.statusbar.rangeSelectionMode==Asc.c_oAscSelectionDialogType.FormatTable);
break; break;
} }
} }
@ -206,6 +206,7 @@ define([
statusbar.btnZoomUp.setDisabled(disable); statusbar.btnZoomUp.setDisabled(disable);
statusbar.btnZoomDown.setDisabled(disable); statusbar.btnZoomDown.setDisabled(disable);
statusbar.labelZoom[disable?'addClass':'removeClass']('disabled'); statusbar.labelZoom[disable?'addClass':'removeClass']('disabled');
statusbar.btnAddWorksheet.setDisabled(disable || this.api.asc_isWorkbookLocked() || statusbar.rangeSelectionMode!=Asc.c_oAscSelectionDialogType.None);
if (disableAdd && mask.length>0 || !disableAdd && mask.length==0) return; if (disableAdd && mask.length>0 || !disableAdd && mask.length==0) return;
statusbar.$el.find('.statusbar').toggleClass('masked', disableAdd); statusbar.$el.find('.statusbar').toggleClass('masked', disableAdd);
@ -232,7 +233,7 @@ define([
onRangeDialogMode: function (mode) { onRangeDialogMode: function (mode) {
var islocked = this.statusbar.tabbar.hasClass('coauth-locked'), var islocked = this.statusbar.tabbar.hasClass('coauth-locked'),
currentIdx = this.api.asc_getActiveWorksheetIndex(); currentIdx = this.api.asc_getActiveWorksheetIndex();
this.statusbar.btnAddWorksheet.setDisabled(islocked || mode!=Asc.c_oAscSelectionDialogType.None); this.statusbar.btnAddWorksheet.setDisabled(islocked || this.api.isCellEdited || mode!=Asc.c_oAscSelectionDialogType.None);
var item, i = this.statusbar.tabbar.getCount(); var item, i = this.statusbar.tabbar.getCount();
while (i-- > 0) { while (i-- > 0) {
@ -240,7 +241,7 @@ define([
if (item.sheetindex !== currentIdx) { if (item.sheetindex !== currentIdx) {
item.disable(mode==Asc.c_oAscSelectionDialogType.FormatTable); item.disable(mode==Asc.c_oAscSelectionDialogType.FormatTable);
} }
item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=Asc.c_oAscSelectionDialogType.None)); //item.isLockTheDrag = (item.hasClass('coauth-locked') || (mode!=Asc.c_oAscSelectionDialogType.None));
} }
this.statusbar.rangeSelectionMode = mode; this.statusbar.rangeSelectionMode = mode;
}, },

View file

@ -228,8 +228,8 @@ define([
this._state.width = (width !== null && width !== 0) ? width : null; this._state.width = (width !== null && width !== 0) ? width : null;
this._state.height = (height !== null && height !== 0) ? height : null; this._state.height = (height !== null && height !== 0) ? height : null;
width = (width !== null) ? width : 0; width = (width !== null && width !== undefined) ? width : 0;
height = (height !== null) ? height : 0; height = (height !== null && height !== undefined) ? height : 0;
if (width === 0 && height === 0) { if (width === 0 && height === 0) {
this.radioScaleTo.setValue(true,true); this.radioScaleTo.setValue(true,true);
@ -248,7 +248,7 @@ define([
this.cmbScaleHeight.setRawValue(height.toString() + ' ' + this.getTextPages(height)); this.cmbScaleHeight.setRawValue(height.toString() + ' ' + this.getTextPages(height));
} }
this.spnScale.setValue((scale !== null) ? scale : '', true); this.spnScale.setValue((scale !== null && scale !== undefined) ? scale : '', true);
} }
}, },

View file

@ -80,6 +80,7 @@ define([
})); }));
this.editMode = false; this.editMode = false;
this.rangeSelectionMode = Asc.c_oAscSelectionDialogType.None;
this.btnZoomDown = new Common.UI.Button({ this.btnZoomDown = new Common.UI.Button({
el: $('#status-btn-zoomdown',this.el), el: $('#status-btn-zoomdown',this.el),
@ -329,7 +330,7 @@ define([
label : me.api.asc_getWorksheetName(i), label : me.api.asc_getWorksheetName(i),
// reorderable : !locked, // reorderable : !locked,
cls : locked ? 'coauth-locked':'', cls : locked ? 'coauth-locked':'',
isLockTheDrag : locked // isLockTheDrag : locked
}; };
this.api.asc_isWorksheetHidden(i)? hidentems.push(tab) : items.push(tab); this.api.asc_isWorksheetHidden(i)? hidentems.push(tab) : items.push(tab);
@ -355,7 +356,7 @@ define([
if (!this.tabbar.isTabVisible(sindex)) if (!this.tabbar.isTabVisible(sindex))
this.tabbar.setTabVisible(sindex); this.tabbar.setTabVisible(sindex);
this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked()); this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked() || me.api.isCellEdited);
$('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100))); $('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100)));
me.fireEvent('sheet:changed', [me, sindex]); me.fireEvent('sheet:changed', [me, sindex]);
@ -434,7 +435,7 @@ define([
this.tabMenu.items[1].setDisabled(issheetlocked); this.tabMenu.items[1].setDisabled(issheetlocked);
this.tabMenu.items[2].setDisabled(issheetlocked); this.tabMenu.items[2].setDisabled(issheetlocked);
this.tabMenu.items[3].setDisabled(issheetlocked); this.tabMenu.items[3].setDisabled(issheetlocked);
this.tabMenu.items[4].setDisabled(issheetlocked); this.tabMenu.items[4].setDisabled(isdoclocked);
this.tabMenu.items[5].setDisabled(issheetlocked); this.tabMenu.items[5].setDisabled(issheetlocked);
this.tabMenu.items[6].setDisabled(isdoclocked); this.tabMenu.items[6].setDisabled(isdoclocked);
this.tabMenu.items[7].setDisabled(issheetlocked); this.tabMenu.items[7].setDisabled(issheetlocked);
@ -445,8 +446,8 @@ define([
this.tabMenu.items[10].show(); this.tabMenu.items[10].show();
} }
this.tabMenu.items[9].setDisabled(issheetlocked); this.tabMenu.items[9].setDisabled(isdoclocked);
this.tabMenu.items[10].setDisabled(issheetlocked); this.tabMenu.items[10].setDisabled(isdoclocked);
this.api.asc_closeCellEditor(); this.api.asc_closeCellEditor();
this.api.asc_enableKeyEvents(false); this.api.asc_enableKeyEvents(false);

View file

@ -22,7 +22,7 @@
.loadmask > .brendpanel { .loadmask > .brendpanel {
width: 100%; width: 100%;
height: 56px; min-height: 32px;
background: #40865c; background: #40865c;
} }
@ -55,11 +55,6 @@
border-radius: 12px; border-radius: 12px;
margin: 4px 10px; margin: 4px 10px;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .brendpanel .rect { .loadmask > .brendpanel .rect {
@ -69,11 +64,6 @@
border-radius: 3px; border-radius: 3px;
margin: 0 10px; margin: 0 10px;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar { .loadmask > .sktoolbar {
@ -88,11 +78,6 @@
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar li { .loadmask > .sktoolbar li {
@ -246,13 +231,19 @@
<script> <script>
var params = getUrlParams(), var params = getUrlParams(),
internal = params["internal"] == 'true'; internal = params["internal"] == 'true',
view = params["mode"] == 'view';
if (internal) { if (internal) {
document.querySelector('.brendpanel').remove(); document.querySelector('.brendpanel').remove();
document.querySelector('.sktoolbar').remove(); document.querySelector('.sktoolbar').remove();
} }
if (view) {
document.querySelector('.brendpanel > :nth-child(2)').remove();
document.querySelector('.sktoolbar').remove();
}
if (stopLoading) { if (stopLoading) {
document.body.removeChild(document.getElementById('loading-mask')); document.body.removeChild(document.getElementById('loading-mask'));
} else { } else {

View file

@ -57,11 +57,6 @@
border-radius: 12px; border-radius: 12px;
margin: 4px 10px; margin: 4px 10px;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .brendpanel .rect { .loadmask > .brendpanel .rect {
@ -71,11 +66,6 @@
border-radius: 3px; border-radius: 3px;
margin: 0 10px; margin: 0 10px;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar { .loadmask > .sktoolbar {
@ -90,11 +80,6 @@
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
position: relative; position: relative;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
.loadmask > .sktoolbar li { .loadmask > .sktoolbar li {
@ -251,13 +236,19 @@
<script> <script>
var params = getUrlParams(), var params = getUrlParams(),
internal = params["internal"] == 'true'; internal = params["internal"] == 'true',
view = params["mode"] == 'view';
if (internal) { if (internal) {
document.querySelector('.brendpanel').remove(); document.querySelector('.brendpanel').remove();
document.querySelector('.sktoolbar').remove(); document.querySelector('.sktoolbar').remove();
} }
if (view) {
document.querySelector('.brendpanel > :nth-child(2)').remove();
document.querySelector('.sktoolbar').remove();
}
if (stopLoading) { if (stopLoading) {
document.body.removeChild(document.getElementById('loading-mask')); document.body.removeChild(document.getElementById('loading-mask'));
} else { } else {

View file

@ -102,14 +102,42 @@ module.exports = function(grunt) {
} }
function doRegisterInitializeAppTask(name, appName, configFile) { function doRegisterInitializeAppTask(name, appName, configFile) {
if (!!process.env['BRANDING_PATH'] &&
grunt.file.exists(process.env['BRANDING_PATH'] + '/web-apps-pro/build/' + configFile))
{
var _extConfig = require(process.env['BRANDING_PATH'] + '/web-apps-pro/build/' + configFile);
}
function _merge(target, ...sources) {
if (!sources.length) return target;
const source = sources.shift();
if (_.isObject(target) && _.isObject(source)) {
for (const key in source) {
if (_.isObject(source[key])) {
if (!target[key]) Object.assign(target, { [key]: {} });
else if (_.isArray(source[key])) target[key].push(...source[key]);
else _merge(target[key], source[key]);
} else {
Object.assign(target, { [key]: source[key] });
}
}
}
return _merge(target, ...sources);
}
return grunt.registerTask('init-build-' + name, 'Initialize build ' + appName, function(){ return grunt.registerTask('init-build-' + name, 'Initialize build ' + appName, function(){
defaultConfig = configFile; defaultConfig = configFile;
packageFile = require('./' + defaultConfig); packageFile = require('./' + defaultConfig);
if (packageFile) if (packageFile) {
grunt.log.ok(appName + ' config loaded successfully'.green); grunt.log.ok(appName + ' config loaded successfully'.green);
else
grunt.log.error().writeln('Could not load config file'.red); if ( !!_extConfig && _extConfig.name == packageFile.name ) {
_merge(packageFile, _extConfig);
}
} else grunt.log.error().writeln('Could not load config file'.red);
}); });
} }