CustomFinishCancel.js 972 B

1234567891011121314151617181920212223242526272829303132
  1. define(function () {
  2. "use strict";
  3. function validatePromptValue() {
  4. };
  5. validatePromptValue.prototype.draw = function (oControlHost) {
  6. var el = oControlHost.container;
  7. el.innerHTML =
  8. '<style>' +
  9. '.myButton { height:32px; width:120px; cursor:pointer; margin-left:20px; color:#4178BE; font-size:14px; padding:6px 12px 6px 12px; background-color:white; border:1px solid #4178BE; }' +
  10. '.myButton:hover { background-color:#4178BE; color:white; border:1px solid #4178BE; }' +
  11. '</style>' +
  12. '<button class="myButton btnCancel" type="button">Cancel</button>' +
  13. '<button class="myButton btnFinish" type="button">Finish</button>';
  14. el.querySelector(".btnCancel").onclick = oControlHost.cancel.bind(oControlHost);
  15. el.querySelector(".btnFinish").onclick = this.finishButtonClick.bind(this, oControlHost);
  16. };
  17. validatePromptValue.prototype.finishButtonClick = function (oControlHost) {
  18. oControlHost.finish();
  19. };
  20. return validatePromptValue;
  21. });