text timer fade out working

This commit is contained in:
andygup 2014-04-10 09:48:08 -06:00
parent 8e780e7552
commit f7c30fb1ed

View File

@ -138,6 +138,7 @@
"dojo/domReady!"],
function(Map,Query,FeatureLayer,OfflineFeaturesManager,editsStore,AttributeInspector,domConstruct,on,dom,Button,SimpleTextArea) {
var textTimer;
var offlineFeaturesManager;
var map,busStopsFeatureLayer,currentFeature;
var imgOfflineIndicator,btnOnlineOffline;
@ -206,14 +207,15 @@
var saveButton = new Button({ label: "Save", "class": "saveButton"});
domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after");
var textArea = new SimpleTextArea({name:"msgTextArea",rows:"1",cols:"1",class:"msgTextArea"})
var textArea = new SimpleTextArea({name:"msgTextArea",rows:"1",class:"msgTextArea"})
domConstruct.place(textArea.domNode, saveButton.domNode, "after");
saveButton.on("click", function(){
clearTimeout(textTimer);
busStopsFeatureLayer.applyEdits(null, [currentFeature], null,
function(response){
textArea.set("value" , "Item successfully saved.");
setTimeout(function(){
textTimer = setTimeout(function(){
textArea.set("value" , " ");
},10000);
},function(err){