Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jquery-ui.onobtrusive.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
* Modified by Andrew Cohen, 11/30/2011
* TempWorks Software, Inc.
*/
(function(n){"use strict";function r(t){var u=t.match(/function\s*\((.*?)\).*?\{(.*)\}$/),r,f,i;if(u){for(r=u[1].split(","),f="",i=0;i<r.length;i+=1)r[i]='"'+n.trim(r[i])+'"';return eval("new Function("+r.join(",")+', "'+u[2]+'")')}}var i=n.ui,t="data-ui-";i.unobtrusive={parse:function(r){n("*["+t+"fn]",r).each(function(){i.unobtrusive.parseElement(this)})},parseElement:function(i){var u=n(i),f=u[0];n.each(u.attr(t+"fn").split(" "),function(){var s=this,e,i={},o=t+s+"-";n.each(f.attributes,function(){var t=this,u;if(!t.specified)return!0;t.name.indexOf(o)===0&&(u=n.camelCase(t.name.substr(o.length)),i[u]=t.value.substr(0,8)==="function"?r(t.value):t.value)}),e=u[s]||n.noop,e.call(u,"destroy"),e.call(u,i)})}},n(function(){i.unobtrusive.parse(window.document)})})(window.jQuery)
(function(n){"use strict";function r(t){var u=t.match(/function\s*\((.*?)\).*?\{(.*)\}$/),r,f,i;if(u){for(r=u[1].split(","),f="",i=0;i<r.length;i+=1)r[i]='"'+n.trim(r[i])+'"';return eval("new Function("+r.join(",")+', "'+u[2]+'")')}}var i=n.ui,t="data-ui-";i.unobtrusive={parse:function(r){n("*["+t+"fn]",r).each(function(){i.unobtrusive.parseElement(this)})},parseElement:function(i){var u=n(i),f=u[0];n.each(u.attr(t+"fn").split(" "),function(){var o=this,e,i={},s=t+o+"-";n.each(f.attributes,function(){var t=this,u;if(!t.specified)return!0;t.name.indexOf(s)===0&&(u=n.camelCase(t.name.substr(s.length)),i[u]=t.value.substr(0,8)==="function"?r(t.value):t.value)}),e=u[o]||n.noop,u.data(o)!==undefined&&e.call(u,"destroy"),e.call(u,i)})}},n(function(){i.unobtrusive.parse(window.document)})})(window.jQuery)
3 changes: 2 additions & 1 deletion src/jquery-ui.unobtrusive.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
// get UI fn if it exists
uiFn = ($el[fn] || $.noop);
// call destroy to remove the ui widget
uiFn.call($el, 'destroy');
if ($el.data(fn) !== undefined)
uiFn.call($el, 'destroy');
// call fn with options
uiFn.call($el, options);
});
Expand Down