mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
working on resize
This commit is contained in:
parent
96d6e7c1b7
commit
0685e563ed
3 changed files with 15 additions and 14 deletions
|
@ -933,6 +933,7 @@ input[type=checkbox] {
|
||||||
margin-bottom: 33px
|
margin-bottom: 33px
|
||||||
}
|
}
|
||||||
.toolbar ul.menu_left {
|
.toolbar ul.menu_left {
|
||||||
|
right:0px;
|
||||||
}
|
}
|
||||||
.toolbar ul.menu_right {
|
.toolbar ul.menu_right {
|
||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
|
|
|
@ -370,19 +370,6 @@ function handshake()
|
||||||
$('#readonlyinput').on('click',function(){
|
$('#readonlyinput').on('click',function(){
|
||||||
padeditbar.setEmbedLinks();
|
padeditbar.setEmbedLinks();
|
||||||
});
|
});
|
||||||
// Listen for resize events (sucks but needed as iFrame ace_inner has to be position absolute
|
|
||||||
// A CSS fix for this would be nice but I'm not sure how we'd do it.
|
|
||||||
$(window).resize(function(){
|
|
||||||
redrawEditbar();
|
|
||||||
});
|
|
||||||
redrawEditbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
var redrawEditbar = function(){
|
|
||||||
var editbarHeight = $('.menu_left').height() + 2 + "px";
|
|
||||||
var containerTop = $('.menu_left').height() + 5 + "px";
|
|
||||||
$('#editbar').css("height", editbarHeight);
|
|
||||||
$('#editorcontainer').css("top", containerTop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$.extend($.gritter.options, {
|
$.extend($.gritter.options, {
|
||||||
|
|
|
@ -140,7 +140,12 @@ var padeditbar = (function()
|
||||||
init: function() {
|
init: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
self.dropdowns = [];
|
self.dropdowns = [];
|
||||||
|
// Listen for resize events (sucks but needed as iFrame ace_inner has to be position absolute
|
||||||
|
// A CSS fix for this would be nice but I'm not sure how we'd do it.
|
||||||
|
$(window).resize(function(){
|
||||||
|
self.redrawHeight();
|
||||||
|
});
|
||||||
|
|
||||||
$("#editbar .editbarbutton").attr("unselectable", "on"); // for IE
|
$("#editbar .editbarbutton").attr("unselectable", "on"); // for IE
|
||||||
$("#editbar").removeClass("disabledtoolbar").addClass("enabledtoolbar");
|
$("#editbar").removeClass("disabledtoolbar").addClass("enabledtoolbar");
|
||||||
$("#editbar [data-key]").each(function () {
|
$("#editbar [data-key]").each(function () {
|
||||||
|
@ -149,6 +154,8 @@ var padeditbar = (function()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.redrawHeight();
|
||||||
|
|
||||||
registerDefaultCommands(self);
|
registerDefaultCommands(self);
|
||||||
|
|
||||||
hooks.callAll("postToolbarInit", {
|
hooks.callAll("postToolbarInit", {
|
||||||
|
@ -170,6 +177,12 @@ var padeditbar = (function()
|
||||||
this.commands[cmd] = callback;
|
this.commands[cmd] = callback;
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
redrawHeight: function(){
|
||||||
|
var editbarHeight = $('.menu_left').height() + 2 + "px";
|
||||||
|
var containerTop = $('.menu_left').height() + 5 + "px";
|
||||||
|
$('#editbar').css("height", editbarHeight);
|
||||||
|
$('#editorcontainer').css("top", containerTop);
|
||||||
|
},
|
||||||
registerDropdownCommand: function (cmd, dropdown) {
|
registerDropdownCommand: function (cmd, dropdown) {
|
||||||
dropdown = dropdown || cmd;
|
dropdown = dropdown || cmd;
|
||||||
self.dropdowns.push(dropdown)
|
self.dropdowns.push(dropdown)
|
||||||
|
|
Loading…
Reference in a new issue