* Loading default resources which need to whiteboard
*
* @param response
*/
private void initReferences(IHeaderResponse response) {
WhiteboardLibrarySettings settings = getLibrarySettings();
// Whiteboard.css
if (settings != null && settings.getWhiteboardStyleSheetReference() != null) {
response.render(new PriorityHeaderItem(CssHeaderItem.forReference(settings.getWhiteboardStyleSheetReference())));
} else {
response.render(new PriorityHeaderItem(CssHeaderItem.forReference(WhiteboardStyleSheetResourceReference.get())));
}
// Goog.css
if (settings != null && settings.getGoogStyleSheetReference() != null) {
response.render(new PriorityHeaderItem(CssHeaderItem.forReference(settings.getGoogStyleSheetReference())));
} else {
response.render(new PriorityHeaderItem(CssHeaderItem.forReference(GoogStyleSheetResourceReference.get())));
}
// translate.js
if (settings != null && settings.getTranslateJavaScriptReference() != null) {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(settings.getTranslateJavaScriptReference())));
} else {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(TranslateJavaScriptResourceReference.get())));
}
// whiteboard.js
if (settings != null && settings.getWhiteboardJavaScriptReference() != null) {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(settings.getWhiteboardJavaScriptReference())));
} else {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(WhiteboardJavaScriptResourceReference.get())));
}
// wb-helper.js
if (settings != null && settings.getWhiteboardHelperJavaScriptReference() != null) {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(settings.getWhiteboardHelperJavaScriptReference())));
} else {
response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(WhiteboardHelperJavaScriptResourceReference.get())));
}
}