Hey folks, I'm looking to see if anyone has had success disabling the "generalize features for web display" functionality in the add data widget under the file tab. In general, this is great for rapid web display but specifically for our project we had it there so non-mappers could do QA/QC on some map stuff and they're seeing errors that aren't there because their file they upload is being generalized. At this moment we just have told folks but I'd like to remove this option for this application in particular. Thanks in advance! - Christina
Solved! Go to Solution.
Add this css rule to the widgets style.css:
.generalize-options {
display: none;
}
Make this edit to the widgets search\templates\AddFromFilePane.html (Line 6 set to false):
<div class="secondary-pane add-file-pane">
<div class="generalize-options">
<div data-dojo-type="jimu/dijit/CheckBox"
data-dojo-attach-point="generalizeCheckBox"
data-dojo-props="checked:false">
</div>
</div>
...
Christina,
There is no setting to disable that option but if you are using WAB Dev edition then I can provide the code changes to make that happen.
That would be fantastic! Thank you!!!
Add this css rule to the widgets style.css:
.generalize-options {
display: none;
}
Make this edit to the widgets search\templates\AddFromFilePane.html (Line 6 set to false):
<div class="secondary-pane add-file-pane">
<div class="generalize-options">
<div data-dojo-type="jimu/dijit/CheckBox"
data-dojo-attach-point="generalizeCheckBox"
data-dojo-props="checked:false">
</div>
</div>
...
Thank you!!!
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.
Oh thanks!
Is there a way to disable the checkbox out of another Widget? I have got a custom Widget that do some stuff at the beginning of a WebApp and it would be much easier to change this code only once instead of changing these lines in every single WebApp.
My code looks like this:
topic.subscribe('widgetCreated', function() {
if(arguments[0].name === 'AddData') {
// disable checkbox
}
});
But how to get the checkbox and set checked to false?
Lukas,
You have to get a reference to the addData widget and then use:
To get the reference to the widget add WidgetManager to the widgets define array:
define([
...
'jimu/WidgetManager',
...
],
function(
...
WidgetManager,
...
Then:
var _AddData = this.widgetManager.getWidgetsByName("AddData");
_AddData.generalizeCheckBox.checked = false;
Hi Robert,
i get the following error: