Skip to content

Instantly share code, notes, and snippets.

@ikiw
Last active April 30, 2018 10:29
Show Gist options
  • Save ikiw/11281976 to your computer and use it in GitHub Desktop.
Save ikiw/11281976 to your computer and use it in GitHub Desktop.
var style = document.createElement("style");
document.head.appendChild(style);
style.type = "text/css";
style.innerHTML = "";
var oDUmmy = new sap.ui.core.Control();
sap.ui.core.Control.prototype.changeColor = function(oColor){
style.innerHTML = style.innerHTML + '.' + oColor + '{background-color:' + oColor + ' !important;}';
this.addStyleClass(oColor);
}
sap.ui.core.Control.prototype.addCustomStyle = function(oClassName,oStyle){
style.innerHTML = style.innerHTML + '.' + oClassName + '{' + oStyle + ' !important;}';
this.addStyleClass(oClassName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment