From 3948fcf08ef766593e7fa5d9ce5397a6b04cd235 Mon Sep 17 00:00:00 2001 From: Pieter Lambrecht Date: Mon, 26 Sep 2022 12:26:32 +0200 Subject: [PATCH 01/11] Add javascript to disable empty form fields --- netbox/templates/inc/filter_list.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/netbox/templates/inc/filter_list.html b/netbox/templates/inc/filter_list.html index 4276764d1dd..c52739a8898 100644 --- a/netbox/templates/inc/filter_list.html +++ b/netbox/templates/inc/filter_list.html @@ -1,7 +1,21 @@ {% load form_helpers %} {% load helpers %} -
+ + +
{% for field in filter_form.hidden_fields %} From 845e0c801daf83773e1f2e055f5d777fc2ae78eb Mon Sep 17 00:00:00 2001 From: Pieter Lambrecht Date: Tue, 27 Sep 2022 02:10:08 +0200 Subject: [PATCH 02/11] add js cleanGetUrl --- netbox/project-static/dist/lldp.js | 4 +-- netbox/project-static/dist/netbox.js.map | 2 +- netbox/project-static/src/netbox.ts | 3 ++ netbox/project-static/src/util.ts | 28 +++++++++++++++++++ netbox/templates/inc/filter_list.html | 16 +---------- netbox/templates/search.html | 2 +- .../utilities/templates/search/searchbar.html | 2 +- 7 files changed, 37 insertions(+), 20 deletions(-) diff --git a/netbox/project-static/dist/lldp.js b/netbox/project-static/dist/lldp.js index c77672ff6e5..04805acc6b3 100644 --- a/netbox/project-static/dist/lldp.js +++ b/netbox/project-static/dist/lldp.js @@ -1,5 +1,5 @@ -(()=>{var ds=Object.create;var ce=Object.defineProperty,hs=Object.defineProperties,ps=Object.getOwnPropertyDescriptor,ms=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertyNames,hn=Object.getOwnPropertySymbols,_s=Object.getPrototypeOf,pn=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable;var mn=(i,t,e)=>t in i?ce(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t)=>{for(var e in t||(t={}))pn.call(t,e)&&mn(i,e,t[e]);if(hn)for(var e of hn(t))Es.call(t,e)&&mn(i,e,t[e]);return i},je=(i,t)=>hs(i,ms(t)),gn=i=>ce(i,"__esModule",{value:!0});var Ot=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),vs=(i,t)=>{gn(i);for(var e in t)ce(i,e,{get:t[e],enumerable:!0})},ys=(i,t,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of gs(t))!pn.call(i,n)&&n!=="default"&&ce(i,n,{get:()=>t[n],enumerable:!(e=ps(t,n))||e.enumerable});return i},Ts=i=>ys(gn(ce(i!=null?ds(_s(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var Ti=(i,t,e)=>new Promise((n,o)=>{var s=u=>{try{l(e.next(u))}catch(p){o(p)}},r=u=>{try{l(e.throw(u))}catch(p){o(p)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,r);l((e=e.apply(i,t)).next())});var nn=Ot((Zo,li)=>{(function(i,t){typeof define=="function"&&define.amd?define(t):typeof li=="object"&&li.exports?li.exports=t():i.EvEmitter=t()})(typeof window!="undefined"?window:Zo,function(){"use strict";function i(){}var t=i.prototype;return t.on=function(e,n){if(!(!e||!n)){var o=this._events=this._events||{},s=o[e]=o[e]||[];return s.indexOf(n)==-1&&s.push(n),this}},t.once=function(e,n){if(!(!e||!n)){this.on(e,n);var o=this._onceEvents=this._onceEvents||{},s=o[e]=o[e]||{};return s[n]=!0,this}},t.off=function(e,n){var o=this._events&&this._events[e];if(!(!o||!o.length)){var s=o.indexOf(n);return s!=-1&&o.splice(s,1),this}},t.emitEvent=function(e,n){var o=this._events&&this._events[e];if(!(!o||!o.length)){o=o.slice(0),n=n||[];for(var s=this._onceEvents&&this._onceEvents[e],r=0;r{(function(i,t){typeof define=="function"&&define.amd?define(t):typeof ci=="object"&&ci.exports?ci.exports=t():i.getSize=t()})(window,function(){"use strict";function t(d){var v=parseFloat(d),E=d.indexOf("%")==-1&&!isNaN(v);return E&&v}function e(){}var n=typeof console=="undefined"?e:function(d){console.error(d)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=o.length;function r(){for(var d={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},v=0;v