New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hoodcms

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoodcms - npm Package Compare versions

Comparing version 4.1.2 to 4.1.3

3

js/admin/content.js

@@ -155,4 +155,3 @@ if (!$.hood)

PublishDate: {
required: true,
ukdate: true
required: true
}

@@ -159,0 +158,0 @@ },

@@ -1,1 +0,1 @@

"use strict";$.hood||($.hood={}),$.hood.Content={Init:function(){$("body").on("click",".content-delete",$.hood.Content.Delete),$("body").on("click",".content-meta-delete",$.hood.Content.Meta.Delete),$("body").on("click",".content-clone",$.hood.Content.Clone),$("body").on("click",".content-set-status",$.hood.Content.SetStatus),$("body").on("click",".content-media-delete",$.hood.Content.Media.Delete),$("body").on("click",".content-categories-delete",$.hood.Content.Categories.Delete),$("body").on("change",".content-categories-check",$.hood.Content.Categories.ToggleCategory),$("body").on("click",".add-custom-field",$.hood.Content.Types.AddField),$("body").on("click",".delete-custom-field",$.hood.Content.Types.DeleteField),$("body").on("keyup","#Slug",function(){$(".slug-display").html($(this).val())}),$("#content-edit-form").doesExist()&&$.hood.Content.Edit.Init(),$("#content-meta-form").doesExist()&&$.hood.Content.Meta.Init()},Lists:{Content:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-list").doesExist()&&$.hood.Inline.Reload($("#content-list"),e)}},Categories:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-categories-list").doesExist()&&$.hood.Inline.Reload($("#content-categories-list"),e)}},Fields:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-meta-list").doesExist()&&$.hood.Inline.Reload($("#content-meta-list"),e)}},Media:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-media-list").doesExist()&&$.hood.Inline.Reload($("#content-media-list"),e)}}},Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload(),e.Success&&t&&t.data("redirect")&&($.hood.Alerts.Success("<strong>Content deleted, redirecting...</strong><br />Just taking you back to the content list."),setTimeout(function(){window.location=t.data("redirect")},1500))})};$.hood.Alerts.Confirm("The content will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')},SetStatus:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),t.data("status"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload()})};$.hood.Alerts.Confirm("The item will be immediately visible on the website.","Are you sure?",o,"warning")},Clone:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),t.data("status"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload()})};$.hood.Alerts.Confirm("This will duplicate the content and everything inside it.","Are you sure?",o,"warning")},Create:function(){$("#content-create-form").find(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$("#content-create-form").hoodValidator({validationRules:{Title:{required:!0},Except:{required:!0},PublishDate:{required:!0,ukdate:!0}},submitButtonTag:$("#content-create-submit"),submitUrl:$("#content-create-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload()}})},Edit:{Init:function(){$(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$(".timepicker").datetimepicker({locale:"en-gb",format:"LT"}),$(".datetimepicker").datetimepicker({locale:"en-gb",sideBySide:!0}),$.hood.Content.Edit.InitImageUploader()},InitImageUploader:function(){if($("#content-gallery-add").doesExist()){$("#content-gallery-total-progress").hide(),Dropzone.autoDiscover=!1;var e=new Dropzone("#content-gallery-upload",{url:$("#content-gallery-upload").data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:!1,paramName:"files",autoProcessQueue:!0,previewsContainer:!1,clickable:"#content-gallery-add",dictDefaultMessage:'<span><i class="fa fa-cloud-upload fa-4x"></i><br />Drag and drop files here, or simply click me!</div>',dictResponseError:"Error while uploading file!"});e.on("success",function(e,t){$.hood.Helpers.ProcessResponse(t),$.hood.Content.Lists.Media.Reload()}),e.on("addedfile",function(e){$("#content-gallery-total-progress .progress-bar").css({width:"0%"}),$("#content-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("totaluploadprogress",function(e){$("#content-gallery-total-progress .progress-bar").css({width:e+"%"}),$("#content-gallery-total-progress .progress-bar .percentage").html(e+"%")}),e.on("sending",function(e){$("#content-gallery-total-progress").fadeIn(),$("#content-gallery-total-progress .progress-bar").css({width:"0%"}),$("#content-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("complete",function(e){$.hood.Content.Lists.Media.Reload()}),e.on("queuecomplete",function(e){$("#content-gallery-total-progress").hide(),$.hood.Content.Lists.Media.Reload()})}}},Categories:{Editor:function(){$("#content-categories-edit-form").hoodValidator({validationRules:{DisplayName:{required:!0},Slug:{required:!0}},submitButtonTag:$("#content-categories-edit-submit"),submitUrl:$("#content-categories-edit-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Categories.Reload()}})},ToggleCategory:function(){$.post($(this).data("url"),{categoryId:$(this).val(),add:$(this).is(":checked")},function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Categories.Reload()})},Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Categories.Reload()})};$.hood.Alerts.Confirm("The category will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')}},Meta:{Create:function(){$("#add-field-form").hoodValidator({validationRules:{cfName:{required:!0},cfType:{required:!0}},submitButtonTag:$("#add-field-submit"),submitUrl:"/admin/content/addmeta",submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Fields.Reload()}})},Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Fields.Reload()})};$.hood.Alerts.Confirm("The field will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')}},Media:{Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Media.Reload()})};$.hood.Alerts.Confirm("The image/media will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong><br /><span class="text-warning">If this is set as a featured image, this may cause issues, make sure to set another image as featured before deleting this one.</span></span>')}},Types:{AddField:function(){var e=$("#custom-field-name-"+$(this).data("id")).val(),t=$.hood.Content.Types.GetFieldsList($(this).data("id")),o=!1;if($.each(t,function(t,n){n.Name===e&&(o=!0)}),!e)return void $.hood.Alerts.Error("You have to name the field.");if(!t)return void $.hood.Alerts.Error("The field list is empty.");if(o)return void $.hood.Alerts.Error("Cannot insert two fields with the same key.");var n={Name:$("#custom-field-name-"+$(this).data("id")).data("prefix")+$("#custom-field-name-"+$(this).data("id")).val(),Default:$("#custom-field-default-"+$(this).data("id")).val(),Type:$("#custom-field-type-"+$(this).data("id")).val(),System:!1};t.push(n),$.hood.Content.Types.ReRenderFields(t,$(this).data("id")),$("#custom-fields-"+$(this).data("id")).val(JSON.stringify(t)),$.hood.Alerts.Success("Added field.")},DeleteField:function(){var e=$.hood.Content.Types.GetFieldsList($(this).data("id")),t=$(this).data("name");e=$.grep(e,function(e){return e.Name!==t}),$.hood.Content.Types.ReRenderFields(e,$(this).data("id")),$("#custom-fields-"+$(this).data("id")).val(JSON.stringify(e)),$.hood.Alerts.Success("Deleted field.")},GetFieldsList:function(e){var t=$("#custom-fields-"+e).val();if(null!==t&&""!==t){var o=JSON.parse(t);for(var n in o)if(o[n].hasOwnProperty("Name"))return o}return new Array},ReRenderFields:function(e,t){var o=$("#field-list-"+t).empty();for(i=0;i<e.length;i++){var n="<tr><td class='col-xs-8'><strong>"+e[i].Name+"</strong> "+e[i].Type+"</td><td class='col-xs-4 text-right'>";e[i].System?n+='<span class="label label-default">System Field</span>':n+="<a class='delete-custom-field btn btn-xs bg-color-red txt-color-white' data-name='"+e[i].Name+"' data-id='"+t+"'><i class='fa fa-trash-o'></i></a>",n+="</td></tr>",o.append(n)}}}},$(document).ready($.hood.Content.Init);
"use strict";$.hood||($.hood={}),$.hood.Content={Init:function(){$("body").on("click",".content-delete",$.hood.Content.Delete),$("body").on("click",".content-meta-delete",$.hood.Content.Meta.Delete),$("body").on("click",".content-clone",$.hood.Content.Clone),$("body").on("click",".content-set-status",$.hood.Content.SetStatus),$("body").on("click",".content-media-delete",$.hood.Content.Media.Delete),$("body").on("click",".content-categories-delete",$.hood.Content.Categories.Delete),$("body").on("change",".content-categories-check",$.hood.Content.Categories.ToggleCategory),$("body").on("click",".add-custom-field",$.hood.Content.Types.AddField),$("body").on("click",".delete-custom-field",$.hood.Content.Types.DeleteField),$("body").on("keyup","#Slug",function(){$(".slug-display").html($(this).val())}),$("#content-edit-form").doesExist()&&$.hood.Content.Edit.Init(),$("#content-meta-form").doesExist()&&$.hood.Content.Meta.Init()},Lists:{Content:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-list").doesExist()&&$.hood.Inline.Reload($("#content-list"),e)}},Categories:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-categories-list").doesExist()&&$.hood.Inline.Reload($("#content-categories-list"),e)}},Fields:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-meta-list").doesExist()&&$.hood.Inline.Reload($("#content-meta-list"),e)}},Media:{Loaded:function(e,t){$.hood.Loader(!1)},Reload:function(e){$("#content-media-list").doesExist()&&$.hood.Inline.Reload($("#content-media-list"),e)}}},Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload(),e.Success&&t&&t.data("redirect")&&($.hood.Alerts.Success("<strong>Content deleted, redirecting...</strong><br />Just taking you back to the content list."),setTimeout(function(){window.location=t.data("redirect")},1500))})};$.hood.Alerts.Confirm("The content will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')},SetStatus:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),t.data("status"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload()})};$.hood.Alerts.Confirm("The item will be immediately visible on the website.","Are you sure?",o,"warning")},Clone:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),t.data("status"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload()})};$.hood.Alerts.Confirm("This will duplicate the content and everything inside it.","Are you sure?",o,"warning")},Create:function(){$("#content-create-form").find(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$("#content-create-form").hoodValidator({validationRules:{Title:{required:!0},Except:{required:!0},PublishDate:{required:!0}},submitButtonTag:$("#content-create-submit"),submitUrl:$("#content-create-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Content.Reload()}})},Edit:{Init:function(){$(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$(".timepicker").datetimepicker({locale:"en-gb",format:"LT"}),$(".datetimepicker").datetimepicker({locale:"en-gb",sideBySide:!0}),$.hood.Content.Edit.InitImageUploader()},InitImageUploader:function(){if($("#content-gallery-add").doesExist()){$("#content-gallery-total-progress").hide(),Dropzone.autoDiscover=!1;var e=new Dropzone("#content-gallery-upload",{url:$("#content-gallery-upload").data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:!1,paramName:"files",autoProcessQueue:!0,previewsContainer:!1,clickable:"#content-gallery-add",dictDefaultMessage:'<span><i class="fa fa-cloud-upload fa-4x"></i><br />Drag and drop files here, or simply click me!</div>',dictResponseError:"Error while uploading file!"});e.on("success",function(e,t){$.hood.Helpers.ProcessResponse(t),$.hood.Content.Lists.Media.Reload()}),e.on("addedfile",function(e){$("#content-gallery-total-progress .progress-bar").css({width:"0%"}),$("#content-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("totaluploadprogress",function(e){$("#content-gallery-total-progress .progress-bar").css({width:e+"%"}),$("#content-gallery-total-progress .progress-bar .percentage").html(e+"%")}),e.on("sending",function(e){$("#content-gallery-total-progress").fadeIn(),$("#content-gallery-total-progress .progress-bar").css({width:"0%"}),$("#content-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("complete",function(e){$.hood.Content.Lists.Media.Reload()}),e.on("queuecomplete",function(e){$("#content-gallery-total-progress").hide(),$.hood.Content.Lists.Media.Reload()})}}},Categories:{Editor:function(){$("#content-categories-edit-form").hoodValidator({validationRules:{DisplayName:{required:!0},Slug:{required:!0}},submitButtonTag:$("#content-categories-edit-submit"),submitUrl:$("#content-categories-edit-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Categories.Reload()}})},ToggleCategory:function(){$.post($(this).data("url"),{categoryId:$(this).val(),add:$(this).is(":checked")},function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Categories.Reload()})},Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Categories.Reload()})};$.hood.Alerts.Confirm("The category will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')}},Meta:{Create:function(){$("#add-field-form").hoodValidator({validationRules:{cfName:{required:!0},cfType:{required:!0}},submitButtonTag:$("#add-field-submit"),submitUrl:"/admin/content/addmeta",submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Fields.Reload()}})},Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Fields.Reload()})};$.hood.Alerts.Confirm("The field will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')}},Media:{Delete:function(e){e.preventDefault();var t=$(this),o=function(e){e&&$.post(t.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Content.Lists.Media.Reload()})};$.hood.Alerts.Confirm("The image/media will be permanently removed.","Are you sure?",o,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong><br /><span class="text-warning">If this is set as a featured image, this may cause issues, make sure to set another image as featured before deleting this one.</span></span>')}},Types:{AddField:function(){var e=$("#custom-field-name-"+$(this).data("id")).val(),t=$.hood.Content.Types.GetFieldsList($(this).data("id")),o=!1;if($.each(t,function(t,n){n.Name===e&&(o=!0)}),!e)return void $.hood.Alerts.Error("You have to name the field.");if(!t)return void $.hood.Alerts.Error("The field list is empty.");if(o)return void $.hood.Alerts.Error("Cannot insert two fields with the same key.");var n={Name:$("#custom-field-name-"+$(this).data("id")).data("prefix")+$("#custom-field-name-"+$(this).data("id")).val(),Default:$("#custom-field-default-"+$(this).data("id")).val(),Type:$("#custom-field-type-"+$(this).data("id")).val(),System:!1};t.push(n),$.hood.Content.Types.ReRenderFields(t,$(this).data("id")),$("#custom-fields-"+$(this).data("id")).val(JSON.stringify(t)),$.hood.Alerts.Success("Added field.")},DeleteField:function(){var e=$.hood.Content.Types.GetFieldsList($(this).data("id")),t=$(this).data("name");e=$.grep(e,function(e){return e.Name!==t}),$.hood.Content.Types.ReRenderFields(e,$(this).data("id")),$("#custom-fields-"+$(this).data("id")).val(JSON.stringify(e)),$.hood.Alerts.Success("Deleted field.")},GetFieldsList:function(e){var t=$("#custom-fields-"+e).val();if(null!==t&&""!==t){var o=JSON.parse(t);for(var n in o)if(o[n].hasOwnProperty("Name"))return o}return new Array},ReRenderFields:function(e,t){var o=$("#field-list-"+t).empty();for(i=0;i<e.length;i++){var n="<tr><td class='col-xs-8'><strong>"+e[i].Name+"</strong> "+e[i].Type+"</td><td class='col-xs-4 text-right'>";e[i].System?n+='<span class="label label-default">System Field</span>':n+="<a class='delete-custom-field btn btn-xs bg-color-red txt-color-white' data-name='"+e[i].Name+"' data-id='"+t+"'><i class='fa fa-trash-o'></i></a>",n+="</td></tr>",o.append(n)}}}},$(document).ready($.hood.Content.Init);

@@ -177,4 +177,3 @@ if (!$.hood)

PublishDate: {
required: true,
ukdate: true
required: true
}

@@ -181,0 +180,0 @@ },

@@ -1,1 +0,1 @@

"use strict";$.hood||($.hood={}),$.hood.Property={Init:function(){$("body").on("click",".property-delete",$.hood.Property.Delete),$("body").on("click",".property-delete-all",$.hood.Property.DeleteAll),$("body").on("click",".property-delete-floor",$.hood.Property.DeleteFloorArea),$("body").on("click",".property-set-status",$.hood.Property.SetStatus),$("body").on("click",".property-media-delete",$.hood.Property.Media.Delete),$("#property-edit-form").doesExist()&&$.hood.Property.Edit.Init()},Lists:{Property:{Loaded:function(e,o){$.hood.Loader(!1),$.hood.Google.ClusteredMap()},Reload:function(e){$("#property-list").doesExist()&&$.hood.Inline.Reload($("#property-list"),e)}},Media:{Loaded:function(e,o){$.hood.Loader(!1)},Reload:function(e){$("#property-gallery-list").doesExist()&&$.hood.Inline.Reload($("#property-gallery-list"),e)}},Floorplans:{Loaded:function(e,o){$.hood.Loader(!1)},Reload:function(e){$("#property-floorplans-list").doesExist()&&$.hood.Inline.Reload($("#property-floorplans-list"),e)}},Floorareas:{Loaded:function(e,o){$.hood.Loader(!1)},Reload:function(e){$("#property-floors-list").doesExist()&&$.hood.Inline.Reload($("#property-floors-list"),e)}}},Delete:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload(),e.Success&&o&&o.data("redirect")&&($.hood.Alerts.Success("<strong>Property deleted, redirecting...</strong><br />Just taking you back to the property list."),setTimeout(function(){window.location=o.data("redirect")},1500))})};$.hood.Alerts.Confirm("The property will be permanently removed.","Are you sure?",r,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')},DeleteAll:function(e){e.preventDefault();var o=$(this);Swal.fire({title:"Are you sure?",html:"ALL of the properties will be permanently removed. Type 'DELETE' to continue.",input:"text",inputAttributes:{autocapitalize:"off"},footer:'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This can take a few minutes to complete and CANNOT be undone.</strong></span>',showCancelButton:!0,confirmButtonText:"Delete",showLoaderOnConfirm:!0,preConfirm:function(e){if("delete"!==e.toLowerCase())return Swal.showValidationMessage("You did not type DELETE."),!1;o.attr("href");$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload(),e.Success&&o&&o.data("redirect")&&($.hood.Alerts.Success("<strong>Properties deleted, redirecting...</strong><br />Just taking you back to the property list."),setTimeout(function(){window.location=o.data("redirect")},1500)),swal.close()}).fail($.hood.Inline.HandleError).always($.hood.Inline.Finish)},allowOutsideClick:function(){return!Swal.isLoading()}})},SetStatus:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),o.data("status"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload()})};$.hood.Alerts.Confirm("The item will be immediately visible on the website.","Are you sure?",r,"warning")},Create:function(){$("#property-create-form").find(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$("#property-create-form").hoodValidator({validationRules:{Title:{required:!0},Address1:{required:!0},City:{required:!0},County:{required:!0},Country:{required:!0},Postcode:{required:!0},PublishDate:{required:!0,ukdate:!0}},submitButtonTag:$("#property-create-submit"),submitUrl:$("#property-create-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload()}}),$.hood.Google.Addresses.InitAutocomplete()},CreateFloorArea:function(){$("#property-floorArea-create-form").hoodValidator({validationRules:{Name:{required:!0},Number:{required:!0},SquareFeet:{required:!0},SquareMetres:{required:!0}},submitButtonTag:$("#property-floorArea-create-submit"),submitUrl:$("#property-floorArea-create-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Floorareas.Reload()}}),$("body").on("change",".recalc-floor",$.hood.Property.RecalcFloor)},RecalcFloor:function(e){"SquareMetres"===this.id?$("#property-floorArea-create-form #SquareFeet").val(10.7639*Number($(this).val())):$("#property-floorArea-create-form #SquareMetres").val(Number($(this).val())/10.7639)},DeleteFloorArea:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Floorareas.Reload()})};$.hood.Alerts.Confirm("The floor will be permanently removed.","Are you sure?",r,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')},Edit:{Init:function(){$(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$.hood.Property.Upload.InitImageUploader(),$.hood.Property.Upload.InitFloorplanUploader()}},Upload:{InitImageUploader:function(){if($("#property-gallery-add").doesExist()){$("#property-gallery-total-progress").hide(),Dropzone.autoDiscover=!1;var e=new Dropzone("#property-gallery-upload",{url:$("#property-gallery-upload").data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:!1,paramName:"files",autoProcessQueue:!0,previewsContainer:!1,clickable:"#property-gallery-add",dictDefaultMessage:'<span><i class="fa fa-cloud-upload fa-4x"></i><br />Drag and drop files here, or simply click me!</div>',dictResponseError:"Error while uploading file!"});e.on("success",function(e,o){$.hood.Helpers.ProcessResponse(o),$.hood.Property.Lists.Media.Reload()}),e.on("addedfile",function(e){$("#property-gallery-total-progress .progress-bar").css({width:"0%"}),$("#property-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("totaluploadprogress",function(e){$("#property-gallery-total-progress .progress-bar").css({width:e+"%"}),$("#property-gallery-total-progress .progress-bar .percentage").html(e+"%")}),e.on("sending",function(e){$("#property-gallery-total-progress").fadeIn(),$("#property-gallery-total-progress .progress-bar").css({width:"0%"}),$("#property-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("complete",function(e){$.hood.Property.Lists.Media.Reload()}),e.on("queuecomplete",function(e){$("#property-gallery-total-progress").hide(),$.hood.Property.Lists.Media.Reload()})}},InitFloorplanUploader:function(){if($("#property-floorplans-add").doesExist()){$("#property-floorplans-total-progress").hide(),Dropzone.autoDiscover=!1;var e=new Dropzone("#property-floorplans-upload",{url:$("#property-floorplans-upload").data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:!1,paramName:"files",autoProcessQueue:!0,previewsContainer:!1,clickable:"#property-floorplans-add",dictDefaultMessage:'<span><i class="fa fa-cloud-upload fa-4x"></i><br />Drag and drop files here, or simply click me!</div>',dictResponseError:"Error while uploading file!"});e.on("success",function(e,o){$.hood.Helpers.ProcessResponse(o),$.hood.Property.Lists.Floorplans.Reload()}),e.on("addedfile",function(e){$("#property-floorplans-total-progress .progress-bar").css({width:"0%"}),$("#property-floorplans-total-progress .progress-bar .percentage").html("0%")}),e.on("totaluploadprogress",function(e){$("#property-floorplans-total-progress .progress-bar").css({width:e+"%"}),$("#property-floorplans-total-progress .progress-bar .percentage").html(e+"%")}),e.on("sending",function(e){$("#property-floorplans-total-progress").fadeIn(),$("#property-floorplans-total-progress .progress-bar").css({width:"0%"}),$("#property-floorplans-total-progress .progress-bar .percentage").html("0%")}),e.on("complete",function(e){$.hood.Property.Lists.Floorplans.Reload()}),e.on("queuecomplete",function(e){$("#property-floorplans-total-progress").hide(),$.hood.Property.Lists.Floorplans.Reload()})}}},Media:{Delete:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Media.Reload(),$.hood.Property.Lists.Floorplans.Reload()})};$.hood.Alerts.Confirm("The image/media will be permanently removed.","Are you sure?",r,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong><br /><span class="text-warning">If this is set as a featured image, this may cause issues, make sure to set another image as featured before deleting this one.</span></span>')}}},$(document).ready($.hood.Property.Init);
"use strict";$.hood||($.hood={}),$.hood.Property={Init:function(){$("body").on("click",".property-delete",$.hood.Property.Delete),$("body").on("click",".property-delete-all",$.hood.Property.DeleteAll),$("body").on("click",".property-delete-floor",$.hood.Property.DeleteFloorArea),$("body").on("click",".property-set-status",$.hood.Property.SetStatus),$("body").on("click",".property-media-delete",$.hood.Property.Media.Delete),$("#property-edit-form").doesExist()&&$.hood.Property.Edit.Init()},Lists:{Property:{Loaded:function(e,o){$.hood.Loader(!1),$.hood.Google.ClusteredMap()},Reload:function(e){$("#property-list").doesExist()&&$.hood.Inline.Reload($("#property-list"),e)}},Media:{Loaded:function(e,o){$.hood.Loader(!1)},Reload:function(e){$("#property-gallery-list").doesExist()&&$.hood.Inline.Reload($("#property-gallery-list"),e)}},Floorplans:{Loaded:function(e,o){$.hood.Loader(!1)},Reload:function(e){$("#property-floorplans-list").doesExist()&&$.hood.Inline.Reload($("#property-floorplans-list"),e)}},Floorareas:{Loaded:function(e,o){$.hood.Loader(!1)},Reload:function(e){$("#property-floors-list").doesExist()&&$.hood.Inline.Reload($("#property-floors-list"),e)}}},Delete:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload(),e.Success&&o&&o.data("redirect")&&($.hood.Alerts.Success("<strong>Property deleted, redirecting...</strong><br />Just taking you back to the property list."),setTimeout(function(){window.location=o.data("redirect")},1500))})};$.hood.Alerts.Confirm("The property will be permanently removed.","Are you sure?",r,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')},DeleteAll:function(e){e.preventDefault();var o=$(this);Swal.fire({title:"Are you sure?",html:"ALL of the properties will be permanently removed. Type 'DELETE' to continue.",input:"text",inputAttributes:{autocapitalize:"off"},footer:'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This can take a few minutes to complete and CANNOT be undone.</strong></span>',showCancelButton:!0,confirmButtonText:"Delete",showLoaderOnConfirm:!0,preConfirm:function(e){if("delete"!==e.toLowerCase())return Swal.showValidationMessage("You did not type DELETE."),!1;o.attr("href");$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload(),e.Success&&o&&o.data("redirect")&&($.hood.Alerts.Success("<strong>Properties deleted, redirecting...</strong><br />Just taking you back to the property list."),setTimeout(function(){window.location=o.data("redirect")},1500)),swal.close()}).fail($.hood.Inline.HandleError).always($.hood.Inline.Finish)},allowOutsideClick:function(){return!Swal.isLoading()}})},SetStatus:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),o.data("status"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload()})};$.hood.Alerts.Confirm("The item will be immediately visible on the website.","Are you sure?",r,"warning")},Create:function(){$("#property-create-form").find(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$("#property-create-form").hoodValidator({validationRules:{Title:{required:!0},Address1:{required:!0},City:{required:!0},County:{required:!0},Country:{required:!0},Postcode:{required:!0},PublishDate:{required:!0}},submitButtonTag:$("#property-create-submit"),submitUrl:$("#property-create-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Property.Reload()}}),$.hood.Google.Addresses.InitAutocomplete()},CreateFloorArea:function(){$("#property-floorArea-create-form").hoodValidator({validationRules:{Name:{required:!0},Number:{required:!0},SquareFeet:{required:!0},SquareMetres:{required:!0}},submitButtonTag:$("#property-floorArea-create-submit"),submitUrl:$("#property-floorArea-create-form").attr("action"),submitFunction:function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Floorareas.Reload()}}),$("body").on("change",".recalc-floor",$.hood.Property.RecalcFloor)},RecalcFloor:function(e){"SquareMetres"===this.id?$("#property-floorArea-create-form #SquareFeet").val(10.7639*Number($(this).val())):$("#property-floorArea-create-form #SquareMetres").val(Number($(this).val())/10.7639)},DeleteFloorArea:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Floorareas.Reload()})};$.hood.Alerts.Confirm("The floor will be permanently removed.","Are you sure?",r,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong></span>')},Edit:{Init:function(){$(".datepicker").datetimepicker({locale:"en-gb",format:"L"}),$.hood.Property.Upload.InitImageUploader(),$.hood.Property.Upload.InitFloorplanUploader()}},Upload:{InitImageUploader:function(){if($("#property-gallery-add").doesExist()){$("#property-gallery-total-progress").hide(),Dropzone.autoDiscover=!1;var e=new Dropzone("#property-gallery-upload",{url:$("#property-gallery-upload").data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:!1,paramName:"files",autoProcessQueue:!0,previewsContainer:!1,clickable:"#property-gallery-add",dictDefaultMessage:'<span><i class="fa fa-cloud-upload fa-4x"></i><br />Drag and drop files here, or simply click me!</div>',dictResponseError:"Error while uploading file!"});e.on("success",function(e,o){$.hood.Helpers.ProcessResponse(o),$.hood.Property.Lists.Media.Reload()}),e.on("addedfile",function(e){$("#property-gallery-total-progress .progress-bar").css({width:"0%"}),$("#property-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("totaluploadprogress",function(e){$("#property-gallery-total-progress .progress-bar").css({width:e+"%"}),$("#property-gallery-total-progress .progress-bar .percentage").html(e+"%")}),e.on("sending",function(e){$("#property-gallery-total-progress").fadeIn(),$("#property-gallery-total-progress .progress-bar").css({width:"0%"}),$("#property-gallery-total-progress .progress-bar .percentage").html("0%")}),e.on("complete",function(e){$.hood.Property.Lists.Media.Reload()}),e.on("queuecomplete",function(e){$("#property-gallery-total-progress").hide(),$.hood.Property.Lists.Media.Reload()})}},InitFloorplanUploader:function(){if($("#property-floorplans-add").doesExist()){$("#property-floorplans-total-progress").hide(),Dropzone.autoDiscover=!1;var e=new Dropzone("#property-floorplans-upload",{url:$("#property-floorplans-upload").data("url"),thumbnailWidth:80,thumbnailHeight:80,parallelUploads:5,previewTemplate:!1,paramName:"files",autoProcessQueue:!0,previewsContainer:!1,clickable:"#property-floorplans-add",dictDefaultMessage:'<span><i class="fa fa-cloud-upload fa-4x"></i><br />Drag and drop files here, or simply click me!</div>',dictResponseError:"Error while uploading file!"});e.on("success",function(e,o){$.hood.Helpers.ProcessResponse(o),$.hood.Property.Lists.Floorplans.Reload()}),e.on("addedfile",function(e){$("#property-floorplans-total-progress .progress-bar").css({width:"0%"}),$("#property-floorplans-total-progress .progress-bar .percentage").html("0%")}),e.on("totaluploadprogress",function(e){$("#property-floorplans-total-progress .progress-bar").css({width:e+"%"}),$("#property-floorplans-total-progress .progress-bar .percentage").html(e+"%")}),e.on("sending",function(e){$("#property-floorplans-total-progress").fadeIn(),$("#property-floorplans-total-progress .progress-bar").css({width:"0%"}),$("#property-floorplans-total-progress .progress-bar .percentage").html("0%")}),e.on("complete",function(e){$.hood.Property.Lists.Floorplans.Reload()}),e.on("queuecomplete",function(e){$("#property-floorplans-total-progress").hide(),$.hood.Property.Lists.Floorplans.Reload()})}}},Media:{Delete:function(e){e.preventDefault();var o=$(this),r=function(e){e&&$.post(o.attr("href"),function(e){$.hood.Helpers.ProcessResponse(e),$.hood.Property.Lists.Media.Reload(),$.hood.Property.Lists.Floorplans.Reload()})};$.hood.Alerts.Confirm("The image/media will be permanently removed.","Are you sure?",r,"error",'<span class="text-danger"><i class="fa fa-exclamation-triangle"></i> <strong>This process CANNOT be undone!</strong><br /><span class="text-warning">If this is set as a featured image, this may cause issues, make sure to set another image as featured before deleting this one.</span></span>')}}},$(document).ready($.hood.Property.Init);
{
"name": "hoodcms",
"version": "4.1.2",
"version": "4.1.3",
"description": "Hood Digital's own content management system, built in ASP.NET Core 2.2, with JS and SCSS.",

@@ -5,0 +5,0 @@ "dependencies": {},

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc