[Mapbender-commits] r6130 - trunk/mapbender/http/plugins
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon May 10 03:14:32 EDT 2010
Author: verenadiewald
Date: 2010-05-10 03:14:31 -0400 (Mon, 10 May 2010)
New Revision: 6130
Modified:
trunk/mapbender/http/plugins/mb_metadata_showOriginal.js
Log:
compare original metadata with current
Modified: trunk/mapbender/http/plugins/mb_metadata_showOriginal.js
===================================================================
--- trunk/mapbender/http/plugins/mb_metadata_showOriginal.js 2010-05-09 19:09:00 UTC (rev 6129)
+++ trunk/mapbender/http/plugins/mb_metadata_showOriginal.js 2010-05-10 07:14:31 UTC (rev 6130)
@@ -10,8 +10,15 @@
};
var mergeOriginalWithCurrentMetadata = function (originalObj,currentObj) {
- //console.log(originalObj);
- //console.log(currentObj);
+ for(metadataAttr in currentObj) {
+ var origMetadataAttr = "original_" + metadataAttr;
+ //if(metadataAttr == ) {
+ if(currentObj[metadataAttr] == originalObj[origMetadataAttr]) {
+ $("#" + origMetadataAttr).parent().hide();
+ }
+ //}
+
+ }
};
var getOriginalMetadata = function (currentWmsId, currentWmsData) {
@@ -26,7 +33,8 @@
if (!result) {
return;
}
- return obj;
+ fillForm(obj);
+ mergeOriginalWithCurrentMetadata(obj,currentWmsData);
}
});
req.send();
@@ -49,9 +57,7 @@
this.init = function (obj) {
$originalMetadataForm.load("../plugins/mb_metadata_showOriginal.html", function () {
- var originalMetadata = getOriginalMetadata(obj.wmsId, obj.wmsData);
- //mergeOriginalWithCurrentMetadata(originalMetadata,obj.wmsData);
- //fillForm(obj.wmsData);
+ getOriginalMetadata(obj.wmsId, obj.wmsData);
});
}
};
More information about the Mapbender_commits
mailing list