Last active
December 6, 2017 16:36
-
-
Save kuckmc01/dfc85ed9b2c6d654d310e44246c676c6 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
Coral.commons.ready(function () { | |
try{ | |
var $element = $('[data-target="touchui-reviewer-group-target"]'); | |
if($element && $element.length > 0){ | |
var jsonResponse = Granite.HTTP.eval('sampleUrl'); | |
var select = CUI.Widget.fromElement(CUI.Select,$element); | |
var selectList = CUI.Widget.fromElement(CUI.SelectList,select._selectList); | |
jsonResponse.forEach(function(json) { | |
var text = json.text; | |
selectList.addOption({ | |
display:text, | |
value:text | |
}); | |
}); | |
} | |
}catch(e){ | |
console.log(e); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment