mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
User editable dashboards... implementation in progress
SVN:trunk[2038]
This commit is contained in:
@@ -232,32 +232,9 @@ function ValidateForm(sFormId, bValidateAll)
|
||||
function ReadFormParams(sFormId)
|
||||
{
|
||||
var oMap = { };
|
||||
$('#'+sFormId+' :input:visible').each( function() {
|
||||
var sName = $(this).attr('name');
|
||||
if (sName && sName != '')
|
||||
$('#'+sFormId+' :input').each( function() {
|
||||
if ($(this).parent().is(':visible'))
|
||||
{
|
||||
if (this.type == 'checkbox')
|
||||
{
|
||||
oMap[sName] = ($(this).attr('checked') == 'checked');
|
||||
}
|
||||
else
|
||||
{
|
||||
oMap[sName] = $(this).val();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return oMap;
|
||||
}
|
||||
|
||||
function SubmitForm(sFormId, onSubmitResult)
|
||||
{
|
||||
var aErrors = ValidateForm(sFormId, false);
|
||||
if (aErrors.length == 0)
|
||||
{
|
||||
var oMap = ReadFormParams(sFormId);
|
||||
oMap.module_name = sCurrentModule;
|
||||
$('#'+sFormId+' :input:visible').each( function() {
|
||||
var sName = $(this).attr('name');
|
||||
if (sName && sName != '')
|
||||
{
|
||||
@@ -271,6 +248,35 @@ function SubmitForm(sFormId, onSubmitResult)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
return oMap;
|
||||
}
|
||||
|
||||
function SubmitForm(sFormId, onSubmitResult)
|
||||
{
|
||||
var aErrors = ValidateForm(sFormId, false);
|
||||
if (aErrors.length == 0)
|
||||
{
|
||||
var oMap = ReadFormParams(sFormId);
|
||||
oMap.module_name = sCurrentModule;
|
||||
$('#'+sFormId+' :input').each( function() {
|
||||
if ($(this).parent().is(':visible'))
|
||||
{
|
||||
var sName = $(this).attr('name');
|
||||
if (sName && sName != '')
|
||||
{
|
||||
if (this.type == 'checkbox')
|
||||
{
|
||||
oMap[sName] = ($(this).attr('checked') == 'checked');
|
||||
}
|
||||
else
|
||||
{
|
||||
oMap[sName] = $(this).val();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
$.post(GetAbsoluteUrlAppRoot()+'designer/module.php', oMap, function(data)
|
||||
{
|
||||
|
||||
@@ -300,4 +300,12 @@ function FixTableSorter(table)
|
||||
table.tablesorter( { widgets: ['myZebra', 'truncatedList']} ); // sort-able and zebra tables
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DashletCreationDlg(sOQL)
|
||||
{
|
||||
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', {operation: 'dashlet_creation_dlg', oql: sOQL}, function(data){
|
||||
$('body').append(data);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user