tao-test/app/taoQtiItem/views/js/qtiCreator/widgets/states/Invalid.js

24 lines
767 B
JavaScript
Raw Normal View History

2022-08-29 20:14:13 +02:00
define([
'jquery',
'taoQtiItem/qtiCreator/widgets/states/factory',
'tpl!taoQtiItem/qtiCreator/tpl/notifications/invalidInfoBox'
], function($, stateFactory, invalidInfoBoxTpl){
return stateFactory.create('invalid', ['sleep'], function(a){
this.widget.$container.addClass('invalid');
this.$messageBox = $(invalidInfoBoxTpl({
serial : this.widget.serial
}));
/*const $scrollOuterContainer = $('#item-editor-scroll-outer');
$scrollOuterContainer.prepend(this.$messageBox);*/
const $itemEditorBar = $('.item-editor-bar');
$itemEditorBar.append(this.$messageBox);
},function(){
this.widget.$container.removeClass('invalid');
this.$messageBox.remove();
});
});