mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-29 10:09:10 +01:00
Admin bugfixes:
- Avoid error Cannot read property 'promise' of undefined - Reduce wrong width in admin customfields or categories after you click 3 times
This commit is contained in:
parent
bebfc80259
commit
6450e343c4
@ -4,7 +4,7 @@
|
|||||||
<overlay>
|
<overlay>
|
||||||
<template id="admin.categories.index.right" template="" lang="" group="0" version="1.9.001">
|
<template id="admin.categories.index.right" template="" lang="" group="0" version="1.9.001">
|
||||||
<hbox>
|
<hbox>
|
||||||
<buttononly align="right" label="Add" id="add" onclick="window.open('$cont[add_link]','_blank','dependent=yes,width=600,height=380,scrollbars=yes,status=yes'); return false;"/>
|
<buttononly align="right" id="add" onclick="window.open('$cont[add_link]','_blank','dependent=yes,width=600,height=380,scrollbars=yes,status=yes'); return false;"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</template>
|
</template>
|
||||||
<template id="admin.categories.index.rows" template="" lang="" group="0" version="1.9.002">
|
<template id="admin.categories.index.rows" template="" lang="" group="0" version="1.9.002">
|
||||||
|
@ -258,6 +258,24 @@ var et2_dataview = Class.extend({
|
|||||||
this.columnMgr = null;
|
this.columnMgr = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove dynamic CSS,
|
||||||
|
for (var i = 0; i < this.columns.length; i++)
|
||||||
|
{
|
||||||
|
if(this.columns[i].tdClass)
|
||||||
|
{
|
||||||
|
this.egw.css('.'+this.columns[i].tdClass);
|
||||||
|
}
|
||||||
|
if(this.columns[i].divClass)
|
||||||
|
{
|
||||||
|
this.egw.css('.'+this.columns[i].divClass);
|
||||||
|
this.egw.css(".egwGridView_outer ." + this.columns[i].divClass);
|
||||||
|
this.egw.css(".egwGridView_grid ." + this.columns[i].divClass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.egw.css(".egwGridView_grid ." + this.uniqueId + "_div_fullRow");
|
||||||
|
this.egw.css(".egwGridView_outer ." + this.uniqueId + "_td_fullRow");
|
||||||
|
this.egw.css(".egwGridView_outer ." + this.uniqueId + "_spacer_fullRow");
|
||||||
|
|
||||||
// Reset the headerColumns array and empty the table row
|
// Reset the headerColumns array and empty the table row
|
||||||
this.columnNodes = [];
|
this.columnNodes = [];
|
||||||
this.columns = [];
|
this.columns = [];
|
||||||
|
@ -449,7 +449,7 @@
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
// Return the global instance
|
// Return the global instance
|
||||||
return egw;
|
return instances['~global~'][0]['instance'];
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (typeof arguments[0] === 'string')
|
if (typeof arguments[0] === 'string')
|
||||||
|
@ -49,9 +49,9 @@ egw.extend('css', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
*/
|
*/
|
||||||
css: function(_selector, _rule) {
|
css: function(_selector, _rule) {
|
||||||
// Set the current index to the maximum index
|
// Set the current index to the maximum index
|
||||||
var index = selectorCount;
|
var index = sheet ? Math.min(selectorCount, sheet.cssRules.length) : 0;
|
||||||
|
|
||||||
if (!sheet)
|
if (!sheet || !sheet.ownerNode || sheet.ownerNode.ownerDocument !== _wnd.document)
|
||||||
{
|
{
|
||||||
// Generate a style tag, which will be used to hold the newly generated css
|
// Generate a style tag, which will be used to hold the newly generated css
|
||||||
// rules.
|
// rules.
|
||||||
@ -60,6 +60,9 @@ egw.extend('css', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
|
|
||||||
// Obtain the reference to the styleSheet object of the generated style tag
|
// Obtain the reference to the styleSheet object of the generated style tag
|
||||||
sheet = style.sheet ? style.sheet : style.styleSheet;
|
sheet = style.sheet ? style.sheet : style.styleSheet;
|
||||||
|
|
||||||
|
selectorCount = 0;
|
||||||
|
selectors = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove any existing rule first, of no rule exists for the
|
// Remove any existing rule first, of no rule exists for the
|
||||||
@ -67,6 +70,8 @@ egw.extend('css', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
{
|
{
|
||||||
// Store the old index
|
// Store the old index
|
||||||
index = selectors[_selector];
|
index = selectors[_selector];
|
||||||
|
if(index < sheet.cssRules.length)
|
||||||
|
{
|
||||||
if (typeof sheet.removeRule !== "undefined")
|
if (typeof sheet.removeRule !== "undefined")
|
||||||
{
|
{
|
||||||
sheet.removeRule(index);
|
sheet.removeRule(index);
|
||||||
@ -75,6 +80,7 @@ egw.extend('css', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
|||||||
{
|
{
|
||||||
sheet.deleteRule(index);
|
sheet.deleteRule(index);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
delete (selectors[_selector]);
|
delete (selectors[_selector]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user