|
@@ -19,6 +19,17 @@
|
|
var $ = converse.env.jQuery,
|
|
var $ = converse.env.jQuery,
|
|
_ = converse.env._;
|
|
_ = converse.env._;
|
|
|
|
|
|
|
|
+ function renderDragResizeHandles (_converse, view) {
|
|
|
|
+ var flyout = view.el.querySelector('.box-flyout');
|
|
|
|
+ var div = document.createElement('div');
|
|
|
|
+ div.innerHTML = tpl_dragresize();
|
|
|
|
+ flyout.insertBefore(
|
|
|
|
+ div,
|
|
|
|
+ flyout.firstChild
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
converse.plugins.add('converse-dragresize', {
|
|
converse.plugins.add('converse-dragresize', {
|
|
/* Optional dependencies are other plugins which might be
|
|
/* Optional dependencies are other plugins which might be
|
|
* overridden or relied upon, and therefore need to be loaded before
|
|
* overridden or relied upon, and therefore need to be loaded before
|
|
@@ -102,6 +113,7 @@
|
|
|
|
|
|
render: function () {
|
|
render: function () {
|
|
var result = this.__super__.render.apply(this, arguments);
|
|
var result = this.__super__.render.apply(this, arguments);
|
|
|
|
+ renderDragResizeHandles(this.__super__._converse, this);
|
|
this.setWidth();
|
|
this.setWidth();
|
|
return result;
|
|
return result;
|
|
},
|
|
},
|
|
@@ -257,8 +269,10 @@
|
|
},
|
|
},
|
|
|
|
|
|
render: function () {
|
|
render: function () {
|
|
- $(window).on('resize', _.debounce(this.setWidth.bind(this), 100));
|
|
|
|
- return this.__super__.render.apply(this, arguments);
|
|
|
|
|
|
+ var result = this.__super__.render.apply(this, arguments);
|
|
|
|
+ renderDragResizeHandles(this.__super__._converse, this);
|
|
|
|
+ this.setWidth();
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -274,6 +288,13 @@
|
|
this.__super__.initialize.apply(this, arguments);
|
|
this.__super__.initialize.apply(this, arguments);
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ render: function () {
|
|
|
|
+ var result = this.__super__.render.apply(this, arguments);
|
|
|
|
+ renderDragResizeHandles(this.__super__._converse, this);
|
|
|
|
+ this.setWidth();
|
|
|
|
+ return result;
|
|
|
|
+ },
|
|
|
|
+
|
|
renderLoginPanel: function () {
|
|
renderLoginPanel: function () {
|
|
var result = this.__super__.renderLoginPanel.apply(this, arguments);
|
|
var result = this.__super__.renderLoginPanel.apply(this, arguments);
|
|
this.initDragResize().setDimensions();
|
|
this.initDragResize().setDimensions();
|
|
@@ -301,20 +322,9 @@
|
|
|
|
|
|
render: function () {
|
|
render: function () {
|
|
var result = this.__super__.render.apply(this, arguments);
|
|
var result = this.__super__.render.apply(this, arguments);
|
|
- this.renderDragResizeHandles();
|
|
|
|
|
|
+ renderDragResizeHandles(this.__super__._converse, this);
|
|
this.setWidth();
|
|
this.setWidth();
|
|
return result;
|
|
return result;
|
|
- },
|
|
|
|
-
|
|
|
|
- renderDragResizeHandles: function () {
|
|
|
|
- var _converse = this.__super__._converse;
|
|
|
|
- var flyout = this.el.querySelector('.box-flyout');
|
|
|
|
- var div = document.createElement('div');
|
|
|
|
- div.innerHTML = tpl_dragresize();
|
|
|
|
- flyout.insertBefore(
|
|
|
|
- div,
|
|
|
|
- flyout.firstChild
|
|
|
|
- );
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|