mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
New look for iTop !
SVN:trunk[3601]
This commit is contained in:
@@ -95,6 +95,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
||||
me.UpdateSizes();
|
||||
me.UpdateButtons();
|
||||
me.ajax_request = null;
|
||||
FixSearchFormsDisposition();
|
||||
me.DoSearchObjects();
|
||||
},
|
||||
'html'
|
||||
|
||||
@@ -257,6 +257,7 @@ $(function()
|
||||
var c = this.value;
|
||||
me._onUpdateDlgButtons(c);
|
||||
});
|
||||
FixSearchFormsDisposition();
|
||||
$('#SearchResultsToAdd_'+me.id).unblock();
|
||||
me._onSearchDlgUpdateSize();
|
||||
});
|
||||
|
||||
@@ -134,6 +134,7 @@ function LinksWidget(id, sClass, sAttCode, iInputId, sSuffix, bDuplicates, oWizH
|
||||
var c = this.value;
|
||||
me.UpdateButtons(c);
|
||||
});
|
||||
FixSearchFormsDisposition();
|
||||
$(sSearchAreaId).unblock();
|
||||
},
|
||||
'html'
|
||||
|
||||
50
js/utils.js
50
js/utils.js
@@ -210,12 +210,35 @@ function ReloadSearchForm(divId, sClassName, sBaseClass, sContext)
|
||||
}
|
||||
}
|
||||
}
|
||||
FixSearchFormsDisposition();
|
||||
oDiv.unblock();
|
||||
oDiv.parent().resize(); // Inform the parent that the form has just been (potentially) resized
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function FixSearchFormsDisposition()
|
||||
{
|
||||
// Fix search forms
|
||||
$('.SearchDrawer').each(function() {
|
||||
var colWidth = 0;
|
||||
var labelWidth = 0;
|
||||
$('label:visible', $(this)).each( function() {
|
||||
var l = $(this).parent().width() - $(this).width();
|
||||
colWidth = Math.max(l, colWidth);
|
||||
labelWidth = Math.max($(this).width(), labelWidth);
|
||||
});
|
||||
$('label:visible', $(this)).each( function() {
|
||||
if($(this).data('resized') != true)
|
||||
{
|
||||
$(this).parent().width(colWidth + labelWidth);
|
||||
$(this).width(labelWidth).css({display: 'inline-block'}).data('resized', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores - in a persistent way - user specific preferences
|
||||
* depends on a global variable oUserPreferences created/filled by the iTopWebPage
|
||||
@@ -389,6 +412,33 @@ function ShortcutListDlg(sOQL, sDataTableId, sContext)
|
||||
return false;
|
||||
}
|
||||
|
||||
function ExportListDlg(sOQL, sDataTableId, sFormat, sDlgTitle)
|
||||
{
|
||||
var sDataTableName = 'datatable_'+sDataTableId;
|
||||
var oColumns = $('#'+sDataTableName).datatable('option', 'oColumns');
|
||||
var aFields = [];
|
||||
for(var j in oColumns)
|
||||
{
|
||||
for(var k in oColumns[j])
|
||||
{
|
||||
if (oColumns[j][k].checked)
|
||||
{
|
||||
var sCode = oColumns[j][k].code;
|
||||
if (sCode == '_key_')
|
||||
{
|
||||
sCode = 'id';
|
||||
}
|
||||
aFields.push(j+'.'+sCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.post(GetAbsoluteUrlAppRoot()+'webservices/export-v2.php', {interactive: 1, advanced: 1, mode: 'dialog', format: sFormat, expression: sOQL, suggested_fields: aFields.join(','), dialog_title: sDlgTitle}, function(data) {
|
||||
$('body').append(data);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function DisplayHistory(sSelector, sFilter, iCount, iStart)
|
||||
{
|
||||
$(sSelector).block();
|
||||
|
||||
Reference in New Issue
Block a user