You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
648 B
32 lines
648 B
/**
|
|
* actions
|
|
* @param {type} $
|
|
* @param {type} name
|
|
* @returns {undefined}
|
|
*/
|
|
(function($, name) {
|
|
var CLASS_ACTION = $.className('action');
|
|
|
|
var handle = function(event, target) {
|
|
var className = target.className || '';
|
|
if (typeof className !== 'string') { //svg className(SVGAnimatedString)
|
|
className = '';
|
|
}
|
|
if (className && ~className.indexOf(CLASS_ACTION)) {
|
|
if (target.classList.contains($.className('action-back'))) {
|
|
event.preventDefault();
|
|
}
|
|
return target;
|
|
}
|
|
return false;
|
|
};
|
|
|
|
$.registerTarget({
|
|
name: name,
|
|
index: 50,
|
|
handle: handle,
|
|
target: false,
|
|
isContinue: true
|
|
});
|
|
|
|
})(mui, 'action'); |