Sending focus to modal in CMS
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
*/
|
||||
define(["jquery", "common/js/spec_helpers/template_helpers", "js/spec_helpers/view_helpers"],
|
||||
function($, TemplateHelpers, ViewHelpers) {
|
||||
var installModalTemplates, getModalElement, getModalTitle, isShowingModal, hideModalIfShowing,
|
||||
pressModalButton, cancelModal, cancelModalIfShowing;
|
||||
var installModalTemplates, getModalElement, getModalWindow, getModalTitle, isShowingModal,
|
||||
hideModalIfShowing, pressModalButton, cancelModal, cancelModalIfShowing;
|
||||
|
||||
installModalTemplates = function(append) {
|
||||
ViewHelpers.installViewTemplates(append);
|
||||
@@ -22,6 +22,11 @@ define(["jquery", "common/js/spec_helpers/template_helpers", "js/spec_helpers/vi
|
||||
return modalElement;
|
||||
};
|
||||
|
||||
getModalWindow = function(modal) {
|
||||
var modalElement = getModalElement(modal);
|
||||
return modalElement.find('.modal-window');
|
||||
};
|
||||
|
||||
getModalTitle = function(modal) {
|
||||
var modalElement = getModalElement(modal);
|
||||
return modalElement.find('.modal-window-title').text();
|
||||
@@ -58,6 +63,7 @@ define(["jquery", "common/js/spec_helpers/template_helpers", "js/spec_helpers/vi
|
||||
|
||||
return $.extend(ViewHelpers, {
|
||||
'getModalElement': getModalElement,
|
||||
'getModalWindow': getModalWindow,
|
||||
'getModalTitle': getModalTitle,
|
||||
'installModalTemplates': installModalTemplates,
|
||||
'isShowingModal': isShowingModal,
|
||||
|
||||
Reference in New Issue
Block a user