mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 12:41: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>
|
||||
<template id="admin.categories.index.right" template="" lang="" group="0" version="1.9.001">
|
||||
<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>
|
||||
</template>
|
||||
<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;
|
||||
}
|
||||
|
||||
// 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
|
||||
this.columnNodes = [];
|
||||
this.columns = [];
|
||||
|
@ -449,7 +449,7 @@
|
||||
{
|
||||
case 0:
|
||||
// Return the global instance
|
||||
return egw;
|
||||
return instances['~global~'][0]['instance'];
|
||||
|
||||
case 1:
|
||||
if (typeof arguments[0] === 'string')
|
||||
|
@ -49,9 +49,9 @@ egw.extend('css', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
||||
*/
|
||||
css: function(_selector, _rule) {
|
||||
// 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
|
||||
// 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
|
||||
sheet = style.sheet ? style.sheet : style.styleSheet;
|
||||
|
||||
selectorCount = 0;
|
||||
selectors = {};
|
||||
}
|
||||
|
||||
// Remove any existing rule first, of no rule exists for the
|
||||
@ -67,13 +70,16 @@ egw.extend('css', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
|
||||
{
|
||||
// Store the old index
|
||||
index = selectors[_selector];
|
||||
if (typeof sheet.removeRule !== "undefined")
|
||||
if(index < sheet.cssRules.length)
|
||||
{
|
||||
sheet.removeRule(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
sheet.deleteRule(index);
|
||||
if (typeof sheet.removeRule !== "undefined")
|
||||
{
|
||||
sheet.removeRule(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
sheet.deleteRule(index);
|
||||
}
|
||||
}
|
||||
|
||||
delete (selectors[_selector]);
|
||||
|
Loading…
Reference in New Issue
Block a user