PageSourceSearch

https://sudonix.org/assets/admin/manage-tags.418e22f1b04e0a6ab6af.min.js

js sudonix.org collected 2026-10-09 22:15:40 UTC 6,713 bytes, 8 lines download raw bytes

1(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[1080,84819],{11234(p,_,f){"use strict";var d,g;d=[f(33530),f(29930),f(19905)],g=(function(m,l,t){const n={};n.init=function(){t.enable(".tag-management",".tag-row"),s(),i(),o(),h()};function s(){const a=$("#create-modal"),u=$("#create-tag-name"),e=$("#create-modal-go");a.on("keypress",function(c){c.keyCode===13&&e.click()}),$("#create").on("click",function(){a.modal("show"),setTimeout(function(){u.focus()},250)}),e.on("click",function(){socket.emit("admin.tags.create",{tag:u.val()},function(c){if(c)return l.error(c);u.val(""),a.on("hidden.bs.modal",function(){ajaxify.refresh()}),a.modal("hide")})})}function i(){$("#tag-search").on("input propertychange",utils.debounce(function(){function a(e){app.parseAndTranslate("admin/manage/tags","tags",{tags:e},function(c){$(".tag-list").html(c),t.enable(".tag-management",".tag-row")})}const u=$("#tag-search").val();if(!u)return a(ajaxify.data.tags);socket.emit("topics.searchAndLoadTags",{query:u},function(e,c){if(e)return l.error(e);a(c.tags)})},250))}function o(){$("#rename").on("click",function(){const a=$(".tag-row.ui-selected");if(!a.length)return;const u=m.dialog({title:"[[admin/manage/tags:alerts.editing]]",message:$(".rename-modal").html(),buttons:{success:{label:"Save",className:"btn-primary save",callback:function(){const e=[];a.each(function(c,r){r=$(r),e.push({value:r.attr("data-tag"),newName:u.find('[data-name="value"]').val()})}),socket.emit("admin.tags.rename",e,function(c){if(c)return l.error(c);l.success("[[admin/manage/tags:alerts.update-success]]"),ajaxify.refresh()})}}}})})}function h(){$("#deleteSelected").on("click",function(){const a=$(".tag-row.ui-selected");a.length&&m.confirm("[[admin/manage/tags:alerts.confirm-delete]]",function(u){if(!u)return;const e=[];a.each(function(c,r){e.push($(r).attr("data-tag"))}),socket.emit("admin.tags.deleteTags",{tags:e},function(c){if(c)return l.error(c);a.remove()})})})}return n}).apply(_,d),g!==void 0&&(p.exports=g)},19905(p,_,f){"use strict";var d,g;d=[f(81517)],g=(function(){const m={};return m.enable=function(l,t){$(l).selectable({filter:t})},m}).apply(_,d),g!==void 0&&(p.exports=g)},81517(p,_,f){var d,g,m;/*!
2* jQuery UI Selectable 1.14.1
3* https://jqueryui.com
4*
5* Copyright OpenJS Foundation and other contributors
6* Released under the MIT license.
7* https://jquery.org/license
8*/(function(l){"use strict";g=[f(74692),f(23662),f(56883),f(69139)],d=l,m=typeof d=="function"?d.apply(_,g):d,m!==void 0&&(p.exports=m)})(function(l){"use strict";return l.widget("ui.selectable",l.ui.mouse,{version:"1.14.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=l(t.element[0]).offset(),t.selectees=l(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each(function(){var n=l(this),s=n.offset(),i={left:s.left-t.elementPos.left,top:s.top-t.elementPos.top};l.data(this,"selectable-item",{element:this,$element:n,left:i.left,top:i.top,right:i.left+n.outerWidth(),bottom:i.top+n.outerHeight(),startselected:!1,selected:n.hasClass("ui-selected"),selecting:n.hasClass("ui-selecting"),unselecting:n.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=l("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var n=this,s=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=l(this.element[0]).offset(),!this.options.disabled&&(this.selectees=l(s.filter,this.element[0]),this._trigger("start",t),l(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=l.data(this,"selectable-item");i.startselected=!0,!t.metaKey&&!t.ctrlKey&&(n._removeClass(i.$element,"ui-selected"),i.selected=!1,n._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,n._trigger("unselecting",t,{unselecting:i.element}))}),l(t.target).parents().addBack().each(function(){var i,o=l.data(this,"selectable-item");if(o)return i=!t.metaKey&&!t.ctrlKey||!o.$element.hasClass("ui-selected"),n._removeClass(o.$element,i?"ui-unselecting":"ui-selected")._addClass(o.$element,i?"ui-selecting":"ui-unselecting"),o.unselecting=!i,o.selecting=i,o.selected=i,i?n._trigger("selecting",t,{selecting:o.element}):n._trigger("unselecting",t,{unselecting:o.element}),!1}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var n,s=this,i=this.options,o=this.opos[0],h=this.opos[1],a=t.pageX,u=t.pageY;return o>a&&(n=a,a=o,o=n),h>u&&(n=u,u=h,h=n),this.helper.css({left:o,top:h,width:a-o,height:u-h}),this.selectees.each(function(){var e=l.data(this,"selectable-item"),c=!1,r={};!e||e.element===s.element[0]||(r.left=e.left+s.elementPos.left,r.right=e.right+s.elementPos.left,r.top=e.top+s.elementPos.top,r.bottom=e.bottom+s.elementPos.top,i.tolerance==="touch"?c=!(r.left>a||r.right<o||r.top>u||r.bottom<h):i.tolerance==="fit"&&(c=r.left>o&&r.right<a&&r.top>h&&r.bottom<u),c?(e.selected&&(s._removeClass(e.$element,"ui-selected"),e.selected=!1),e.unselecting&&(s._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1),e.selecting||(s._addClass(e.$element,"ui-selecting"),e.selecting=!0,s._trigger("selecting",t,{selecting:e.element}))):(e.selecting&&((t.metaKey||t.ctrlKey)&&e.startselected?(s._removeClass(e.$element,"ui-selecting"),e.selecting=!1,s._addClass(e.$element,"ui-selected"),e.selected=!0):(s._removeClass(e.$element,"ui-selecting"),e.selecting=!1,e.startselected&&(s._addClass(e.$element,"ui-unselecting"),e.unselecting=!0),s._trigger("unselecting",t,{unselecting:e.element}))),e.selected&&!t.metaKey&&!t.ctrlKey&&!e.startselected&&(s._removeClass(e.$element,"ui-selected"),e.selected=!1,s._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,s._trigger("unselecting",t,{unselecting:e.element}))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,l(".ui-unselecting",this.element[0]).each(function(){var s=l.data(this,"selectable-item");n._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,n._trigger("unselected",t,{unselected:s.element})}),l(".ui-selecting",this.element[0]).each(function(){var s=l.data(this,"selectable-item");n._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,n._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.