Created
May 26, 2016 11:03
-
-
Save Pzixel/c58063534f21cb42ec5bea4f93b72120 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function runLoad(controls) { | |
var deferreds = []; | |
for (var i = 0; i < controls.length; i++) { | |
deferreds.push($.Deferred()); | |
var container = $('#' + controls[i].ContainerId); | |
container.html(''); | |
container.load(controls[i].ActionUrl + '?nodeName={0}&nodeType={1}'.f(nodeName, nodeType), function (j) { | |
return function() { | |
deferreds[j].resolve(); | |
} | |
}(i)); | |
} | |
$.when.apply(null, deferreds).then(function() { | |
formParsley = $('#configuration_form').parsley(); | |
var configContainer = $('#config_container'); | |
configContainer.children('div').each(function () { | |
var containerContent = this.getElementsByClassName('panel-collapse')[0].innerHTML; | |
if (containerContent == null || containerContent === '') { | |
$(this).hide(); | |
} else { | |
$(this).show(); | |
} | |
}); | |
configContainer.show(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment