X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/470817c5149ca294bd929fb29632a91c985aef0a..3bf45c83c84f9e7a1c5f2dafd64d812c987037e5:/project/static/js/editor.js diff --git a/project/static/js/editor.js b/project/static/js/editor.js index 0cbb9341..d9166cf6 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -322,30 +322,30 @@ Editor.prototype.loadConfig = function() { }; Editor.prototype.loadPanelOptions = function() { - var self = this; - var totalWidth = 0; - - $('.panel-wrap', self.rootDiv).each(function(index) { - var panelWidth = self.fileOptions.panels[index].ratio * self.rootDiv.width(); - if ($(this).hasClass('last-panel')) { - $(this).css({ - left: totalWidth, - right: 0 - }); - } else { - $(this).css({ - left: totalWidth, - width: panelWidth - }); - totalWidth += panelWidth; - } - $.log('panel:', this, $(this).css('left')); - $('.panel-toolbar option', this).each(function() { - if ($(this).attr('p:panel-name') == self.fileOptions.panels[index].name) { - $(this).parent('select').val($(this).attr('value')); - } - }); - }); + // var self = this; + // var totalWidth = 0; + // + // $('.panel-wrap', self.rootDiv).each(function(index) { + // var panelWidth = self.fileOptions.panels[index].ratio * self.rootDiv.width(); + // if ($(this).hasClass('last-panel')) { + // $(this).css({ + // left: totalWidth, + // right: 0 + // }); + // } else { + // $(this).css({ + // left: totalWidth, + // width: panelWidth + // }); + // totalWidth += panelWidth; + // } + // $.log('panel:', this, $(this).css('left')); + // $('.panel-toolbar option', this).each(function() { + // if ($(this).attr('p:panel-name') == self.fileOptions.panels[index].name) { + // $(this).parent('select').val($(this).attr('value')); + // } + // }); + // }); }; Editor.prototype.savePanelOptions = function() { @@ -425,7 +425,7 @@ Editor.prototype.saveToBranch = function(msg) if(self.autosaveTimer) { clearTimeout(self.autosaveTimer); } - if (data.warnings === null) { + if (data.warnings === null || data.warning === undefined) { self.showPopup('save-successful'); } else { self.showPopup('save-warn', data.warnings[0]);