camptocamp/cgxp — pull request #305 by ochriste (2012-12-05 16:20:18+00:00)
Title: proposal for changes reated to new query plugin (wms/wfs) 

according to what has been decided for the new wms/wfs query plugin, when a wfs query is performed, one must display an empty tab in the featureGrid for each wms layer with an optional message informing the user.
also a warning message is displayed under the grid to warn the user some layers have not been queried.

this pull request is a proposal of implementation of these new behaviors in the featureGrid plugin.

at the moment it expect a object like this to display the warning message and the empy tab:

var msgid = OpenLayers.i18n('no data');
var msgtext = OpenLayers.i18n('wms layers dont answer to wfs query');

var warningMsg = [
'',
OpenLayers.i18n('Warning, read this'),
''
].join('');

var unqueriedLayers = [];
var f = {
unqueriedLayerId: 'test_fake_layer',
unqueriedLayerTitle: msgid,
unqueriedLayerText: msgtext
}
unqueriedLayers.push(f)
var f = {
unqueriedLayerId: 'test_fake_layer2',
unqueriedLayerTitle: msgid,
unqueriedLayerText: msgtext
}
unqueriedLayers.push(f)

var queryResult = {
features: features,
warningMsg: warningMsg,
unqueriedLayers: unqueriedLayers
}

or course this can be changed if you dont like it