From 86f9926326b7df3b4044285363933667a5a00bcb Mon Sep 17 00:00:00 2001 From: ryuring Date: Mon, 23 Oct 2023 07:16:41 +0900 Subject: [PATCH 1/5] fix XSS vulnerability in Site search Feature --- plugins/bc-admin-third/src/js/admin/permissions/form.js | 8 +++++++- .../bc_theme_file/js/admin/theme_files/submenus.bundle.js | 4 ++-- .../js/admin/theme_files/submenus.bundle.js.map | 2 +- plugins/bc-admin-third/webroot/js/admin/common.bundle.js | 2 +- .../bc-admin-third/webroot/js/admin/common.bundle.js.map | 2 +- .../webroot/js/admin/permissions/form.bundle.js | 2 +- .../webroot/js/admin/permissions/form.bundle.js.map | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/plugins/bc-admin-third/src/js/admin/permissions/form.js b/plugins/bc-admin-third/src/js/admin/permissions/form.js index a25be70b5b..774430c448 100644 --- a/plugins/bc-admin-third/src/js/admin/permissions/form.js +++ b/plugins/bc-admin-third/src/js/admin/permissions/form.js @@ -34,7 +34,13 @@ $(function () { let permissionGroups = JSON.parse($("#permission-group").val()); permissionGroups.forEach(permissionGroup => { if (permissionGroup.type === type) { - $("#permission-group-id").append(``) + name = permissionGroup.name + .replace(/&/g, '&') + .replace(/"/g, '"') + .replace(/'/g, ''') + .replace(//g, '>'); + $("#permission-group-id").append(``) } }); } diff --git a/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js b/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js index 25c26005c4..471509babe 100644 --- a/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js +++ b/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js @@ -7,5 +7,5 @@ * @since 5.0.0 * @license https://basercms.net/license/index.html MIT License */ -$((function(){$("#ThemeFilesMenu").accordion({collapsible:!0,heightStyle:"content",active:parseInt($('.selected-plugin').attr("data-id"))})})); -//# sourceMappingURL=submenus.bundle.js.map +$((function(){$("#ThemeFilesMenu").accordion({collapsible:!0,heightStyle:"content",active:parseInt($(".selected-plugin").attr("data-id"))})})); +//# sourceMappingURL=submenus.bundle.js.map \ No newline at end of file diff --git a/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js.map b/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js.map index 8f2a8941e0..e435fa8f5e 100644 --- a/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js.map +++ b/plugins/bc-admin-third/webroot/bc_theme_file/js/admin/theme_files/submenus.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bc_theme_file/js/admin/theme_files/submenus.bundle.js","mappings":";;;;;;;;;AAUAA,GAAE,WACEA,EAAE,mBAAmBC,UAAU,CAC3BC,aAAa,EACbC,YAAa,WAErB","sources":["webpack://bc-admin-third/./src/bc_theme_file/js/admin/theme_files/submenus.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Permission Community \n *\n * @copyright Copyright (c) baserCMS Permission Community\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n$(function (){\n $('#ThemeFilesMenu').accordion({\n collapsible: true,\n heightStyle: \"content\"\n });\n});\n\n"],"names":["$","accordion","collapsible","heightStyle"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"bc_theme_file/js/admin/theme_files/submenus.bundle.js","mappings":";;;;;;;;;AAUAA,GAAE,WACEA,EAAE,mBAAmBC,UAAU,CAC3BC,aAAa,EACbC,YAAa,UACbC,OAAQC,SAASL,EAAE,oBAAoBM,KAAK,aAEpD","sources":["webpack://bc-admin-third/./src/bc_theme_file/js/admin/theme_files/submenus.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Permission Community \n *\n * @copyright Copyright (c) baserCMS Permission Community\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n$(function () {\n $('#ThemeFilesMenu').accordion({\n collapsible: true,\n heightStyle: \"content\",\n active: parseInt($('.selected-plugin').attr(\"data-id\"))\n });\n});\n\n"],"names":["$","accordion","collapsible","heightStyle","active","parseInt","attr"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/bc-admin-third/webroot/js/admin/common.bundle.js b/plugins/bc-admin-third/webroot/js/admin/common.bundle.js index 972e6459c9..ff2e37800f 100644 --- a/plugins/bc-admin-third/webroot/js/admin/common.bundle.js +++ b/plugins/bc-admin-third/webroot/js/admin/common.bundle.js @@ -98,7 +98,7 @@ * @since 5.0.0 * @license https://basercms.net/license/index.html MIT License */ -!function(e){e.bcTree={shiftOnAnchor:!1,ctrlOnAnchor:!1,contextmenuAddOnly:!1,settings:[],dropTarget:null,dragTarget:null,treeDom:null,jsTree:null,listDisplayed:null,beforeParentId:null,beforePosition:null,currentSiteId:1,config:{isAdmin:!1,isUseMoveContents:!1,adminPrefix:"admin",editInIndexDisabled:!1},_inited:!1,init:function(t){t&&e.extend(e.bcTree.config,t),e.bcTree._inited=!0},load:function(){if(e.bcUtil.showLoader(),e.bcTree._inited){e("#viewsetting-mode").val();e.bcTree.listDisplayed=e.bcTimeUtil.getNowDateTime(),e.bcTree._init(),e(e.bcTree).trigger("loaded"),e.bcUtil.hideLoader()}},_init:function(){if(!e("#ContentsTreeList").length)return!1;e.bcTree.settings=e.parseJSON(e("#bcmanagecontent").val()),e.bcTree.treeDom=e("#ContentsTreeList"),e.bcTree.createTree(),e.bcTree.jsTree=e.bcTree.treeDom.jstree(!0),e.bcTree.treeDom.bind("move_node.jstree",(function(t,n){e.bcTree.beforeParentId=n.old_parent,e.bcTree.beforePosition=n.old_position})),e.bcTree.treeDom.bind("dblclick",e.bcTree.updateShiftAndCtrlOnAnchor),e.bcTree.treeDom.bind("dblclick.jstree",(function(t){if("trash"==e("#viewsetting-mode").val())return!1;var n=e(t.target).closest("li").attr("id"),r=e.bcTree.jsTree.get_node(n).data.jstree;("default"==r.type||r.alias)&&(null!=e.bcTree.settings[r.contentType]&&e.bcTree.settings[r.contentType].editDisabled||(r.alias?e.bcTree.openUrl(e.bcUtil.adminBaseUrl+"baser-core/contents/edit_alias/"+r.contentId):null==e.bcTree.settings[r.contentType]?e.bcTree.openUrl(e.bcTree.createLink(e.baseUrl()+"/"+e.bcTree.config.baserCorePrefix+"/"+e.bcTree.config.adminPrefix+"/contents/edit",r.contentId,r.contentParentId,r.contentEntityId)):void 0!==e.bcTree.settings[r.contentType].url.dblclick?e.bcTree.openUrl(e.bcTree.createLink(e.bcTree.settings[r.contentType].url.dblclick,r.contentId,r.contentParentId,r.contentEntityId)):e.bcTree.openUrl(e.bcTree.createLink(e.bcTree.settings[r.contentType].url.edit,r.contentId,r.contentParentId,r.contentEntityId))))})),e.bcTree.treeDom.on("show_contextmenu.jstree",(function(){e("ul.jstree-contextmenu li").each((function(){e.bcTree.isAliasMenuByLabel(e.trim(e(this).text()))&&e(this).find("a i").after(''),e.bcTree.isAddMenuByLabel(e.trim(e(this).text()))&&e(this).find("a i").after('')}))})),e.bcTree.treeDom.on("after_open.jstree",(function(t){e.bcTree.refreshTree()})),e.bcTree.treeDom.on("set_text.jstree",(function(t){e.bcTree.refreshTree()})),e.bcTree.treeDom.on("ready.jstree",(function(t){e.bcTree.treeDom.show(),e.bcTree.refreshTree()}))},destroy:function(){e.bcTree.treeDom&&(e.bcTree.treeDom.unbind("dblclick"),e.bcTree.treeDom.unbind("dblclick.jstree"),e.bcTree.treeDom.unbind("show_contextmenu.jstree"),e.bcTree.treeDom.unbind("after_open.jstree"),e.bcTree.treeDom.unbind("set_text.jstree"),e.bcTree.treeDom.unbind("ready.jstree"),e.bcTree.treeDom.remove()),e.bcTree.shiftOnAnchor=!1,e.bcTree.ctrlOnAnchor=!1,e.bcTree.contextmenuAddOnly=!1,e.bcTree.settings=[],e.bcTree.dropTarget=null,e.bcTree.dragTarget=null,e.bcTree.treeDom=null,e.bcTree.jsTree=null},createTree:function(){e.bcTree.treeDom.jstree({core:{themes:{name:"proton",stripes:!0,variant:"large"},multiple:!1,force_text:!0,check_callback:function(t,n,r,o,a){if("move_node"==t)return!!e.bcTree.config.isUseMoveContents&&("folder"!=r.type||r.data.jstree.alias||n.data.jstree.contentSiteRoot?(e.bcTree.dropTarget=null,e.bcTree.dragTarget=null,!1):(e.bcTree.dropTarget=r,e.bcTree.dragTarget=n,!0))}},plugins:["dnd","changed","state","wholerow","contextmenu","types"],dnd:{large_drop_target:!0},types:{default:{},folder:{}},state:{key:"jstree-"+e.bcTree.currentSiteId,events:"open_all.jstree close_all.jstree changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree"},contextmenu:{show_at_node:!1,items:function(t){var n,r=t.data.jstree,o=e("#viewsetting-mode").val();n="folder"!==r.type||t.data.jstree.alias?e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_parent(t)):t;var a=!1,i=!1,c=null,s=null,l=null,d=!1;void 0!==e.bcTree.settings[r.contentType]&&(a=r.editDisabled,i=r.manageDisabled,s=e.bcTree.settings[r.contentType].url.manage,c=e.bcTree.settings[r.contentType].url.edit,l=e.bcTree.settings[r.contentType].url.copy,d=!0);var u,b={};d&&r.status&&r.contentFullUrl&&!e.bcTree.contextmenuAddOnly&&"index"===o&&e.extend(!0,b,{view:{label:bcI18n.bcTreeCheck,icon:"bca-icon--preview",action:function(t){e.bcTree.openUrl(r.contentFullUrl,!0)}}}),!d||e.bcTree.config.editInIndexDisabled||a||r.contentSiteRoot||"index"!==o||e.bcTree.contextmenuAddOnly||r.related||(r.status?r.status&&e.extend(!0,b,{unpublish:{label:bcI18n.bcTreeUnpublish,icon:"bca-icon--unpublish",action:function(n){e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/change_status.json",type:"PATCH",data:{id:r.contentId,status:"unpublish",type:r.contentType,siteId:r.contentSiteId,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(n){t.data.jstree.status=!1,e.bcTree.refreshTree()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}}}):e.extend(!0,b,{publish:{label:bcI18n.bcTreePublish,icon:"bca-icon--publish",action:function(n){e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/change_status.json",type:"PATCH",data:{id:r.contentId,status:"publish",type:r.contentType,siteId:r.contentSiteId,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(n){t.data.jstree.status=!0,e.bcTree.refreshTree()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}}})),i||e.bcTree.contextmenuAddOnly||!s||"index"!==o||r.alias||e.extend(!0,b,{manage:{label:bcI18n.bcTreeManage,icon:"bca-icon--th-list",action:function(t){e.bcTree.openUrl(e.bcTree.createLink(s,r.contentId,r.contentParentId,r.contentEntityId))}}}),!d||e.bcTree.config.editInIndexDisabled||a||e.bcTree.contextmenuAddOnly||r.contentSiteRoot||"index"!==o||r.related||e.extend(!0,b,{rename:{label:bcI18n.bcTreeRename,icon:"bca-icon--rename",action:function(n){e.bcTree.renameContent(t,t.text)}}}),!d||a||e.bcTree.contextmenuAddOnly||"index"!==o||e.extend(!0,b,{edit:{label:bcI18n.bcTreeEdit,icon:"bca-icon--edit",action:function(n){t.data.jstree.alias?e.bcTree.openUrl(e.bcUtil.adminBaseUrl+"baser-core/contents/edit_alias/"+r.contentId):e.bcTree.openUrl(e.bcTree.createLink(c,r.contentId,r.contentParentId,r.contentEntityId))}}}),a||e.bcTree.contextmenuAddOnly||"ContentFolder"===r.contentType||r.alias||!l||"index"!==o||e.extend(!0,b,{copy:{label:bcI18n.bcTreeCopy,icon:"bca-icon--copy",action:function(r){e.bcTree.copyContent(n,t)}}}),u=r.alias?bcI18n.bcTreeDelete:bcI18n.bcTreeToTrash,e.bcTree.config.editInIndexDisabled||a||r.deleteDisabled||e.bcTree.contextmenuAddOnly||r.contentSiteRoot||"index"!==o||e.extend(!0,b,{delete:{label:u,icon:"bca-icon--delete",action:function(n){var o=bcI18n.bcTreeConfirmToTrash;r.alias&&(o=bcI18n.bcTreeConfirmDeleteAlias),confirm(o)&&e.bcTree.deleteContent(t)}}}),"trash"===o&&e.extend(!0,b,{return:{_disabled:a,label:bcI18n.bcTreeUndo,icon:"bca-icon--undo",action:function(n){r.alias?e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/exists/"+r.contentAliasId+".json",type:"GET",dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},complete:function(){e.bcUtil.hideLoader()}}).done((function(n){n.exists?e.bcTree.returnContent(t):e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage1)})):e.bcTree.returnContent(t)}},empty:{_disabled:!e.bcTree.config.isAdmin,label:bcI18n.bcTreeEmptyTrash,icon:"bca-icon--ban",action:function(t){confirm(bcI18n.bcTreeConfirmMessage1)&&e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/trash_empty.json",type:"DELETE",dataType:"json",data:{empty:!0,_csrfToken:e.bcToken.key},beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(t){if(t){var n=[];e("li.jstree-node").each((function(t){n.push(e.bcTree.jsTree.get_node(this))})),e.bcTree.jsTree.delete_node(n),e.bcUtil.showNoticeMessage(t.message),e("#DataList").html('
'+bcI18n.bcTreeInfoMessage1+"
")}},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage2,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}}});var h=e.extend(!0,{},e.bcTree.settings);if(delete h.Default,t.data.jstree.alias&&delete h.ContentAlias,"index"===o){var f={},T=1;e.each(h,(function(t,o){7===T&&(f.Etc={separator_before:!1,separator_after:!1,label:"その他...",submenu:{}}),T<=6?o.addDisabled||(f[t]=e.bcTree.createMenu(o,n,r,T)):o.addDisabled||(f.Etc.submenu[t]=e.bcTree.createMenu(o,n,r,T)),T++})),e.extend(!0,b,f)}return b}}})},isAddMenuByLabel:function(t){var n=e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_selected()),r=e.extend(!0,{},e.bcTree.settings);delete r.Default,n.data.jstree.alias&&delete r.ContentAlias;var o=1,a=!1;return e.each(r,(function(e){t==o+"."+this.title&&(a=!0),o++})),a},isAliasMenuByLabel:function(t){var n=e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_selected()),r=e.extend(!0,{},e.bcTree.settings);delete r.Default,n.data.jstree.alias&&delete r.ContentAlias;var o=1,a=!1;return e.each(r,(function(e){return"Default"==e||(!(!n.data.jstree.alias||"ContentLink"!=e)||(t==o+"."+this.title&&!this.multiple&&this.exists&&(a=!0),void o++))})),a},refreshTree:function(t){void 0===t&&(t=!1);var n=e.bcTree.jsTree.get_json("#",{flat:!0});sort=1,e(n).each((function(){e.bcTree.jsTree.get_node(this.id).data.jstree.sort=sort,sort++})),e("li.jstree-node").each((function(n){var r=e.bcTree.jsTree.get_node(this);t&&(r.data.jstree.contentFullUrl=!1),e(this).find("div.jstree-wholerow").each((function(){return e(this).removeClass("jstree-unpublish-odd jstree-unpublish-even jstree-publish-odd jstree-publish-even"),!1})),0==r.data.jstree.status?n%2==0?e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-unpublish-odd"),!1})):e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-unpublish-even"),!1})):n%2==0?e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-publish-odd"),!1})):e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-publish-even"),!1})),r.data.jstree.alias&&e(this).find("a i.jstree-icon:first").after(''),e(this).find("a.jstree-anchor:first").after(''),e(this).find(".content-name").remove(),r.data.jstree.name&&e(this).find("a.jstree-anchor:first").after('( '+decodeURIComponent(r.data.jstree.name)+" )")})),e("span.function").on("click",(function(t){return e.bcTree.jsTree.deselect_all(),e.bcTree.jsTree.select_node(e.bcTree.jsTree.get_node(e(this).parent().attr("id"))),e.bcTree.jsTree.show_contextmenu(e.bcTree.jsTree.get_selected(),t.pageX,t.pageY),!1})),e("span.function").on("contextmenu",(function(t){return e.bcTree.jsTree.deselect_all(),e.bcTree.jsTree.select_node(e.bcTree.jsTree.get_node(e(this).parent().attr("id"))),e.bcTree.jsTree.show_contextmenu(e.bcTree.jsTree.get_selected(),t.pageX,t.pageY),!1})),e.bcTree.config.isUseMoveContents&&e(".jstree-icon").css("cursor","move")},returnContent:function(t){e.bcToken.check((function(){return e(location).prop("href",e.bcUtil.adminBaseUrl+"baser-core/contents/trash_return/"+t.data.jstree.contentId)}),{hideLoader:!1})},openUrl:function(t,n){n=void 0!==n&&n,e.bcTree.ctrlOnAnchor||n?window.open(t):e.bcTree.shiftOnAnchor?window.open(t,"_blank"):window.location.href=t},createMenu:function(t,n,r,o){var a,i,c="default",s=null,l=bcI18n.bcTreeNewTitle.sprintf(t.title),d=t.plugin,u=t.type,b=null;if(a=i=t.url.icon?t.url.icon:t.icon,"ContentFolder"==t.type){var h=!0;c="folder"}else if("ContentLink"==t.type)var f=!0;else"ContentAlias"==t.type?(a=r.icon,s=r.contentId,d=r.contentPlugin,u=r.contentType,l=bcI18n.bcTreeAliasTitle.sprintf(r.contentTitle),b=r.contentEntityId):!t.multiple&&t.exists&&(l=bcI18n.bcTreeAliasTitle.sprintf(t.existsTitle));return{label:""+o+"."+t.title,icon:i,separator_before:h,separator_after:f,action:function(){e.bcTree.createContent(n,{type:c,icon:a,contentParentId:n.data.jstree.contentId,contentTitle:l,contentPlugin:d,contentType:u,contentSiteId:n.data.jstree.contentSiteId,contentAliasId:s,contentEntityId:b})}}},createContent:function(t,n){var r={icon:null,type:"default",status:!1,contentId:null,contentParentId:null,contentTitle:bcI18n.bcTreeUnNamedTitle,contentPlugin:null,contentType:null,contentEntityId:null,contentFullUrl:null,contentSiteId:null,contentAliasId:null};e.extend(!0,r,n),n=r;var o="";!e.bcTree.settings[n.contentType].multiple&&e.bcTree.settings[n.contentType].exists||n.contentAliasId?(o=e.bcUtil.apiAdminBaseUrl+"baser-core/contents/add_alias.json",n.alias=!0):o=e.bcTree.settings[n.contentType].url.add;var a=e.bcTree.jsTree.create_node(t,{text:n.contentTitle,data:{jstree:n}}),i=e.bcTree.jsTree.get_node(a);e.bcTree.jsTree.edit(i,n.contentTitle,(function(t){e.bcToken.check((function(){var r={parent_id:n.contentParentId,title:t.text,plugin:n.contentPlugin,type:n.contentType,site_id:n.contentSiteId,alias_id:n.contentAliasId,entity_id:n.contentEntityId};return e.ajax({url:o,type:"POST",data:{_csrfToken:e.bcToken.key,content:r},dataType:"json",beforeSend:function(){this.data=e.bcTree.fillExtraData(this.data,n),e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(r){e.bcUtil.showNoticeMessage(r.message),e.bcTree.settings[n.contentType].exists=!0,e.bcTree.settings[n.contentType].existsTitle=t.text,n.contentId=r.content.id,n.contentEntityId=r.content.entity_id,n.name=decodeURIComponent(r.content.name),i.data.jstree=n,e.bcTree.refreshTree()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage6,t),e.bcTree.jsTree.delete_node(i),e.bcUtil.hideLoader()}}).then((function(){return e.bcUtil.ajax(e.bcUtil.apiAdminBaseUrl+"baser-core/contents/get_full_url/"+n.contentId+".json",{},{type:"GET",dataType:"json"}).done((function(e){n.contentFullUrl=decodeURI(e.fullUrl),i.data.jstree=n,"ContentFolder"==n.contentType&&(i.type="folder")}))}))}),{hideLoader:!1})}))},fillExtraData:function(t,n){var r=function(){switch(n.contentType){case"ContentFolder":return{folder_template:"",page_template:""};case"Page":return{contents:"",draft:"",page_template:"",code:""}}}();return r&&(t+="&"+encodeURI(e.param(r))),t},deleteContent:function(t){var n=t.data.jstree;e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/delete/"+n.contentId+".json",type:"POST",data:{id:n.contentId,entity_id:n.contentEntityId,alias:n.alias,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(r){e.bcUtil.showNoticeMessage(r.message),e.bcToken.key=null,e.bcTree.jsTree.delete_node(t);for(var o=e.bcTree.jsTree.get_json(null,{flat:!0}),a=0;a/g,">"),e.ajax(e.bcUtil.apiAdminBaseUrl+"baser-core/contents/get_full_url/"+r.contentId+".json",{type:"GET",dataType:"json"}).done((function(n){r.contentFullUrl=n.fullUrl;var o=e.bcTree.jsTree.create_node(t,{text:r.contentTitle,data:{jstree:r}}),a=e.bcTree.jsTree.get_node(o);a.data.jstree=r,"ContentFolder"===r.contentType&&(a.type="folder"),e.bcUtil.hideLoader(),e.bcTree.renameContent(a,r.contentTitle,!0)}))},error:function(t){e.bcToken.key=null,e.bcUtil.showAjaxError(bcI18n.commonCopyFailedMessage,t),e.bcUtil.hideLoader()}})}),{useUpdate:!1,hideLoader:!1})},renameContent:function(t,n,r){void 0===r&&(r=!1);var o=n;e.bcTree.jsTree.edit(t,o,(function(a){var i=a.text;if(e.bcTree.jsTree.rename_node(a,i),o===i)return!1;e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/rename.json",type:"PATCH",dataType:"json",data:{id:t.data.jstree.contentId,title:i,first:+r,_csrfToken:e.bcToken.key},beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(n){n||e.bcUtil.showNoticeMessage(n.message),e.bcTree.settings[t.data.jstree.contentType].existsTitle=a.text,a.data.jstree.contentFullUrl=n.url,a.data.jstree.name=n.name,e.bcTree.refreshTree()},error:function(t){e.bcTree.jsTree.rename_node(a,n),t.responseText=null,e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage5,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}))},createLink:function(e,t,n,r){var o=e;return r&&(o+="/"+r),t&&(o+="/content_id:"+t),n&&(o+="/parent_id:"+n),o},orderContent:function(t,n){e.bcTree.changeNormalCursor();var r=!1,o=e.bcTree.jsTree.get_node(n.element);o||(o=e.bcTree.dragTarget),o||(r=!0);var a=o.data.jstree.sort;e.bcTree.refreshTree();var i=o.data.jstree.sort-a;if(0==i&&(e.bcTree.dropTarget||(r=!0),o.data.jstree.contentParentId==e.bcTree.dropTarget.data.jstree.contentId&&(r=!0)),r||!confirm(bcI18n.commonSortSaveConfirmMessage))return o.parent!=e.bcTree.beforeParentId||i>=0?e.bcTree.jsTree.move_node(o,e.bcTree.beforeParentId,e.bcTree.beforePosition):e.bcTree.jsTree.move_node(o,e.bcTree.beforeParentId,e.bcTree.beforePosition+1),e.bcTree.refreshTree(),!1;e.bcTree.dropTarget&&e.bcTree.jsTree.open_node(e.bcTree.dropTarget);var c=e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_next_dom(o,!0)),s=null;c&&(s=c.data.jstree.contentId),e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/move.json",type:"PATCH",data:{origin:{id:o.data.jstree.contentId,parentId:o.data.jstree.contentParentId,type:o.data.jstree.contentType,entityId:o.data.jstree.contentEntityId},target:{id:s,parentId:e.bcTree.dropTarget.data.jstree.contentId,siteId:e.bcTree.dropTarget.data.jstree.contentSiteId},listDisplayed:e.bcTree.listDisplayed,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(t){o.data.jstree.contentFullUrl=t.url,e.bcTree.refreshTree(!0),o.data.jstree.contentParentId=e.bcTree.dropTarget.data.jstree.contentId,e.bcUtil.showNoticeMessage(t.message),e.bcUtil.hideLoader()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.commonSortSaveFailedMessage,t),e.bcTree.load()},complete:function(){}})}),{hideLoader:!1})},showMenuByOuter:function(t){return e.bcTree.contextmenuAddOnly=!0,e.bcTree.jsTree.get_selected().length||e.bcTree.jsTree.select_node(e.bcTree.jsTree.get_json()),e.bcTree.jsTree.show_contextmenu(e.bcTree.jsTree.get_selected(),t.pageX,t.pageY),e.bcTree.contextmenuAddOnly=!1,!1},updateShiftAndCtrlOnAnchor:function(t){e.bcTree.shiftOnAnchor=t.shiftKey,e.bcTree.ctrlOnAnchor=t.ctrlKey||t.metaKey},changeDnDCursor:function(){e("#ContentsTreeList .jstree-wholerow").css("cursor","move"),e("#ContentsTreeList .jstree-anchor").css("cursor","move"),e("#ContentsTreeList .function").css("cursor","move"),e("#ContentsTreeList .jstree-ocl").css("cursor","move")},changeNormalCursor:function(){e("#ContentsTreeList .jstree-wholerow").css("cursor","pointer"),e("#ContentsTreeList .jstree-anchor").css("cursor","pointer"),e("#ContentsTreeList .function").css("cursor","pointer"),e("#ContentsTreeList .jstree-ocl").css("cursor","pointer")}}}(jQuery)},319:()=>{ +!function(e){e.bcTree={shiftOnAnchor:!1,ctrlOnAnchor:!1,contextmenuAddOnly:!1,settings:[],dropTarget:null,dragTarget:null,treeDom:null,jsTree:null,listDisplayed:null,beforeParentId:null,beforePosition:null,currentSiteId:1,config:{isAdmin:!1,isUseMoveContents:!1,adminPrefix:"admin",editInIndexDisabled:!1},_inited:!1,init:function(t){t&&e.extend(e.bcTree.config,t),e.bcTree._inited=!0},load:function(){if(e.bcUtil.showLoader(),e.bcTree._inited){e("#viewsetting-mode").val();e.bcTree.listDisplayed=e.bcTimeUtil.getNowDateTime(),e.bcTree._init(),e(e.bcTree).trigger("loaded"),e.bcUtil.hideLoader()}},_init:function(){if(!e("#ContentsTreeList").length)return!1;e.bcTree.settings=e.parseJSON(e("#bcmanagecontent").val()),e.bcTree.treeDom=e("#ContentsTreeList"),e.bcTree.createTree(),e.bcTree.jsTree=e.bcTree.treeDom.jstree(!0),e.bcTree.treeDom.bind("move_node.jstree",(function(t,n){e.bcTree.beforeParentId=n.old_parent,e.bcTree.beforePosition=n.old_position})),e.bcTree.treeDom.bind("dblclick",e.bcTree.updateShiftAndCtrlOnAnchor),e.bcTree.treeDom.bind("dblclick.jstree",(function(t){if("trash"==e("#viewsetting-mode").val())return!1;var n=e(t.target).closest("li").attr("id"),r=e.bcTree.jsTree.get_node(n).data.jstree;("default"==r.type||r.alias)&&(null!=e.bcTree.settings[r.contentType]&&e.bcTree.settings[r.contentType].editDisabled||(r.alias?e.bcTree.openUrl(e.bcUtil.adminBaseUrl+"baser-core/contents/edit_alias/"+r.contentId):null==e.bcTree.settings[r.contentType]?e.bcTree.openUrl(e.bcTree.createLink(e.baseUrl()+"/"+e.bcTree.config.baserCorePrefix+"/"+e.bcTree.config.adminPrefix+"/contents/edit",r.contentId,r.contentParentId,r.contentEntityId)):void 0!==e.bcTree.settings[r.contentType].url.dblclick?e.bcTree.openUrl(e.bcTree.createLink(e.bcTree.settings[r.contentType].url.dblclick,r.contentId,r.contentParentId,r.contentEntityId)):e.bcTree.openUrl(e.bcTree.createLink(e.bcTree.settings[r.contentType].url.edit,r.contentId,r.contentParentId,r.contentEntityId))))})),e.bcTree.treeDom.on("show_contextmenu.jstree",(function(){e("ul.jstree-contextmenu li").each((function(){e.bcTree.isAliasMenuByLabel(e.trim(e(this).text()))&&e(this).find("a i").after(''),e.bcTree.isAddMenuByLabel(e.trim(e(this).text()))&&e(this).find("a i").after('')}))})),e.bcTree.treeDom.on("after_open.jstree",(function(t){e.bcTree.refreshTree()})),e.bcTree.treeDom.on("set_text.jstree",(function(t){e.bcTree.refreshTree()})),e.bcTree.treeDom.on("ready.jstree",(function(t){e.bcTree.treeDom.show(),e.bcTree.refreshTree()}))},destroy:function(){e.bcTree.treeDom&&(e.bcTree.treeDom.unbind("dblclick"),e.bcTree.treeDom.unbind("dblclick.jstree"),e.bcTree.treeDom.unbind("show_contextmenu.jstree"),e.bcTree.treeDom.unbind("after_open.jstree"),e.bcTree.treeDom.unbind("set_text.jstree"),e.bcTree.treeDom.unbind("ready.jstree"),e.bcTree.treeDom.remove()),e.bcTree.shiftOnAnchor=!1,e.bcTree.ctrlOnAnchor=!1,e.bcTree.contextmenuAddOnly=!1,e.bcTree.settings=[],e.bcTree.dropTarget=null,e.bcTree.dragTarget=null,e.bcTree.treeDom=null,e.bcTree.jsTree=null},createTree:function(){e.bcTree.treeDom.jstree({core:{themes:{name:"proton",stripes:!0,variant:"large"},multiple:!1,force_text:!0,check_callback:function(t,n,r,o,a){if("move_node"==t)return!!e.bcTree.config.isUseMoveContents&&("folder"!=r.type||r.data.jstree.alias||n.data.jstree.contentSiteRoot?(e.bcTree.dropTarget=null,e.bcTree.dragTarget=null,!1):(e.bcTree.dropTarget=r,e.bcTree.dragTarget=n,!0))}},plugins:["dnd","changed","state","wholerow","contextmenu","types"],dnd:{large_drop_target:!0},types:{default:{},folder:{}},state:{key:"jstree-"+e.bcTree.currentSiteId,events:"open_all.jstree close_all.jstree changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree"},contextmenu:{show_at_node:!1,items:function(t){var n,r=t.data.jstree,o=e("#viewsetting-mode").val();n="folder"!==r.type||t.data.jstree.alias?e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_parent(t)):t;var a=!1,i=!1,c=null,s=null,l=null,d=!1;void 0!==e.bcTree.settings[r.contentType]&&(a=r.editDisabled,i=r.manageDisabled,s=e.bcTree.settings[r.contentType].url.manage,c=e.bcTree.settings[r.contentType].url.edit,l=e.bcTree.settings[r.contentType].url.copy,d=!0);var u,b={};d&&r.status&&r.contentFullUrl&&!e.bcTree.contextmenuAddOnly&&"index"===o&&e.extend(!0,b,{view:{label:bcI18n.bcTreeCheck,icon:"bca-icon--preview",action:function(t){e.bcTree.openUrl(r.contentFullUrl,!0)}}}),!d||e.bcTree.config.editInIndexDisabled||a||r.contentSiteRoot||"index"!==o||e.bcTree.contextmenuAddOnly||r.related||(r.status?r.status&&e.extend(!0,b,{unpublish:{label:bcI18n.bcTreeUnpublish,icon:"bca-icon--unpublish",action:function(n){e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/change_status.json",type:"PATCH",data:{id:r.contentId,status:"unpublish",type:r.contentType,siteId:r.contentSiteId,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(n){t.data.jstree.status=!1,e.bcTree.refreshTree()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}}}):e.extend(!0,b,{publish:{label:bcI18n.bcTreePublish,icon:"bca-icon--publish",action:function(n){e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/change_status.json",type:"PATCH",data:{id:r.contentId,status:"publish",type:r.contentType,siteId:r.contentSiteId,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(n){t.data.jstree.status=!0,e.bcTree.refreshTree()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}}})),i||e.bcTree.contextmenuAddOnly||!s||"index"!==o||r.alias||e.extend(!0,b,{manage:{label:bcI18n.bcTreeManage,icon:"bca-icon--th-list",action:function(t){e.bcTree.openUrl(e.bcTree.createLink(s,r.contentId,r.contentParentId,r.contentEntityId))}}}),!d||e.bcTree.config.editInIndexDisabled||a||e.bcTree.contextmenuAddOnly||r.contentSiteRoot||"index"!==o||r.related||e.extend(!0,b,{rename:{label:bcI18n.bcTreeRename,icon:"bca-icon--rename",action:function(n){e.bcTree.renameContent(t,t.text)}}}),!d||a||e.bcTree.contextmenuAddOnly||"index"!==o||e.extend(!0,b,{edit:{label:bcI18n.bcTreeEdit,icon:"bca-icon--edit",action:function(n){t.data.jstree.alias?e.bcTree.openUrl(e.bcUtil.adminBaseUrl+"baser-core/contents/edit_alias/"+r.contentId):e.bcTree.openUrl(e.bcTree.createLink(c,r.contentId,r.contentParentId,r.contentEntityId))}}}),a||e.bcTree.contextmenuAddOnly||"ContentFolder"===r.contentType||r.alias||!l||"index"!==o||e.extend(!0,b,{copy:{label:bcI18n.bcTreeCopy,icon:"bca-icon--copy",action:function(r){e.bcTree.copyContent(n,t)}}}),u=r.alias?bcI18n.bcTreeDelete:bcI18n.bcTreeToTrash,e.bcTree.config.editInIndexDisabled||a||r.deleteDisabled||e.bcTree.contextmenuAddOnly||r.contentSiteRoot||"index"!==o||e.extend(!0,b,{delete:{label:u,icon:"bca-icon--delete",action:function(n){var o=bcI18n.bcTreeConfirmToTrash;r.alias&&(o=bcI18n.bcTreeConfirmDeleteAlias),confirm(o)&&e.bcTree.deleteContent(t)}}}),"trash"===o&&e.extend(!0,b,{return:{_disabled:a,label:bcI18n.bcTreeUndo,icon:"bca-icon--undo",action:function(n){r.alias?e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/exists/"+r.contentAliasId+".json",type:"GET",dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},complete:function(){e.bcUtil.hideLoader()}}).done((function(n){n.exists?e.bcTree.returnContent(t):e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage1)})):e.bcTree.returnContent(t)}},empty:{_disabled:!e.bcTree.config.isAdmin,label:bcI18n.bcTreeEmptyTrash,icon:"bca-icon--ban",action:function(t){confirm(bcI18n.bcTreeConfirmMessage1)&&e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/trash_empty.json",type:"DELETE",dataType:"json",data:{empty:!0,_csrfToken:e.bcToken.key},beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(t){if(t){var n=[];e("li.jstree-node").each((function(t){n.push(e.bcTree.jsTree.get_node(this))})),e.bcTree.jsTree.delete_node(n),e.bcUtil.showNoticeMessage(t.message),e("#DataList").html('
'+bcI18n.bcTreeInfoMessage1+"
")}},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage2,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}}});var h=e.extend(!0,{},e.bcTree.settings);if(delete h.Default,t.data.jstree.alias&&delete h.ContentAlias,"index"===o){var f={},T=1;e.each(h,(function(t,o){7===T&&(f.Etc={separator_before:!1,separator_after:!1,label:"その他...",submenu:{}}),T<=6?o.addDisabled||(f[t]=e.bcTree.createMenu(o,n,r,T)):o.addDisabled||(f.Etc.submenu[t]=e.bcTree.createMenu(o,n,r,T)),T++})),e.extend(!0,b,f)}return b}}})},isAddMenuByLabel:function(t){var n=e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_selected()),r=e.extend(!0,{},e.bcTree.settings);delete r.Default,n.data.jstree.alias&&delete r.ContentAlias;var o=1,a=!1;return e.each(r,(function(e){t==o+"."+this.title&&(a=!0),o++})),a},isAliasMenuByLabel:function(t){var n=e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_selected()),r=e.extend(!0,{},e.bcTree.settings);delete r.Default,n.data.jstree.alias&&delete r.ContentAlias;var o=1,a=!1;return e.each(r,(function(e){return"Default"==e||(!(!n.data.jstree.alias||"ContentLink"!=e)||(t==o+"."+this.title&&!this.multiple&&this.exists&&(a=!0),void o++))})),a},refreshTree:function(t){void 0===t&&(t=!1);var n=e.bcTree.jsTree.get_json("#",{flat:!0});sort=1,e(n).each((function(){e.bcTree.jsTree.get_node(this.id).data.jstree.sort=sort,sort++})),e("li.jstree-node").each((function(n){var r=e.bcTree.jsTree.get_node(this);t&&(r.data.jstree.contentFullUrl=!1),e(this).find("div.jstree-wholerow").each((function(){return e(this).removeClass("jstree-unpublish-odd jstree-unpublish-even jstree-publish-odd jstree-publish-even"),!1})),0==r.data.jstree.status?n%2==0?e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-unpublish-odd"),!1})):e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-unpublish-even"),!1})):n%2==0?e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-publish-odd"),!1})):e(this).find("div.jstree-wholerow").each((function(){return e(this).addClass("jstree-publish-even"),!1})),r.data.jstree.alias&&e(this).find("a i.jstree-icon:first").after(''),e(this).find("a.jstree-anchor:first").after(''),e(this).find(".content-name").remove(),r.data.jstree.name&&e(this).find("a.jstree-anchor:first").after('( '+decodeURIComponent(r.data.jstree.name)+" )")})),e("span.function").on("click",(function(t){return e.bcTree.jsTree.deselect_all(),e.bcTree.jsTree.select_node(e.bcTree.jsTree.get_node(e(this).parent().attr("id"))),e.bcTree.jsTree.show_contextmenu(e.bcTree.jsTree.get_selected(),t.pageX,t.pageY),!1})),e("span.function").on("contextmenu",(function(t){return e.bcTree.jsTree.deselect_all(),e.bcTree.jsTree.select_node(e.bcTree.jsTree.get_node(e(this).parent().attr("id"))),e.bcTree.jsTree.show_contextmenu(e.bcTree.jsTree.get_selected(),t.pageX,t.pageY),!1})),e.bcTree.config.isUseMoveContents&&e(".jstree-icon").css("cursor","move")},returnContent:function(t){e.bcToken.check((function(){return e(location).prop("href",e.bcUtil.adminBaseUrl+"baser-core/contents/trash_return/"+t.data.jstree.contentId)}),{hideLoader:!1})},openUrl:function(t,n){n=void 0!==n&&n,e.bcTree.ctrlOnAnchor||n?window.open(t):e.bcTree.shiftOnAnchor?window.open(t,"_blank"):window.location.href=t},createMenu:function(t,n,r,o){var a,i,c="default",s=null,l=bcI18n.bcTreeNewTitle.sprintf(t.title),d=t.plugin,u=t.type,b=null;if(a=i=t.url.icon?t.url.icon:t.icon,"ContentFolder"==t.type){var h=!0;c="folder"}else if("ContentLink"==t.type)var f=!0;else"ContentAlias"==t.type?(a=r.icon,s=r.contentId,d=r.contentPlugin,u=r.contentType,l=bcI18n.bcTreeAliasTitle.sprintf(r.contentTitle),b=r.contentEntityId):!t.multiple&&t.exists&&(l=bcI18n.bcTreeAliasTitle.sprintf(t.existsTitle));return{label:""+o+"."+t.title,icon:i,separator_before:h,separator_after:f,action:function(){e.bcTree.createContent(n,{type:c,icon:a,contentParentId:n.data.jstree.contentId,contentTitle:l,contentPlugin:d,contentType:u,contentSiteId:n.data.jstree.contentSiteId,contentAliasId:s,contentEntityId:b})}}},createContent:function(t,n){var r={icon:null,type:"default",status:!1,contentId:null,contentParentId:null,contentTitle:bcI18n.bcTreeUnNamedTitle,contentPlugin:null,contentType:null,contentEntityId:null,contentFullUrl:null,contentSiteId:null,contentAliasId:null};e.extend(!0,r,n),n=r;var o="";!e.bcTree.settings[n.contentType].multiple&&e.bcTree.settings[n.contentType].exists||n.contentAliasId?(o=e.bcUtil.apiAdminBaseUrl+"baser-core/contents/add_alias.json",n.alias=!0):o=e.bcTree.settings[n.contentType].url.add;var a=e.bcTree.jsTree.create_node(t,{text:n.contentTitle,data:{jstree:n}}),i=e.bcTree.jsTree.get_node(a);e.bcTree.jsTree.edit(i,n.contentTitle,(function(t){e.bcToken.check((function(){var r={parent_id:n.contentParentId,title:t.text,plugin:n.contentPlugin,type:n.contentType,site_id:n.contentSiteId,alias_id:n.contentAliasId,entity_id:n.contentEntityId};return e.ajax({url:o,type:"POST",data:{_csrfToken:e.bcToken.key,content:r},dataType:"json",beforeSend:function(){this.data=e.bcTree.fillExtraData(this.data,n),e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(r){e.bcUtil.showNoticeMessage(r.message),e.bcTree.settings[n.contentType].exists=!0,e.bcTree.settings[n.contentType].existsTitle=t.text,n.contentId=r.content.id,n.contentEntityId=r.content.entity_id,n.name=decodeURIComponent(r.content.name),i.data.jstree=n,e.bcTree.refreshTree()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage6,t),e.bcTree.jsTree.delete_node(i),e.bcUtil.hideLoader()}}).then((function(){return e.bcUtil.ajax(e.bcUtil.apiAdminBaseUrl+"baser-core/contents/get_full_url/"+n.contentId+".json",{},{type:"GET",dataType:"json"}).done((function(e){n.contentFullUrl=decodeURI(e.fullUrl),i.data.jstree=n,"ContentFolder"==n.contentType&&(i.type="folder")}))}))}),{hideLoader:!1})}))},fillExtraData:function(t,n){var r=function(){switch(n.contentType){case"ContentFolder":return{folder_template:"",page_template:""};case"Page":return{contents:"",draft:"",page_template:"",code:""}}}();return r&&(t+="&"+encodeURI(e.param(r))),t},deleteContent:function(t){var n=t.data.jstree;e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/delete/"+n.contentId+".json",type:"POST",data:{id:n.contentId,entity_id:n.contentEntityId,alias:n.alias,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(r){e.bcUtil.showNoticeMessage(r.message),e.bcToken.key=null,e.bcTree.jsTree.delete_node(t);for(var o=e.bcTree.jsTree.get_json(null,{flat:!0}),a=0;a/g,">"),e.ajax(e.bcUtil.apiAdminBaseUrl+"baser-core/contents/get_full_url/"+r.contentId+".json",{type:"GET",dataType:"json"}).done((function(n){r.contentFullUrl=n.fullUrl;var o=e.bcTree.jsTree.create_node(t,{text:r.contentTitle,data:{jstree:r}}),a=e.bcTree.jsTree.get_node(o);a.data.jstree=r,"ContentFolder"===r.contentType&&(a.type="folder"),e.bcUtil.hideLoader(),e.bcTree.renameContent(a,r.contentTitle,!0)}))},error:function(t){e.bcToken.key=null,e.bcUtil.showAjaxError(bcI18n.commonCopyFailedMessage,t),e.bcUtil.hideLoader()}})}),{useUpdate:!1,hideLoader:!1})},renameContent:function(t,n,r){void 0===r&&(r=!1);var o=n;e.bcTree.jsTree.edit(t,o,(function(a){var i=a.text;if(e.bcTree.jsTree.rename_node(a,i),o===i)return!1;e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/rename.json",type:"PATCH",dataType:"json",data:{id:t.data.jstree.contentId,title:i,first:+r,_csrfToken:e.bcToken.key},beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(n){n||e.bcUtil.showNoticeMessage(n.message),e.bcTree.settings[t.data.jstree.contentType].existsTitle=a.text,a.data.jstree.contentFullUrl=n.url,a.data.jstree.name=n.name,e.bcTree.refreshTree()},error:function(t){e.bcTree.jsTree.rename_node(a,n),t.responseText=null,e.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage5,t)},complete:function(){e.bcUtil.hideLoader()}})}),{hideLoader:!1})}))},createLink:function(e,t,n,r){var o=e;return r&&(o+="/"+r),t&&(o+="/content_id:"+t),n&&(o+="/parent_id:"+n),o},orderContent:function(t,n){e.bcTree.changeNormalCursor();var r=!1,o=e.bcTree.jsTree.get_node(n.element);o||(o=e.bcTree.dragTarget),o||(r=!0);var a=o.data.jstree.sort;e.bcTree.refreshTree();var i=o.data.jstree.sort-a;if(0==i&&(e.bcTree.dropTarget||(r=!0),o.data.jstree.contentParentId==e.bcTree.dropTarget.data.jstree.contentId&&(r=!0)),r||!confirm(bcI18n.commonSortSaveConfirmMessage))return o.parent!=e.bcTree.beforeParentId||i>=0?e.bcTree.jsTree.move_node(o,e.bcTree.beforeParentId,e.bcTree.beforePosition):e.bcTree.jsTree.move_node(o,e.bcTree.beforeParentId,e.bcTree.beforePosition+1),e.bcTree.refreshTree(),!1;e.bcTree.dropTarget&&e.bcTree.jsTree.open_node(e.bcTree.dropTarget);var c=e.bcTree.jsTree.get_node(e.bcTree.jsTree.get_next_dom(o,!0)),s=null;c&&(s=c.data.jstree.contentId),e.bcToken.check((function(){return e.ajax({url:e.bcUtil.apiAdminBaseUrl+"baser-core/contents/move.json",type:"PATCH",data:{origin:{id:o.data.jstree.contentId,parentId:o.data.jstree.contentParentId,type:o.data.jstree.contentType,entityId:o.data.jstree.contentEntityId},target:{id:s,parentId:e.bcTree.dropTarget.data.jstree.contentId,siteId:e.bcTree.dropTarget.data.jstree.contentSiteId},listDisplayed:e.bcTree.listDisplayed,_csrfToken:e.bcToken.key},dataType:"json",beforeSend:function(){e.bcUtil.hideMessage(),e.bcUtil.showLoader()},success:function(t){o.data.jstree.contentFullUrl=t.url,e.bcTree.refreshTree(!0),o.data.jstree.contentParentId=e.bcTree.dropTarget.data.jstree.contentId,e.bcUtil.showNoticeMessage(t.message),e.bcUtil.hideLoader()},error:function(t){t.responseText=null,e.bcUtil.showAjaxError(bcI18n.commonSortSaveFailedMessage,t),e.bcTree.load()},complete:function(){}})}),{hideLoader:!1})},showMenuByOuter:function(t){return e.bcTree.contextmenuAddOnly=!0,e.bcTree.jsTree.get_selected().length||e.bcTree.jsTree.select_node(e.bcTree.jsTree.get_json()),e.bcTree.jsTree.show_contextmenu(e.bcTree.jsTree.get_selected(),t.pageX,t.pageY),e.bcTree.contextmenuAddOnly=!1,!1},updateShiftAndCtrlOnAnchor:function(t){e.bcTree.shiftOnAnchor=t.shiftKey,e.bcTree.ctrlOnAnchor=t.ctrlKey||t.metaKey},changeDnDCursor:function(){e("#ContentsTreeList .jstree-wholerow").css("cursor","move"),e("#ContentsTreeList .jstree-anchor").css("cursor","move"),e("#ContentsTreeList .function").css("cursor","move"),e("#ContentsTreeList .jstree-ocl").css("cursor","move")},changeNormalCursor:function(){e("#ContentsTreeList .jstree-wholerow").css("cursor","pointer"),e("#ContentsTreeList .jstree-anchor").css("cursor","pointer"),e("#ContentsTreeList .function").css("cursor","pointer"),e("#ContentsTreeList .jstree-ocl").css("cursor","pointer")}}}(jQuery)},319:()=>{ /** * baserCMS : Based Website Development Project * Copyright (c) NPO baser foundation diff --git a/plugins/bc-admin-third/webroot/js/admin/common.bundle.js.map b/plugins/bc-admin-third/webroot/js/admin/common.bundle.js.map index a59aab339b..78e2342708 100644 --- a/plugins/bc-admin-third/webroot/js/admin/common.bundle.js.map +++ b/plugins/bc-admin-third/webroot/js/admin/common.bundle.js.map @@ -1 +1 @@ -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6Z,EAAgB7Z,KAAa,CACtD,IAAI6X,KAAYoC,EACZrC,EAAoBuB,EAAEc,EAAapC,KACrCD,EAAoBO,EAAEN,GAAYoC,EAAYpC,IAGhD,GAAGqC,EAAS,IAAI7gB,EAAS6gB,EAAQtC,EAClC,CAEA,IADGoC,GAA4BA,EAA2BnhB,GACrDkL,EAAIsU,EAASzgB,OAAQmM,IACzB+V,EAAUzB,EAAStU,GAChB6T,EAAoBuB,EAAEU,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOlC,EAAoBQ,EAAE/e,EAAO,EAGjC8gB,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBzG,QAAQqG,EAAqBpY,KAAK,KAAM,IAC3DwY,EAAmBre,KAAOie,EAAqBpY,KAAK,KAAMwY,EAAmBre,KAAK6F,KAAKwY,G,KC7CvF,IAAIE,EAAsBzC,EAAoBQ,OAAEjiB,EAAW,CAAC,MAAO,IAAOyhB,EAAoB,QAC9FyC,EAAsBzC,EAAoBQ,EAAEiC,E","sources":["webpack://bc-admin-third/webpack/runtime/chunk loaded","webpack://bc-admin-third/./src/js/admin/_lib/jquery.baseUrl.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcBatch.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcCkeditor.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcConfirm.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcCredit.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcJwt.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcSortable.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcTimeUtil.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcToken.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcTree.js","webpack://bc-admin-third/./src/js/admin/_module/sidebar.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcUtil.js","webpack://bc-admin-third/webpack/bootstrap","webpack://bc-admin-third/webpack/runtime/define property getters","webpack://bc-admin-third/webpack/runtime/global","webpack://bc-admin-third/webpack/runtime/hasOwnProperty shorthand","webpack://bc-admin-third/webpack/runtime/make namespace object","webpack://bc-admin-third/webpack/runtime/runtimeId","webpack://bc-admin-third/webpack/runtime/jsonp chunk loading","webpack://bc-admin-third/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * baseUrl プラグイン\n */\n(function( $ ){\n $.baseUrl = function() {\n return $(\"#AdminScript\").attr('data-baseUrl');\n };\n})( jQuery );\n\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Users Community \n *\n * @copyright Copyright (c) baserCMS Users Community\n * @link https://basercms.net baserCMS Project\n * @since baserCMS v 2.0.0\n * @license https://basercms.net/license/index.html\n */\n\n/**\n * bcBatch プラグイン\n */\n\n(function ($) {\n $.bcBatch = {\n /**\n * 初期値\n */\n config: {\n batchUrl: '',\n listTable: '#ListTable',\n executeButton: '#BtnApplyBatch',\n methodSelect: '#batch',\n checkAll: '#checkall',\n targetCheckbox: '.batch-targets',\n alertBox: '#AlertMessage',\n loader: '#Waiting',\n flashBox: '#flashMessage'\n },\n /**\n * 初期化\n */\n init: function (config) {\n if (config) {\n $.extend($.bcBatch.config, config);\n }\n this.initList();\n return this;\n },\n /**\n * リストの初期化\n */\n initList: function () {\n\n var config = $.bcBatch.config;\n\n // イベント削除\n $($.bcBatch.config.executeButton).unbind();\n $($.bcBatch.config.methodSelect).unbind();\n $(config.listTable + \" \" + config.targetCheckbox).unbind();\n $(config.checkAll).unbind();\n\n // イベント登録\n $($.bcBatch.config.executeButton).click(function () {\n if (!$(config.targetCheckbox + \":checked\").length) {\n alert(bcI18n.commonSelectDataFailedMessage);\n return false;\n }\n\n if (!confirm(bcI18n.batchConfirmMessage)) {\n return false;\n }\n\n var form = $('
').append($(config.methodSelect).clone().val($(config.methodSelect).val()));\n $(config.targetCheckbox + \":checked\").each(function(){\n var value = $(this).attr('value');\n if(value) {\n form.append($('').val(value));\n }\n });\n\n $.bcToken.check(function () {\n form.append($('').val($.bcToken.key));\n return $.ajax({\n url: config.batchUrl,\n type: 'POST',\n data: form.serialize(),\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcUtil.setFlashMessage(result.message);\n location.reload();\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n $.bcToken.key = null;\n var errorMessage = '';\n if (XMLHttpRequest.status === 404) {\n errorMessage = '
' + bcI18n.commonNotFoundProgramMessage;\n } else {\n if (XMLHttpRequest.responseText && XMLHttpRequest.responseText !== 'null') {\n errorMessage = '
' + JSON.parse(XMLHttpRequest.responseText).message;\n } else {\n errorMessage = '
' + errorThrown;\n }\n }\n form.remove();\n $.bcUtil.showAlertMessage(bcI18n.commonBatchExecFailedMessage + '(' + XMLHttpRequest.status + ')' + errorMessage);\n $.bcUtil.hideLoader();\n }\n });\n }, {useUpdate: false, hideLoader: false});\n return false;\n });\n\n\n $($.bcBatch.config.methodSelect).change(toolChangeHandler);\n\n $(config.listTable + \" tbody td\").click(function () {\n var checkbox = $(this).parent().find(config.targetCheckbox);\n if (!checkbox.prop('checked')) {\n checkbox.prop('checked', true);\n } else {\n checkbox.prop('checked', false);\n }\n changeRow(checkbox);\n return false;\n });\n\n $(config.listTable + \" tbody td a\").click(function (e) {\n if ($(this).attr('rel') !== 'colorbox') {\n e.stopPropagation();\n }\n });\n\n $(config.listTable + \" \" + config.targetCheckbox).click(function (e) {\n e.stopPropagation();\n });\n\n $(config.listTable + \" \" + config.targetCheckbox).change(function () {\n changeRow($(this));\n });\n\n $(config.checkAll).change(function () {\n if ($(this).prop('checked')) {\n $(config.listTable + \" \" + config.targetCheckbox).prop('checked', true);\n } else {\n $(config.listTable + \" \" + config.targetCheckbox).prop('checked', false);\n }\n $.bcBatch.initRowSelected();\n });\n\n toolChangeHandler();\n $.bcBatch.initRowSelected();\n\n },\n /**\n * 行の選択状態を初期化\n */\n initRowSelected: function () {\n var config = $.bcBatch.config;\n $(config.listTable + \" \" + config.targetCheckbox).each(function () {\n if ($(this).prop('checked')) {\n $(this).parent().parent().addClass('selectedrow');\n } else {\n $(this).parent().parent().removeClass('selectedrow');\n }\n });\n }\n\n };\n\n /**\n * バッチ処理ドロップダウン変更時イベント\n */\n function toolChangeHandler() {\n var config = $.bcBatch.config;\n if ($(config.methodSelect).val()) {\n $(config.executeButton).removeAttr('disabled');\n } else {\n $(config.executeButton).prop('disabled', true);\n }\n }\n})(jQuery);\n\nfunction changeRow(checkbox) {\n if (checkbox.attr('checked') !== undefined) {\n $(checkbox).parent().parent().addClass('selectedrow');\n } else {\n $(checkbox).parent().parent().removeClass('selectedrow');\n }\n}\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * bcCkeditor プラグイン\n */\n(function ($) {\n $.bcCkeditor = {\n\n /**\n * editor\n */\n editor: {},\n\n /**\n * 初期化チェックフラグ\n */\n initStatus: false,\n\n /**\n * スタイル初期化チェックフラグ\n */\n styleInitStatus: false,\n\n /**\n * エディタを表示する\n * @param config\n */\n show: function (config) {\n this.setUpConfig(config);\n if (!this.initStatus) {\n CKEDITOR.addStylesSet('basercms', config.initialStyle);\n this.initStatus = true;\n }\n if (!this.styleInitStatus && config.editorStyle.length) {\n this.editorStyle.map((editor, key) => CKEDITOR.addStylesSet(key, editor));\n this.styleInitStatus = true;\n }\n config.themeEditorCsses.map((css) => {\n if (Array.isArray(CKEDITOR.config.contentsCss)) {\n CKEDITOR.config.contentsCss.push(css);\n }\n });\n this.editor[config.ckeditorField] = CKEDITOR.replace(config.editorDomId, config.editorOptions);\n this.setUpDraft(config);\n this.setUpToolBar(config);\n },\n\n /**\n * 基本設定\n * @param config\n */\n setUpConfig: function (config) {\n CKEDITOR.config.allowedContent = true;\n CKEDITOR.config.extraPlugins = 'draft,showprotected';\n CKEDITOR.config.stylesCombo_stylesSet = config.editorStylesSet;\n CKEDITOR.config.protectedSource.push(/<\\?[\\s\\S]*?\\?>/g);\n // 空「i」タグを消さないようにする\n CKEDITOR.dtd.$removeEmpty[\"i\"] = false;\n // 空「span」タグを消さないようにする\n CKEDITOR.dtd.$removeEmpty[\"span\"] = false;\n if (config.editorUrl) {\n CKEDITOR.config.templates_files = [config.editorUrl];\n }\n if (config.editorEnterBr) {\n CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;\n }\n // 複数入ることを前提に配列型に変更\n if (typeof CKEDITOR.config.contentsCss === 'string') {\n CKEDITOR.config.contentsCss = [CKEDITOR.config.contentsCss];\n }\n },\n\n /**\n * 下書き設定\n * @param config\n */\n setUpDraft: function(config)\n {\n if (!config.editorUseDraft) return;\n this.editor[config.ckeditorField].on('pluginsLoaded', function () {\n if (config.editorUseDraft) {\n if (config.draftAreaId) {\n this.draftDraftAreaId = config.draftAreaId;\n }\n if (config.publishAreaId) {\n this.draftPublishAreaId = config.publishAreaId;\n }\n if (config.editorReadonlyPublish) {\n this.draftReadOnlyPublish = true;\n }\n }\n });\n this.editor[config.ckeditorField].on('instanceReady', function () {\n if (config.editorDisableDraft) {\n this.execCommand('changePublish');\n this.execCommand('disableDraft');\n }\n if (config.editorDisablePublish) {\n this.execCommand('changeDraft');\n this.execCommand('disablePublish');\n }\n this.on('beforeCommandExec', function (e) {\n if (e.data.name === 'changePublish' || e.data.name === 'copyPublish') {\n $(`#${config.previewModeId}`).val('default');\n } else if (e.data.name === 'changeDraft' || e.data.name === 'copyDraft') {\n $(`#${config.previewModeId}`).val('draft');\n }\n });\n });\n },\n\n /**\n * ツールバー設定\n * @param config\n */\n setUpToolBar: function(config)\n {\n this.editor[config.ckeditorField].on('instanceReady', function () {\n if (this.getCommand('maximize').uiItems.length > 0) {\n // ツールバーの表示を切り替え\n this.getCommand('maximize').on('state', () => {\n if (this.state === 1) {\n $(\"#ToolBar\").hide();\n } else {\n $(\"#ToolBar\").show();\n }\n });\n }\n });\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Users Community \n *\n * @copyright Copyright (c) baserCMS Users Community\n * @link https://basercms.net baserCMS Project\n * @since baserCMS v 2.0.0\n * @license https://basercms.net/license/index.html\n */\n\n/**\n * bcConfirm\n */\n\n(function ($) {\n $.bcConfirm = {\n config: {\n title: bcI18n.bcConfirmTitle1,\n message: bcI18n.bcConfirmAlertMessage1,\n defaultCancel: true,\n ok: null\n },\n show: function (config) {\n $.extend($.bcConfirm.config, config);\n var message = $(\"
\").html($.bcConfirm.config.message);\n message.dialog({\n modal: true,\n title: $.bcConfirm.config.title,\n width: '50%',\n buttons: {\n \"キャンセル\": function () {\n $(this).dialog(\"close\");\n },\n \"OK\": function () {\n $(this).dialog(\"close\");\n if (typeof ($.bcConfirm.config.ok) == 'function') {\n $.bcConfirm.config.ok();\n } else {\n alert(bcI18n.bcConfirmAlertMessage2);\n }\n }\n }\n });\n }\n };\n})(jQuery);\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Users Community \n *\n * @copyright Copyright (c) baserCMS Users Community\n * @link https://basercms.net baserCMS Project\n * @since baserCMS v 2.0.0\n * @license https://basercms.net/license/index.html\n */\n\n/**\n * bcCredit\n */\n\n(function ($) {\n $.bcCredit = {\n show: function () {\n $.ajax({\n url: $.bcUtil.adminBaseUrl + 'baser-core/utilities/credit',\n type: \"GET\",\n success: function (result) {\n let hideTarget;\n let isLogin = false;\n let $html = $(\"html\");\n let $page = $(\"#Page\");\n let $credit = $(\"#Credit\");\n if ($(\"#SideBar\").css('display') === 'none') {\n openedFavorite = false;\n hideTarget = \"#Contents\";\n } else {\n openedFavorite = true;\n hideTarget = \"#Contents, #SideBar\";\n }\n if ($credit.length) {\n isLogin = true;\n $credit.remove();\n }\n\n if ($html.css('margin-top') !== '0px') {\n $html.prepend(result);\n } else {\n $page.prepend(result);\n }\n // 再度読み込み直す\n $credit = $(\"#Credit\");\n let $creditScroller = $(\"#CreditScroller\");\n\n if (isLogin) {\n $credit.show();\n } else {\n $credit.fadeIn(1000);\n }\n $page.css('overflow', 'hidden');\n if (!isLogin) {\n $(\"#Footer\").fadeOut(500);\n $(hideTarget).fadeOut(500, function () {\n $(\"#Footer\").fadeIn(2000);\n $.bcCredit.setViewSize();\n });\n }\n $creditScroller.fadeIn(1000);\n\n //リサイズイベント\n $(window).resize(function () {\n $.bcCredit.resizeScroll();\n });\n\n var scrollSpeed = 1;\n var height = $creditScroller.height();\n var posX = $(window).height();\n var id = setInterval(function () {\n if (posX < -height + $(window).height() / 2) {\n clearInterval(id);\n }\n posX -= scrollSpeed;\n $creditScroller.css(\"margin-top\", posX + \"px\");\n }, 40);\n\n $credit.click(function () {\n clearTimeout(id);\n $credit.fadeOut(1000, function () {\n $credit.remove();\n });\n if ($('#Login').length > 0) {\n hideTarget = \"\";\n $(\"#Wrap\").css('height', '280px');\n $(\"#LoginInner\").css('color', '#333');\n } else {\n $(\"#Wrap\").css('height', 'auto');\n if (!openedFavorite) {\n hideTarget = \"#Contents\";\n } else {\n hideTarget = \"#Contents, #SideBar\";\n }\n $(hideTarget).fadeIn(1000);\n }\n $page.css('height', 'auto').css('overflow', 'auto');\n });\n\n $(\"#CreditScrollerInner\").click(function (e) {\n if (e && e.stopPropagation) {\n e.stopPropagation();\n } else {\n window.event.cancelBubble = true;\n }\n });\n }\n });\n },\n\n /**\n * 表示領域を設定\n */\n setViewSize: function(){\n let $toolBar = $(\"#ToolBar\");\n let $credit = $(\"#Credit\");\n let $page = $(\"#Page\");\n let $html = $(\"html\");\n $(\"#Wrap\").css('height', '280px');\n $html.height($html.height() - $toolBar.outerHeight() * 1);\n $credit.height($page.height() + $toolBar.outerHeight() * 1);\n $credit.width($page.width());\n },\n\n /**\n * スクロールバーを非表示に\n */\n resizeScroll: function(){\n let $toolBar = $(\"#ToolBar\");\n let $credit = $(\"#Credit\");\n let $page = $(\"#Page\");\n let $html = $(\"html\");\n let $body = $(\"body\");\n $html.height($html.height() - $toolBar.outerHeight() * 1);\n $body.height($body.height() - $toolBar.outerHeight() * 1);\n $credit.width($page.width());\n $credit.height($page.height() + $toolBar.outerHeight() * 1);\n }\n };\n})(jQuery);\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n(function ($) {\n $.bcJwt = {\n\n /**\n * Access Token\n */\n accessToken: null,\n\n /**\n * Init\n */\n init: function() {\n let refreshToken = localStorage.getItem('refreshToken');\n if(refreshToken && refreshToken !== 'null') {\n this.getToken(refreshToken)\n }\n },\n\n /**\n * Login\n */\n login: function (email, password, saved, successCallback, errorCallback) {\n $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/users/login.json',\n type: 'post',\n data: {\n email: email,\n password: password,\n saved: (saved !== undefined && saved)? 1 : ''\n },\n dataType: 'json'\n }).done(function (response) {\n if (response) {\n this.setToken(response.access_token, response.refresh_token)\n if(successCallback) {\n successCallback(response);\n }\n }\n }.bind(this)).fail(function () {\n if(errorCallback) {\n errorCallback()\n }\n })\n },\n\n /**\n * Get Token\n * @param refreshToken\n */\n getToken: function (refreshToken) {\n if(!refreshToken) {\n return\n }\n $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/users/refresh_token.json',\n type: 'get',\n async: false,\n headers: {\n \"Authorization\": refreshToken,\n 'Content-Type': 'application/json'\n },\n dataType: 'json',\n }).done(function (response) {\n if (response) {\n this.setToken(response.access_token, response.refresh_token)\n } else {\n alert('APIトークンが取得できませんでした。ブラウザをリロードしてください。')\n }\n }.bind(this)).fail(function(error){\n if (error.status === 401) {\n localStorage.setItem('refreshToken', '')\n }\n })\n },\n\n /**\n * Set Token\n * @param accessToken\n * @param refreshToken\n */\n setToken: function (accessToken, refreshToken) {\n this.accessToken = accessToken\n localStorage.setItem('refreshToken', refreshToken);\n },\n\n /**\n * Logout\n */\n logout: function () {\n this.removeToken()\n },\n\n /**\n * Remove Token\n */\n removeToken: function () {\n localStorage.setItem('refreshToken', null);\n this.accessToken = null\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n(function ($) {\n\n $.bcSortable = {\n updateSortUrl : null,\n init: function (config) {\n this.updateSortUrl = config.updateSortUrl\n var sortHandle = $(\".sort-handle\");\n var sortTable = $(\".sort-table\");\n // イベント削除\n sortHandle.unbind();\n // 初期化されてない場合にメソッドを実行すると処理が止まってしまう為 try を利用\n try {\n $(sortTable).sortable(\"destroy\");\n } catch (e) {\n }\n // イベント登録\n var sortableOptions = {\n scroll: true,\n items: \"tr.sortable\",\n opacity: 1,\n zIndex: 55,\n containment: 'body',\n tolerance: 'pointer',\n distance: 5,\n cursor: 'move',\n handle: \".sort-handle\",\n placeholder: 'ui-sortable-placeholder',\n revert: 100,\n start: this.sortStartHandler,\n update: this.sortUpdateHandler\n };\n sortHandle.css('cursor', 'move');\n sortTable.sortable(sortableOptions);\n sortHandle.click(function (e) {\n e.stopPropagation();\n });\n },\n\n /**\n * 並び替え開始時イベント\n */\n sortStartHandler: function (event, ui) {\n var placeholder = $(\".ui-sortable-placeholder\");\n placeholder.css('height', ui.item.height());\n },\n\n /**\n * 並び順を更新時イベント\n */\n sortUpdateHandler: function (event, ui) {\n var target = ui.item;\n var targetNum = $(\".sort-table\" + \" \" + \"tr.sortable\").index(target) + 1;\n var sourceNum = target.attr('id').replace('Row', '');\n var offset = targetNum - sourceNum;\n var sortTable = $(\".sort-table\");\n var form = $('').hide();\n var sortId = $('').attr('type', 'hidden').attr('name', 'id').val(target.find('.id').val());\n var sortOffset = $('').attr('type', 'hidden').attr('name', 'offset').val(offset);\n form.append(sortId).append(sortOffset);\n\n $.bcToken.check(function () {\n form.append($.bcToken.getHiddenToken());\n var data = form.serialize();\n form.find('input[name=\"_csrfToken\"]').remove();\n return $.ajax({\n url: $.bcSortable.updateSortUrl,\n type: 'POST',\n data: data,\n dataType: 'text',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function () {\n sortTable.find(\"tr.sortable\").each(function (i, v) {\n $(this).attr('id', 'Row' + (i + 1));\n });\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n var errorMessage = '';\n if (XMLHttpRequest.status === 404) {\n errorMessage = '
' + bcI18n.commonNotFoundProgramMessage;\n } else {\n if (XMLHttpRequest.responseText) {\n errorMessage = '
' + JSON.parse(XMLHttpRequest.responseText).message;\n } else {\n errorMessage = '
' + errorThrown;\n }\n }\n sortTable.sortable(\"cancel\");\n $.bcUtil.showAlertMessage(bcI18n.commonBatchExecFailedMessage + '(' + XMLHttpRequest.status + ')' + errorMessage)\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n };\n\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n(function ($) {\n $.bcTimeUtil = {\n\n /**\n * 現在の日時を文字列で取得する\n *\n * @returns {string}\n */\n getNowDateTime : function () {\n return $.bcTimeUtil.getNowDate() + ' ' + $.bcTimeUtil.getNowTime();\n },\n\n /**\n * 現在の日付を文字列で取得する\n *\n * @returns {string}\n */\n getNowDate : function () {\n var date = new Date();\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n if (month < 10) month = '0' + month;\n if (day < 10) day = '0' + day;\n return year + '/' + month + '/' + day;\n },\n\n /**\n * 現在の時間を文字列で取得する\n *\n * @returns {string}\n */\n getNowTime : function () {\n var date = new Date();\n var hour = date.getHours();\n var minute = date.getMinutes();\n if (hour < 10) hour = '0' + hour;\n if (minute < 10) minute = '0' + minute;\n return hour + ':' + minute;\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * bcTokenプラグイン\n *\n * フロントエンドでCakePHPのセキュリティコンポーネントのトークンの管理等を行う\n */\n\n(function ($) {\n\n $.bcToken = {\n\n /**\n * トークン\n */\n key: null,\n\n /**\n * トークンを取得済かどうか\n */\n requested: false,\n\n /**\n * トークンを取得中かどうか\n */\n requesting: false,\n\n /**\n * トークンURL\n */\n url: null,\n\n /**\n * デフォルトトークンURL\n */\n defaultUrl: '/baser-core/bc_form/get_token?requestview=false',\n\n /**\n * 初期化\n */\n init: function () {\n this.setTokenUrl();\n },\n\n /**\n * トークンを取得しているかどうかチェックし、取得していない場合取得する\n * コールバック処理を登録する前提となっており、コールバック処理完了後、再度、新しいトークンを取得する\n *\n * @param callback\n * @param config\n */\n check: function (callback, config) {\n if (this.requesting) {\n var timer = setInterval(function () {\n if (!$.bcToken.requesting) {\n clearInterval(timer);\n if (callback) {\n $.bcToken.execCallback(callback, config);\n }\n }\n }, 100);\n } else {\n if (!this.key) {\n this.update(config).done(function () {\n if (callback) {\n $.bcToken.execCallback(callback, config);\n }\n });\n } else {\n if (callback) {\n this.execCallback(callback, config);\n }\n }\n }\n },\n\n /**\n * コールバック処理を実行\n * @param callback\n * @param config\n */\n execCallback: function (callback, config) {\n var _config = {\n useUpdate: true\n };\n if (config !== undefined) {\n config = $.extend(_config, config);\n } else {\n config = _config;\n }\n var result = callback();\n if (config.useUpdate) {\n config.hideLoader = true;\n config.loaderType = 'none';\n if (result) {\n result.always(function () {\n $.bcToken.update(config);\n });\n } else {\n this.update(config);\n }\n }\n },\n\n /**\n * 新しいトークンをサーバーより取得する\n *\n * @param config\n */\n update: function (config) {\n var _config = {\n type: 'GET'\n };\n if (config !== undefined) {\n config = $.extend(_config, config);\n } else {\n config = _config;\n }\n this.requesting = true;\n return $.bcUtil.ajax(this.url, function (result) {\n $.bcToken.key = result;\n $.bcToken.requesting = false;\n $('input[name=\"_csrfToken\"]').val($.bcToken.key);\n }, $.extend(true, {}, config));\n },\n\n /**\n * トークンを取得した空のフォームを取得する\n * コールバック処理の引数として利用可能\n * @param url\n * @param options\n * @param callback\n * @param config\n */\n getForm: function (url, options, callback, config) {\n var form = $('');\n form.attr('action', url).attr('method', 'post');\n this.check(function () {\n form.append($.bcToken.getHiddenToken());\n if (options.fields) form.append(options.fields);\n if (options.unlocked) form.append(options.unlocked);\n if (options.debug) form.append(options.debug);\n callback(form);\n }, config);\n },\n\n /**\n * トークン用の hidden タグを取得する\n *\n * @returns {*}\n */\n getHiddenToken: function () {\n return $('').val(this.key);\n },\n\n /**\n * 指定したURLに対しトークンを付加した上でPOST送信を行う\n * @param url\n * @param options\n */\n submitToken: function (url, options) {\n this.getForm(url, options, function (form) {\n $('body').append(form);\n form.submit();\n }, {useUpdate: false, hideLoader: false});\n },\n\n /**\n * 指定したセレクターのリンクのクリックイベントについて、\n * トークン付加前提のフォーム送信処理に置き換える\n *\n * CakePHP の postLink に対応\n * postLink を利用した場合、ローダーを表示するなどの処理を割り込ませる事ができないが、\n * CakePHP が生成するフォームでなく、こちらで生成するフォームを利用することで、ローダーを表示できるようにした。\n * @param selector\n */\n replaceLinkToSubmitToken: function (selector) {\n $(selector).each(function () {\n if ($(this).attr('onclick')) {\n var regex = /document\\.(post_.+?).submit\\(\\)/;\n var result = $(this).attr('onclick').match(regex);\n if (result) {\n $(this).attr('data-post-link-form-id', result[1]);\n }\n $(this).get(0).onclick = '';\n $(this).removeAttr('onclick');\n }\n });\n $(selector).click(function () {\n if ($(this).attr('data-confirm-message')) {\n var message = $(this).attr('data-confirm-message');\n if (!confirm(message)) {\n return false;\n }\n }\n let url = $(this).attr('href');\n let options = {};\n if ($(this).attr('data-post-link-form-id')) {\n let postLinkForm = $(\"form[name='\" + $(this).attr('data-post-link-form-id') + \"']\");\n let fields = postLinkForm.find(\"input[name='_Token[fields]']\");\n let unlocked = postLinkForm.find(\"input[name='_Token[unlocked]']\");\n let debug = postLinkForm.find(\"input[name='_Token[debug]']\");\n url = postLinkForm.attr('action');\n options = {\n fields: (fields.length) ? fields : null,\n unlocked: (unlocked.length) ? unlocked : null,\n debug: (debug.length) ? debug : null\n }\n }\n $.bcToken.submitToken(url, options);\n return false;\n });\n },\n\n /**\n * トークン発行URLのセット\n * @param url トークン発行URL。nullの場合はデフォルトURL\n */\n setTokenUrl: function (url) {\n this.url = url != null ? url : $.bcUtil.baseUrl + this.defaultUrl;\n return this;\n }\n\n };\n\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * jsTree 設定\n */\n\n(function ($) {\n $.bcTree = {\n\n /**\n * リンクをクリックする際にShiftキーを押しているかどうか\n */\n shiftOnAnchor: false,\n\n /**\n * リンクをクリックする際にCtrlキーを押しているかどうか\n */\n ctrlOnAnchor: false,\n\n /**\n * コンテキストメニューを追加項目のみとする\n */\n contextmenuAddOnly: false,\n\n /**\n * 設定 BcManageContent より値を取得\n */\n settings: [],\n\n /**\n * ドラッグターゲット\n */\n dropTarget: null,\n\n /**\n * ドロップターゲット\n */\n dragTarget: null,\n\n /**\n * ツリー構造のDOM(jQueryオブジェクト)\n */\n treeDom: null,\n\n /**\n * jsTree実体\n */\n jsTree: null,\n\n /**\n * 一覧を表示した時間\n */\n listDisplayed: null,\n\n /**\n * ノードを移動する場合の直前の親ID\n */\n beforeParentId: null,\n\n /**\n * ノードを移動する場合の直前のポジション\n */\n beforePosition: null,\n\n /**\n * 現在のサイトid\n */\n currentSiteId: 1,\n\n /**\n * 設定\n */\n config: {\n isAdmin: false,\n isUseMoveContents: false,\n adminPrefix: 'admin',\n editInIndexDisabled: false\n },\n\n /**\n * 初期化済かどうか\n */\n _inited: false,\n\n /**\n * 初期化\n * @param config\n */\n init: function (config) {\n if (config) {\n $.extend($.bcTree.config, config);\n }\n $.bcTree._inited = true;\n },\n /**\n * ツリーを読み込む\n */\n load: function () {\n $.bcUtil.showLoader();\n if (!$.bcTree._inited) {\n return;\n }\n const mode = $(\"#viewsetting-mode\").val();\n let url;\n $.bcTree.listDisplayed = $.bcTimeUtil.getNowDateTime();\n $.bcTree._init();\n $($.bcTree).trigger('loaded');\n $.bcUtil.hideLoader();\n },\n\n /**\n * ツリーを初期化する\n */\n _init: function () {\n if (!$('#ContentsTreeList').length) {\n return false;\n }\n $.bcTree.settings = $.parseJSON($(\"#bcmanagecontent\").val());\n $.bcTree.treeDom = $('#ContentsTreeList');\n $.bcTree.createTree();\n $.bcTree.jsTree = $.bcTree.treeDom.jstree(true);\n $.bcTree.treeDom.bind(\"move_node.jstree\", function (e, data) {\n $.bcTree.beforeParentId = data.old_parent;\n $.bcTree.beforePosition = data.old_position;\n });\n\n // ダブルクリックイベント\n $.bcTree.treeDom.bind(\"dblclick\", $.bcTree.updateShiftAndCtrlOnAnchor);\n\n // ダブルクリックイベント\n $.bcTree.treeDom.bind(\"dblclick.jstree\", function (event) {\n var mode = $(\"#viewsetting-mode\").val();\n if (mode == 'trash') {\n return false;\n }\n var nodeId = $(event.target).closest(\"li\").attr('id');\n var data = $.bcTree.jsTree.get_node(nodeId).data.jstree;\n if (data.type == 'default' || data.alias) {\n if ($.bcTree.settings[data.contentType] == undefined || !$.bcTree.settings[data.contentType].editDisabled) {\n if (!data.alias) {\n if ($.bcTree.settings[data.contentType] == undefined) {\n $.bcTree.openUrl($.bcTree.createLink($.baseUrl() + '/' + $.bcTree.config.baserCorePrefix + '/' + $.bcTree.config.adminPrefix + '/contents/edit', data.contentId, data.contentParentId, data.contentEntityId));\n } else {\n if ($.bcTree.settings[data.contentType]['url']['dblclick'] !== undefined) {\n $.bcTree.openUrl($.bcTree.createLink($.bcTree.settings[data.contentType]['url']['dblclick'], data.contentId, data.contentParentId, data.contentEntityId));\n } else {\n $.bcTree.openUrl($.bcTree.createLink($.bcTree.settings[data.contentType]['url']['edit'], data.contentId, data.contentParentId, data.contentEntityId));\n }\n }\n } else {\n $.bcTree.openUrl($.bcUtil.adminBaseUrl + 'baser-core' + '/contents/edit_alias/' + data.contentId);\n }\n }\n }\n });\n\n // コンテキストメニュー表示イベント\n $.bcTree.treeDom.on(\"show_contextmenu.jstree\", function () {\n $(\"ul.jstree-contextmenu li\").each(function () {\n if ($.bcTree.isAliasMenuByLabel($.trim($(this).text()))) {\n $(this).find('a i').after('');\n }\n if ($.bcTree.isAddMenuByLabel($.trim($(this).text()))) {\n $(this).find('a i').after('');\n }\n });\n });\n\n // フォルダ展開イベント\n $.bcTree.treeDom.on(\"after_open.jstree\", function (e) {\n $.bcTree.refreshTree();\n });\n\n // テキスト変更イベント\n // コンテンツ追加のリネーム時\n $.bcTree.treeDom.on(\"set_text.jstree\", function (e) {\n $.bcTree.refreshTree();\n });\n\n // ロード完了イベント\n $.bcTree.treeDom.on(\"ready.jstree\", function (e) {\n $.bcTree.treeDom.show();\n $.bcTree.refreshTree();\n });\n\n },\n\n /**\n * ツリーを破棄する\n */\n destroy: function () {\n if ($.bcTree.treeDom) {\n $.bcTree.treeDom.unbind(\"dblclick\");\n $.bcTree.treeDom.unbind(\"dblclick.jstree\");\n $.bcTree.treeDom.unbind(\"show_contextmenu.jstree\");\n $.bcTree.treeDom.unbind(\"after_open.jstree\");\n $.bcTree.treeDom.unbind(\"set_text.jstree\");\n $.bcTree.treeDom.unbind(\"ready.jstree\");\n $.bcTree.treeDom.remove();\n }\n $.bcTree.shiftOnAnchor = false;\n $.bcTree.ctrlOnAnchor = false;\n $.bcTree.contextmenuAddOnly = false;\n $.bcTree.settings = [];\n $.bcTree.dropTarget = null;\n $.bcTree.dragTarget = null;\n $.bcTree.treeDom = null;\n $.bcTree.jsTree = null;\n },\n\n /**\n * ツリー構造を生成する\n */\n createTree: function () {\n\n // ツリービュー生成\n $.bcTree.treeDom.jstree({\n 'core': {\n 'themes': {\n 'name': 'proton',\n \"stripes\": true,\n \"variant\": \"large\"\n },\n \"multiple\": false,\n \"force_text\": true,\n \"check_callback\": function (operation, node, node_parent, node_position, more) {\n if (operation == 'move_node') {\n if (!$.bcTree.config.isUseMoveContents) {\n return false;\n }\n if (node_parent.type == 'folder' && !node_parent.data.jstree.alias && !node.data.jstree.contentSiteRoot) {\n $.bcTree.dropTarget = node_parent;\n $.bcTree.dragTarget = node;\n return true;\n } else {\n $.bcTree.dropTarget = null;\n $.bcTree.dragTarget = null\n return false;\n }\n }\n }\n },\n \"plugins\": [\n \"dnd\",\n \"changed\",\n \"state\",\n \"wholerow\",\n \"contextmenu\",\n \"types\"\n ],\n \"dnd\": {\n \"large_drop_target\": true\n },\n \"types\": {\n \"default\": {},\n \"folder\": {}\n },\n \"state\": {\n \"key\": 'jstree-' + $.bcTree.currentSiteId,\n \"events\": \"open_all.jstree close_all.jstree changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree\"\n },\n \"contextmenu\": {\n \"show_at_node\": false,\n \"items\": function (node) {\n var maxContents = 6;\n var data = node.data.jstree;\n var mode = $(\"#viewsetting-mode\").val();\n var parent;\n if (data.type === 'folder' && !node.data.jstree.alias) {\n parent = node;\n } else {\n parent = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_parent(node));\n }\n\n var editDisabled = false;\n var manageDisabled = false;\n var editUrl = null;\n var manageUrl = null;\n var copyUrl = null;\n var isEnabled = false;\n\n if ($.bcTree.settings[data.contentType] !== undefined) {\n editDisabled = data.editDisabled;\n manageDisabled = data.manageDisabled;\n manageUrl = $.bcTree.settings[data.contentType]['url']['manage'];\n editUrl = $.bcTree.settings[data.contentType]['url']['edit'];\n copyUrl = $.bcTree.settings[data.contentType]['url']['copy'];\n isEnabled = true;\n }\n\n var menu = {};\n\n // 確認\n // - 公開されている\n // - URLがある\n if (isEnabled && data.status && data.contentFullUrl && !$.bcTree.contextmenuAddOnly && mode === 'index') {\n $.extend(true, menu, {\n \"view\": {\n label: bcI18n.bcTreeCheck,\n \"icon\": \"bca-icon--preview\",\n \"action\": function (obj) {\n $.bcTree.openUrl(data.contentFullUrl, true);\n }\n }\n });\n }\n\n // 公開・非公開\n // - サイトルートではない\n // - 関連データではない\n if (isEnabled && !$.bcTree.config.editInIndexDisabled && !editDisabled && !data.contentSiteRoot && mode === 'index' && !$.bcTree.contextmenuAddOnly && !data.related) {\n if (!data.status) {\n $.extend(true, menu, {\n \"publish\": {\n label: bcI18n.bcTreePublish,\n \"icon\": \"bca-icon--publish\",\n \"action\": function (obj) {\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/change_status.json',\n type: 'PATCH',\n data: {\n id: data.contentId,\n status: 'publish',\n type: data.contentType,\n siteId: data.contentSiteId,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n node.data.jstree.status = true;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n }\n });\n } else if (data.status) {\n $.extend(true, menu, {\n \"unpublish\": {\n label: bcI18n.bcTreeUnpublish,\n \"icon\": \"bca-icon--unpublish\",\n \"action\": function (obj) {\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core' + '/contents/change_status.json',\n type: 'PATCH',\n data: {\n id: data.contentId,\n status: 'unpublish',\n type: data.contentType,\n siteId: data.contentSiteId,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n node.data.jstree.status = false;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n }\n });\n }\n }\n\n // 管理\n // - 管理権限あり\n // - 管理機能サポート\n // - エイリアスではない\n if (!manageDisabled && !$.bcTree.contextmenuAddOnly && manageUrl && mode === 'index' && !data.alias) {\n $.extend(true, menu, {\n \"manage\": {\n label: bcI18n.bcTreeManage,\n \"icon\": \"bca-icon--th-list\",\n \"action\": function (obj) {\n $.bcTree.openUrl($.bcTree.createLink(manageUrl, data.contentId, data.contentParentId, data.contentEntityId));\n }\n }\n });\n }\n\n // 名称変更\n // - 編集権限あり\n // - サイトルートでない\n // − サイト関連データでない\n if (isEnabled && !$.bcTree.config.editInIndexDisabled && !editDisabled && !$.bcTree.contextmenuAddOnly && !data.contentSiteRoot && mode === 'index' && !data.related) {\n $.extend(true, menu, {\n \"rename\": {\n label: bcI18n.bcTreeRename,\n \"icon\": \"bca-icon--rename\",\n \"action\": function (obj) {\n $.bcTree.renameContent(node, node.text);\n }\n }\n });\n }\n\n // 編集\n // - 編集権限あり\n if (isEnabled && !editDisabled && !$.bcTree.contextmenuAddOnly && mode === 'index') {\n $.extend(true, menu, {\n \"edit\": {\n label: bcI18n.bcTreeEdit,\n \"icon\": \"bca-icon--edit\",\n \"action\": function (obj) {\n if (!node.data.jstree.alias) {\n $.bcTree.openUrl($.bcTree.createLink(editUrl, data.contentId, data.contentParentId, data.contentEntityId));\n } else {\n $.bcTree.openUrl($.bcUtil.adminBaseUrl + 'baser-core' + '/contents/edit_alias/' + data.contentId);\n }\n }\n }\n });\n }\n\n // コピー\n // - 編集権限あり\n // - フォルダーでない\n // - コピー機能サポート\n if (!editDisabled && !$.bcTree.contextmenuAddOnly && data.contentType !== 'ContentFolder' && !data.alias && copyUrl && mode === 'index') {\n $.extend(true, menu, {\n \"copy\": {\n label: bcI18n.bcTreeCopy,\n \"icon\": \"bca-icon--copy\",\n \"action\": function (obj) {\n $.bcTree.copyContent(parent, node);\n }\n }\n });\n }\n var deleteLabel;\n if (data.alias) {\n deleteLabel = bcI18n.bcTreeDelete;\n } else {\n deleteLabel = bcI18n.bcTreeToTrash;\n }\n\n // 削除\n // - 編集権限あり\n // - サイトルートでない\n if (!$.bcTree.config.editInIndexDisabled && !editDisabled && !data.deleteDisabled && !$.bcTree.contextmenuAddOnly && !data.contentSiteRoot && mode === 'index') {\n $.extend(true, menu, {\n \"delete\": {\n label: deleteLabel,\n \"icon\": \"bca-icon--delete\",\n \"action\": function (obj) {\n var message = bcI18n.bcTreeConfirmToTrash;\n if (data.alias) {\n message = bcI18n.bcTreeConfirmDeleteAlias;\n }\n if (confirm(message)) {\n $.bcTree.deleteContent(node);\n }\n }\n }\n });\n }\n if (mode === 'trash') {\n $.extend(true, menu, {\n \"return\": {\n _disabled: editDisabled,\n label: bcI18n.bcTreeUndo,\n \"icon\": \"bca-icon--undo\",\n \"action\": function (obj) {\n if (data.alias) {\n $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/exists/' + data.contentAliasId + '.json',\n type: 'GET',\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n }).done(function (result) {\n if (result.exists) {\n $.bcTree.returnContent(node);\n } else {\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage1);\n }\n });\n } else {\n $.bcTree.returnContent(node);\n }\n }\n },\n \"empty\": {\n _disabled: !$.bcTree.config.isAdmin,\n label: bcI18n.bcTreeEmptyTrash,\n \"icon\": \"bca-icon--ban\",\n \"action\": function (obj) {\n if (confirm(bcI18n.bcTreeConfirmMessage1)) {\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/trash_empty.json',\n type: 'DELETE',\n dataType: 'json',\n data: {\n empty: true,\n _csrfToken: $.bcToken.key,\n },\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n if (result) {\n var nodes = [];\n $(\"li.jstree-node\").each(function (i) {\n nodes.push($.bcTree.jsTree.get_node(this));\n });\n $.bcTree.jsTree.delete_node(nodes);\n $.bcUtil.showNoticeMessage(result.message);\n $(\"#DataList\").html('
' + bcI18n.bcTreeInfoMessage1 + '
');\n }\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage2, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n }\n }\n });\n }\n\n var settings = $.extend(true, {}, $.bcTree.settings);\n\n delete settings.Default;\n if (node.data.jstree.alias) {\n delete settings.ContentAlias;\n }\n\n if (mode === 'index') {\n var addMenu = {};\n var counter = 1;\n\n $.each(settings, function (i, val) {\n if (counter === maxContents + 1) {\n addMenu['Etc'] = {\n \"separator_before\": false,\n \"separator_after\": false,\n \"label\": \"その他...\",\n \"submenu\": {}\n }\n }\n if (counter <= maxContents) {\n if (!val.addDisabled) {\n addMenu[i] = $.bcTree.createMenu(val, parent, data, counter);\n }\n } else {\n if (!val.addDisabled) {\n addMenu['Etc']['submenu'][i] = $.bcTree.createMenu(val, parent, data, counter);\n }\n }\n counter++;\n });\n $.extend(true, menu, addMenu);\n }\n return menu;\n }\n }\n });\n },\n\n /**\n * メニューのラベルから登録メニューかどうかをチェックする\n *\n * @param name\n * @returns {boolean}\n */\n isAddMenuByLabel: function (name) {\n var node = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_selected());\n var settings = $.extend(true, {}, $.bcTree.settings);\n delete settings.Default;\n if (node.data.jstree.alias) {\n delete settings.ContentAlias;\n }\n var counter = 1;\n var result = false;\n $.each(settings, function (i) {\n if (name == counter + '.' + this.title) {\n result = true;\n }\n counter++;\n });\n return result;\n },\n\n /**\n * メニューのラベルからエイリアスかどうかをチェックする\n *\n * @param name\n * @returns {boolean}\n */\n isAliasMenuByLabel: function (name) {\n var node = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_selected());\n var settings = $.extend(true, {}, $.bcTree.settings);\n delete settings.Default;\n if (node.data.jstree.alias) {\n delete settings.ContentAlias;\n }\n var counter = 1;\n var result = false;\n $.each(settings, function (i) {\n if (i == 'Default') {\n return true;\n }\n if (node.data.jstree.alias && i == 'ContentLink') {\n return true;\n }\n if (name == counter + '.' + this.title && !this.multiple && this.exists) {\n result = true;\n }\n counter++;\n });\n return result;\n },\n\n /**\n * ツリーを更新する\n */\n refreshTree: function (disableCheck) {\n if (disableCheck === undefined) {\n disableCheck = false;\n }\n var treeData = $.bcTree.jsTree.get_json('#', {flat: true});\n sort = 1;\n // 並び順を特定する番号を更新する\n $(treeData).each(function () {\n var node = $.bcTree.jsTree.get_node(this.id);\n node.data.jstree.sort = sort;\n sort++;\n });\n // 公開状態によってカラーリングを更新する\n $(\"li.jstree-node\").each(function (i) {\n var node = $.bcTree.jsTree.get_node(this);\n // =====================================================================================================\n // コンテンツをドラッグ&ドロップした際に、階層が変更となると、フロントエンドの確認を行う為のURLの更新も行う必要がある。\n // 現在、対象コンテンツは更新されるが、フォルダの場合、子のコンテンツのURLが更新できていない為、\n // 確認ボタンをクリックするとNot Found となる。そのため一時的な対策として、確認ボタンを無効にする\n // TODO D&Dの際、子コンテンツのURLを返却し全てのコンテンツの確認ができるようにする\n // =====================================================================================================\n if (disableCheck) {\n node.data.jstree.contentFullUrl = false;\n }\n\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).removeClass('jstree-unpublish-odd jstree-unpublish-even jstree-publish-odd jstree-publish-even');\n return false;\n });\n if (node.data.jstree.status == false) {\n if (i % 2 == 0) {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-unpublish-odd');\n return false;\n });\n } else {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-unpublish-even');\n return false;\n });\n }\n } else {\n if (i % 2 == 0) {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-publish-odd');\n return false;\n });\n } else {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-publish-even');\n return false;\n });\n }\n }\n if (node.data.jstree.alias) {\n $(this).find('a i.jstree-icon:first').after('');\n }\n $(this).find('a.jstree-anchor:first').after('');\n $(this).find('.content-name').remove();\n if (node.data.jstree.name) {\n $(this).find('a.jstree-anchor:first').after('( ' + decodeURIComponent(node.data.jstree.name) + ' )')\n }\n });\n $(\"span.function\").on('click', function (e) {\n $.bcTree.jsTree.deselect_all();\n $.bcTree.jsTree.select_node($.bcTree.jsTree.get_node($(this).parent().attr('id')));\n $.bcTree.jsTree.show_contextmenu($.bcTree.jsTree.get_selected(), e.pageX, e.pageY);\n return false;\n });\n $(\"span.function\").on('contextmenu', function (e) {\n $.bcTree.jsTree.deselect_all();\n $.bcTree.jsTree.select_node($.bcTree.jsTree.get_node($(this).parent().attr('id')));\n $.bcTree.jsTree.show_contextmenu($.bcTree.jsTree.get_selected(), e.pageX, e.pageY);\n return false;\n });\n if ($.bcTree.config.isUseMoveContents) {\n $(\".jstree-icon\").css('cursor', 'move');\n }\n },\n\n /**\n * ゴミ箱から元にもどす\n *\n * @param node\n */\n returnContent: function (node) {\n $.bcToken.check(function () {\n return $(location).prop('href', $.bcUtil.adminBaseUrl + 'baser-core' + '/contents/trash_return/' + node.data.jstree.contentId);\n }, {hideLoader: false});\n },\n\n /**\n * Open Url\n *\n * @param url\n * @param forceBlank\n */\n openUrl: function (url, forceBlank) {\n forceBlank = forceBlank === undefined ? false : forceBlank;\n if ($.bcTree.ctrlOnAnchor || forceBlank) {\n window.open(url);\n } else if ($.bcTree.shiftOnAnchor) {\n window.open(url, '_blank');\n } else {\n window.location.href = url;\n }\n },\n\n /**\n * Create Menu\n *\n * @param setting\n * @param parent\n * @returns {{label: string, icon: string, action: function}}\n */\n createMenu: function (setting, parent, current, i) {\n var type = 'default';\n var contentAliasId = null;\n var contentTitle = bcI18n.bcTreeNewTitle.sprintf(setting.title);\n var contentPlugin = setting.plugin;\n var contentType = setting.type;\n var contentEntityId = null;\n var iconAdd;\n var iconMenu;\n if (setting.url.icon) {\n iconAdd = iconMenu = setting.url.icon;\n } else {\n iconAdd = iconMenu = setting.icon;\n }\n if (setting.type == 'ContentFolder') {\n var separatorBefore = true;\n type = 'folder';\n } else if (setting.type == 'ContentLink') {\n var separatorAfter = true;\n } else if (setting.type == 'ContentAlias') {\n iconAdd = current.icon;\n contentAliasId = current.contentId;\n contentPlugin = current.contentPlugin;\n contentType = current.contentType;\n contentTitle = bcI18n.bcTreeAliasTitle.sprintf(current.contentTitle);\n contentEntityId = current.contentEntityId;\n } else {\n if ((!setting['multiple'] && setting['exists'])) {\n contentTitle = bcI18n.bcTreeAliasTitle.sprintf(setting['existsTitle']);\n }\n }\n\n return {\n label: \"\" + i + \".\" + setting.title,\n icon: iconMenu,\n separator_before: separatorBefore,\n separator_after: separatorAfter,\n action: function () {\n $.bcTree.createContent(parent, {\n type: type,\n icon: iconAdd,\n contentParentId: parent.data.jstree.contentId,\n contentTitle: contentTitle,\n contentPlugin: contentPlugin,\n contentType: contentType,\n contentSiteId: parent.data.jstree.contentSiteId,\n contentAliasId: contentAliasId,\n contentEntityId: contentEntityId\n });\n }\n };\n },\n\n /**\n * Create Content\n *\n * @param parent\n * @param data\n */\n createContent: function (parent, data) {\n var _data = {\n icon: null,\n type: 'default',\n status: false,\n contentId: null,\n contentParentId: null,\n contentTitle: bcI18n.bcTreeUnNamedTitle,\n contentPlugin: null,\n contentType: null,\n contentEntityId: null,\n contentFullUrl: null,\n contentSiteId: null,\n contentAliasId: null\n };\n $.extend(true, _data, data);\n data = _data;\n var url = '';\n // シングルコンテンツでデータが既に存在する場合 エイリアス作成の場合\n if ((!$.bcTree.settings[data.contentType]['multiple'] && $.bcTree.settings[data.contentType]['exists']) || data.contentAliasId) {\n url = $.bcUtil.apiAdminBaseUrl + 'baser-core' + '/contents/add_alias.json';\n data.alias = true;\n } else {\n url = $.bcTree.settings[data.contentType]['url']['add'];\n }\n var nodeId = $.bcTree.jsTree.create_node(parent, {\n text: data.contentTitle,\n data: {jstree: data}\n });\n var node = $.bcTree.jsTree.get_node(nodeId);\n $.bcTree.jsTree.edit(node, data.contentTitle, function (editNode) {\n $.bcToken.check(function () {\n const content = {\n parent_id: data.contentParentId,\n title: editNode.text,\n plugin: data.contentPlugin,\n type: data.contentType,\n site_id: data.contentSiteId,\n alias_id: data.contentAliasId,\n entity_id: data.contentEntityId\n };\n return $.ajax({\n url: url,\n type: 'POST',\n data: {\n _csrfToken: $.bcToken.key,\n content: content,\n },\n dataType: 'json',\n beforeSend: function () {\n this.data = $.bcTree.fillExtraData(this.data, data);\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcUtil.showNoticeMessage(result.message);\n $.bcTree.settings[data.contentType]['exists'] = true;\n $.bcTree.settings[data.contentType]['existsTitle'] = editNode.text;\n data.contentId = result.content.id;\n data.contentEntityId = result.content.entity_id;\n data.name = decodeURIComponent(result.content.name);\n node.data.jstree = data;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage6, XMLHttpRequest);\n $.bcTree.jsTree.delete_node(node);\n $.bcUtil.hideLoader();\n }\n }).then(function () {\n return $.bcUtil.ajax($.bcUtil.apiAdminBaseUrl + 'baser-core' + '/contents/get_full_url/' + data.contentId + '.json', {}, {\n type: 'GET',\n dataType: 'json'\n }).done(function (result) {\n data.contentFullUrl = decodeURI(result.fullUrl);\n node.data.jstree = data;\n if (data.contentType == 'ContentFolder') {\n node.type = 'folder'\n }\n });\n });\n }\n , {hideLoader: false});\n });\n },\n /**\n * ポスト用のデータにコンテンツの種類に基づいた不足データを追加する\n *\n * @param postData 送信用データ\n * @param settingData 保持してるデータ\n */\n fillExtraData: function (postData, settingData) {\n const extra = (() => {\n switch (settingData.contentType) {\n case \"ContentFolder\":\n return {\n folder_template: \"\",\n page_template: \"\"\n };\n case \"Page\":\n return {\n contents: \"\",\n draft: \"\",\n page_template: \"\",\n code: \"\"\n };\n default:\n break;\n }\n })();\n if (extra) {\n postData += '&' + encodeURI($.param(extra));\n }\n return postData;\n },\n\n /**\n * Delete Content\n *\n * @param node\n */\n deleteContent: function (node) {\n var data = node.data.jstree;\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/delete/' + data.contentId + '.json',\n type: 'POST',\n data: {\n id: data.contentId,\n entity_id: data.contentEntityId,\n alias: data.alias,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcUtil.showNoticeMessage(result.message);\n $.bcToken.key = null;\n $.bcTree.jsTree.delete_node(node);\n // エイリアス削除\n var nodes = $.bcTree.jsTree.get_json(null, {flat: true});\n for (var i = 0; i < nodes.length; i++) {\n if (data.contentId == nodes[i].state.contentAliasId) {\n $.bcTree.jsTree.delete_node(nodes[i]);\n }\n }\n $.bcTree.refreshTree();\n $.bcUtil.hideLoader();\n },\n error: function (XMLHttpRequest) {\n $.bcToken.key = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage4, XMLHttpRequest);\n $.bcUtil.hideLoader();\n }\n });\n }, {useUpdate: false, hideLoader: false});\n },\n\n /**\n * Copy Content\n *\n * @param parent\n * @param node\n */\n copyContent: function (parent, node) {\n var data = $.extend(true, {}, node.data.jstree);\n data.contentTitle = bcI18n.bcTreeCopyTitle.sprintf(data.contentTitle);\n data.status = false;\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcTree.settings[data.contentType]['url']['copy'],\n type: 'POST',\n data: {\n content_id: data.contentId,\n entity_id: data.contentEntityId,\n title: data.contentTitle,\n parent_id: data.contentParentId,\n site_id: data.contentSiteId,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcToken.key = null;\n $.bcTree.settings[data.contentType]['exists'] = true;\n $.bcTree.settings[data.contentType]['existsTitle'] = data.contentTitle;\n data.contentId = result.content.id;\n data.contentEntityId = result.content.entity_id;\n data.contentTitle = data.contentTitle.replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(//g, '>');\n $.ajax($.bcUtil.apiAdminBaseUrl + 'baser-core/contents/get_full_url/' + data.contentId + '.json', {\n type: 'GET',\n dataType: 'json'\n }).done(function (result) {\n data.contentFullUrl = result.fullUrl;\n var nodeId = $.bcTree.jsTree.create_node(parent, {\n text: data.contentTitle,\n data: {jstree: data}\n });\n var newNode = $.bcTree.jsTree.get_node(nodeId);\n newNode.data.jstree = data;\n if (data.contentType === 'ContentFolder') {\n newNode.type = 'folder'\n }\n $.bcUtil.hideLoader();\n $.bcTree.renameContent(newNode, data.contentTitle, true);\n });\n },\n error: function (XMLHttpRequest) {\n $.bcToken.key = null;\n $.bcUtil.showAjaxError(bcI18n.commonCopyFailedMessage, XMLHttpRequest);\n $.bcUtil.hideLoader();\n }\n });\n }, {useUpdate: false, hideLoader: false});\n },\n\n /**\n * Rename Content\n *\n * @param node\n * @param defaultTitle 初期タイトル\n * @param first 新規登録時の初回リネームかどうか\n */\n renameContent: function (node, defaultTitle, first) {\n if (first === undefined) {\n first = false;\n }\n var oldTitle = defaultTitle;\n $.bcTree.jsTree.edit(node, oldTitle, function (editNode) {\n var newTitle = editNode.text;\n $.bcTree.jsTree.rename_node(editNode, newTitle);\n if (oldTitle === newTitle) {\n return false;\n }\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/rename.json',\n type: 'PATCH',\n dataType: 'json',\n data: {\n id: node.data.jstree.contentId,\n title: newTitle,\n first: +first, // 0 Or 1 に変換\n _csrfToken: $.bcToken.key,\n },\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n if (!result) {\n $.bcUtil.showNoticeMessage(result.message);\n }\n $.bcTree.settings[node.data.jstree.contentType]['existsTitle'] = editNode.text;\n editNode.data.jstree.contentFullUrl = result.url;\n editNode.data.jstree.name = result.name;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n $.bcTree.jsTree.rename_node(editNode, defaultTitle);\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage5, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n })\n }, {hideLoader: false});\n });\n },\n\n /**\n * Create Link\n *\n * @param base\n * @param contentParentId\n * @param contentEntityId\n * @returns string\n */\n createLink: function (base, contentId, contentParentId, contentEntityId) {\n var url = base;\n if (contentEntityId) {\n url += '/' + contentEntityId;\n }\n if (contentId) {\n url += '/content_id:' + contentId;\n }\n if (contentParentId) {\n url += '/parent_id:' + contentParentId;\n }\n return url;\n },\n\n /**\n * コンテンツを並び替える\n *\n * @param e\n * @param data\n */\n orderContent: function (e, data) {\n $.bcTree.changeNormalCursor();\n var cancel = false;\n var node = $.bcTree.jsTree.get_node(data.element);\n if (!node) {\n node = $.bcTree.dragTarget;\n }\n if (!node) {\n cancel = true;\n }\n var oldSort = node.data.jstree.sort;\n $.bcTree.refreshTree();\n var newSort = node.data.jstree.sort;\n var offset = newSort - oldSort;\n if (offset == 0) {\n if (!$.bcTree.dropTarget) {\n cancel = true;\n }\n if (node.data.jstree.contentParentId == $.bcTree.dropTarget.data.jstree.contentId) {\n cancel = true;\n }\n }\n\n if (cancel || !confirm(bcI18n.commonSortSaveConfirmMessage)) {\n // コンテンツを別のフォルダに移動するか、コンテンツを上から下に移動\n if (node.parent != $.bcTree.beforeParentId || offset >= 0) {\n $.bcTree.jsTree.move_node(node, $.bcTree.beforeParentId, $.bcTree.beforePosition);\n // コンテンツを下から上に移動\n } else {\n $.bcTree.jsTree.move_node(node, $.bcTree.beforeParentId, $.bcTree.beforePosition + 1);\n }\n $.bcTree.refreshTree();\n return false;\n }\n\n if ($.bcTree.dropTarget) {\n $.bcTree.jsTree.open_node($.bcTree.dropTarget);\n }\n\n var nextNode = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_next_dom(node, true));\n var targetId = null;\n if (nextNode) {\n targetId = nextNode.data.jstree.contentId;\n }\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/move.json',\n type: 'PATCH',\n data: {\n origin: {\n id: node.data.jstree.contentId,\n parentId: node.data.jstree.contentParentId,\n type: node.data.jstree.contentType,\n entityId: node.data.jstree.contentEntityId,\n },\n target: {\n id: targetId,\n parentId: $.bcTree.dropTarget.data.jstree.contentId,\n siteId: $.bcTree.dropTarget.data.jstree.contentSiteId,\n },\n listDisplayed: $.bcTree.listDisplayed,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n node.data.jstree.contentFullUrl = result.url;\n $.bcTree.refreshTree(true);\n node.data.jstree.contentParentId = $.bcTree.dropTarget.data.jstree.contentId;\n $.bcUtil.showNoticeMessage(result.message);\n $.bcUtil.hideLoader();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.commonSortSaveFailedMessage, XMLHttpRequest);\n $.bcTree.load();\n },\n complete: function () {\n }\n });\n }, {hideLoader: false});\n },\n\n /**\n * 外部よりメニューを表示する\n *\n * @param e\n * @returns {boolean}\n */\n showMenuByOuter: function (e) {\n $.bcTree.contextmenuAddOnly = true;\n var selected = $.bcTree.jsTree.get_selected();\n if (!selected.length) {\n $.bcTree.jsTree.select_node($.bcTree.jsTree.get_json());\n }\n $.bcTree.jsTree.show_contextmenu($.bcTree.jsTree.get_selected(), e.pageX, e.pageY);\n $.bcTree.contextmenuAddOnly = false;\n return false;\n },\n\n /**\n * Shift / Ctrl キーの押印状態を更新する\n *\n * @param e\n */\n updateShiftAndCtrlOnAnchor: function (e) {\n $.bcTree.shiftOnAnchor = e.shiftKey;\n $.bcTree.ctrlOnAnchor = (e.ctrlKey || e.metaKey);\n },\n\n changeDnDCursor: function () {\n $(\"#ContentsTreeList .jstree-wholerow\").css('cursor', 'move');\n $(\"#ContentsTreeList .jstree-anchor\").css('cursor', 'move');\n $(\"#ContentsTreeList .function\").css('cursor', 'move');\n $(\"#ContentsTreeList .jstree-ocl\").css('cursor', 'move');\n },\n\n changeNormalCursor: function () {\n $(\"#ContentsTreeList .jstree-wholerow\").css('cursor', 'pointer');\n $(\"#ContentsTreeList .jstree-anchor\").css('cursor', 'pointer');\n $(\"#ContentsTreeList .function\").css('cursor', 'pointer');\n $(\"#ContentsTreeList .jstree-ocl\").css('cursor', 'pointer');\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n\n/**\n * サイドバーのコンテンツメニューを設定する\n */\nwindow.addEventListener('DOMContentLoaded', function () {\n\tvar componentId = 'AdminMenu';\n\tvar tmpl = document.querySelector('[data-js-tmpl=\"' + componentId + '\"]');\n\tvar dataStore = document.getElementById(componentId);\n\tvar data = null;\n\ttry {\n\t\tdata = JSON.parse(dataStore ? dataStore.textContent : '{}');\n\t} catch (error) {\n\t\tif (window.console) {\n\t\t\tconsole.warn('管理メニューのデータが破損しています(JSONデータが不正です)')\n\t\t}\n\t}\n\n\tif (tmpl && data && data.menuList && data.menuList.length) {\n\n\t\tvar contentList = [];\n\t\tvar systemList = [];\n\n\t\tdata.menuList.forEach(function (item, i) {\n\t\t\tif (item.type === 'system') {\n\t\t\t\t//item.menus = item.menus.filter(function (menu) { return menu.url !== item.url });\n\t\t\t\tsystemList.push(item);\n\t\t\t} else {\n\t\t\t\tcontentList.push(item);\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * for deubg\n\t\t */\n\t\t// console.log($.extend(true, {}, contentList));\n\t\t// console.log($.extend(true, {}, systemList));\n\n\t\ttmpl.hidden = false;\n\t\tvar isSystemSettingPage = systemList.some(function (item) { return (item.current || item.expanded); });\n\t\tvar app = new Vue({\n\t\t\tel: tmpl,\n\t\t\tdata: {\n\t\t\t\tsystemExpanded: isSystemSettingPage,\n\t\t\t\tbaseURL: $.baseUrl(),\n\t\t\t\tcurrentSiteId: data.currentSiteId,\n\t\t\t\tcontentList: contentList,\n\t\t\t\tisSystemSettingPage: isSystemSettingPage,\n\t\t\t\tsystemList: systemList,\n\t\t\t\tavailableVersions: null,\n\t\t\t\tuseUpdateNotice: data.useUpdateNotice\n\t\t\t},\n mounted() {\n if(!this.useUpdateNotice) return;\n $.get($.bcUtil.apiAdminBaseUrl + 'baser-core/plugins/get_available_core_version_info.json', function (response){\n if(response.availableCoreVersionInfo !== undefined) {\n app.availableVersions = response.availableCoreVersionInfo.versions.length;\n }\n });\n },\n\t\t\tmethods: {\n\t\t\t\topenSystem () {\n\t\t\t\t\tapp.systemExpanded = !app.systemExpanded;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t} else {\n\n\t\tif (window.console) {\n\t\t\tconsole.warn('データが空のため、管理メニューは表示されませんでした');\n\t\t}\n\n\t}\n\n});\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\nimport Cookies from 'js-cookie'\n\n(function ($) {\n $.bcUtil = {\n /**\n * hideMessage() を無効にする\n */\n disabledHideMessage: false,\n\n\n /**\n * ベースとなるURL\n */\n baseUrl: null,\n\n /**\n * BaserCoreプレフィックス\n */\n baserCorePrefix: null,\n\n /**\n * 管理画面用URLプレフィックス\n */\n adminPrefix: null,\n\n /**\n * 管理画面用のベースURL\n */\n adminBaseUrl: null,\n\n /**\n * API用のベースURL\n */\n apiBaseUrl: null,\n\n /**\n * 管理画面用APIのベースURL\n */\n apiAdminBaseUrl: null,\n\n /**\n * Ajaxローダーのパス\n */\n ajaxLoaderPath: null,\n\n /**\n * Ajaxローダー(小)のパス\n */\n ajaxLoaderSmallPath: null,\n\n /**\n * 初期化\n *\n * @param config\n */\n init: function (config) {\n if(config === undefined) config = {};\n var adminScript = $(\"#AdminScript\");\n $.bcUtil.baseUrl = adminScript.attr('data-baseUrl');\n $.bcUtil.baserCorePrefix = adminScript.attr('data-baserCorePrefix');\n $.bcUtil.adminPrefix = adminScript.attr('data-adminPrefix');\n $.bcUtil.ajaxLoaderPath = adminScript.attr('data-ajaxLoaderPath');\n $.bcUtil.ajaxLoaderSmallPath = adminScript.attr('data-ajaxLoaderSmallPath');\n $.bcUtil.frontFullUrl = adminScript.attr('data-frontFullUrl');\n if (config.baseUrl !== undefined) {\n $.bcUtil.baseUrl = config.baseUrl;\n }\n if (config.baserCorePrefix !== undefined) {\n $.bcUtil.baserCorePrefix = config.baserCorePrefix;\n }\n if (config.adminPrefix !== undefined) {\n $.bcUtil.adminPrefix = config.adminPrefix;\n }\n if (config.ajaxLoaderPath !== undefined) {\n $.bcUtil.ajaxLoaderPath = config.ajaxLoaderPath;\n }\n if (config.ajaxLoaderSmallPath !== undefined) {\n $.bcUtil.ajaxLoaderSmallPath = config.ajaxLoaderSmallPath;\n }\n $.bcUtil.adminBaseUrl = $.bcUtil.baseUrl + '/' + $.bcUtil.baserCorePrefix + '/' + $.bcUtil.adminPrefix + '/';\n $.bcUtil.apiBaseUrl = $.bcUtil.baseUrl + '/' + $.bcUtil.baserCorePrefix + '/api/';\n $.bcUtil.apiAdminBaseUrl = $.bcUtil.baseUrl + '/' + $.bcUtil.baserCorePrefix + '/api/admin/';\n this.setUpTextCounter();\n },\n\n /**\n * アラートメッセージを表示\n *\n * @param message\n */\n showAlertMessage: function (message) {\n $.bcUtil.hideMessage();\n $(\"#BcSystemMessage\")\n .removeClass('notice-messge alert-message')\n .addClass('alert-message')\n .html(message);\n $(\"#BcMessageBox\").fadeIn(500);\n },\n\n /**\n * ノーティスメッセージを表示\n *\n * @param message\n */\n showNoticeMessage: function (message) {\n $.bcUtil.hideMessage();\n $(\"#BcSystemMessage\")\n .removeClass('notice-messge alert-message')\n .addClass('notice-message')\n .html(message);\n $(\"#BcMessageBox\").fadeIn(500);\n },\n\n /**\n * メッセージを隠す\n */\n hideMessage: function () {\n if (!$.bcUtil.disabledHideMessage) {\n $(\"#BcMessageBox\").fadeOut(200);\n $(\"#AlertMessage\").fadeOut(200);\n $(\"#MessageBox\").fadeOut(200);\n }\n },\n\n /**\n * ローダーを表示\n */\n showLoader: function (type, selector, key) {\n if (type == undefined || (type != 'none' && selector == undefined)) {\n type = 'over';\n }\n switch (type) {\n case 'over':\n $(\"#Waiting\").show();\n break;\n case 'inner':\n var div = $('
').css({'text-align': 'center'}).attr('id', key);\n var img = $('').attr('src', $.bcUtil.ajaxLoaderPath);\n div.html(img);\n $(selector).html(div);\n break;\n case 'after':\n var img = $('').attr('src', $.bcUtil.ajaxLoaderSmallPath).attr('id', key).css({\n 'width':'16px',\n 'vertical-align': 'middle',\n 'margin':'5px'\n });\n $(selector).after(img);\n break;\n case 'target':\n $(selector).show();\n break;\n case 'none':\n break;\n }\n },\n\n /**\n * ローダーを隠す\n */\n hideLoader: function (type, selector, key) {\n if (type == undefined || (type != 'none' && selector == undefined)) {\n type = 'over';\n }\n switch (type) {\n case 'over':\n $(\"#Waiting\").hide();\n break;\n case 'inner':\n $(\"#\" + key).remove();\n break;\n case 'after':\n $(\"#\" + key).remove();\n break;\n case 'target':\n $(selector).show();\n break;\n case 'none':\n break;\n }\n },\n\n /**\n * Ajax\n */\n ajax: function (url, success, config) {\n if (!config) {\n config = {};\n }\n var loaderType, loaderSelector, loaderKey;\n var hideLoader = true;\n if (typeof config.loaderType !== 'undefined') {\n loaderType = config.loaderType;\n delete config.loaderType;\n }\n if (typeof config.loaderSelector !== 'undefined') {\n loaderSelector = config.loaderSelector;\n delete config.loaderSelector;\n loaderKey = loaderSelector.replace(/\\./g, '').replace(/#/g, '').replace(/\\s/g, '') + 'loaderkey';\n }\n if (typeof config.hideLoader !== 'undefined') {\n hideLoader = config.hideLoader;\n delete config.loaderType;\n }\n var ajaxConfig = {\n url: url,\n type: 'POST',\n dataType: 'html',\n beforeSend: function () {\n $.bcUtil.showLoader(loaderType, loaderSelector, loaderKey);\n },\n complete: function () {\n if (hideLoader) {\n $.bcUtil.hideLoader(loaderType, loaderSelector, loaderKey);\n }\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n $.bcUtil.showAjaxError(bcI18n.commonExecFailedMessage, XMLHttpRequest, errorThrown);\n },\n success: success\n };\n if (config) {\n $.extend(ajaxConfig, config);\n }\n return $.ajax(ajaxConfig);\n },\n\n /**\n * Ajax のエラーメッセージを表示\n *\n * @param XMLHttpRequest\n * @param errorThrown\n * @param message\n */\n showAjaxError: function (message, XMLHttpRequest, errorThrown) {\n var errorMessage = '';\n if (XMLHttpRequest !== undefined && XMLHttpRequest.status) {\n errorMessage = '
(' + XMLHttpRequest.status + ') ';\n }\n if(XMLHttpRequest !== undefined && XMLHttpRequest.responseJSON){\n errorMessage += XMLHttpRequest.responseJSON.message;\n }\n if (XMLHttpRequest !== undefined && XMLHttpRequest.responseText) {\n errorMessage += '
' + XMLHttpRequest.responseText;\n } else if (errorThrown !== undefined) {\n errorMessage += '
' + errorThrown;\n }\n $.bcUtil.showAlertMessage(message + errorMessage);\n },\n\n /**\n * フラッシュメッセージをセットする\n *\n * 一度しか表示できないメッセージ\n * @param message\n */\n setFlashMessage: function(message) {\n Cookies.set('bcFlashMessage', message);\n },\n\n /**\n * フラッシュメッセージを表示する\n *\n * 一度表示したら削除する\n */\n showFlashMessage: function () {\n let message = Cookies.get('bcFlashMessage');\n if(message !== undefined) {\n this.showNoticeMessage(message);\n Cookies.remove('bcFlashMessage')\n }\n },\n\n /**\n * ツールチップを初期化する\n *\n * @param config\n */\n initTooltip: function(config) {\n let btConfig = {\n target: '.bca-help',\n content: '.bca-helptext'\n };\n if(config !== undefined) {\n $.extend(btConfig, config);\n }\n let $help = $(btConfig.target);\n if ($help.bt) {\n $(btConfig.content).css('display', 'none');\n $.bt.options.closeWhenOthersOpen = true;\n $help.bt({\n trigger: 'click',\n positions: 'top',\n shadow: true,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowBlur: 8,\n shadowColor: 'rgba(101,101,101,.6)',\n shadowOverlap: false,\n noShadowOpts: {\n strokeStyle: '#999',\n strokeWidth: 1\n },\n width: '600px',\n /*shrinkToFit: true,*/\n spikeLength: 12,\n spikeGirth: 18,\n padding: 20,\n cornerRadius: 0,\n strokeWidth: 1, /*no stroke*/\n strokeStyle: '#656565',\n fill: 'rgba(255, 255, 255, 1.00)',\n cssStyles: {\n fontSize: '14px'\n },\n showTip: function (box) {\n $(box).fadeIn(200);\n },\n hideTip: function (box, callback) {\n $(box).animate({\n opacity: 0\n }, 100, callback);\n },\n contentSelector: `$(this).next('${btConfig.content}').html()`\n });\n }\n },\n\n /**\n * テキストカウンターをセットアップする\n */\n setUpTextCounter(selector) {\n if(selector === undefined) {\n selector = \".bca-text-counter\";\n }\n const $textCounter = $(selector);\n $textCounter.after('');\n $textCounter.keyup(function (){\n var len = $(this).val().length;\n var maxlen = $(this).attr('maxlength');\n if(!maxlen || maxlen === -1){\n maxlen = '-';\n }\n $(this).next().html(len+' /'+maxlen+'');\n });\n $textCounter.keyup();\n },\n\n };\n})(jQuery);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.j = 3207;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t3207: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkbc_admin_third\"] = self[\"webpackChunkbc_admin_third\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [5000], () => (__webpack_require__(2670)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","$","baseUrl","attr","jQuery","changeRow","checkbox","undefined","parent","addClass","removeClass","toolChangeHandler","config","bcBatch","methodSelect","val","executeButton","removeAttr","prop","batchUrl","listTable","checkAll","targetCheckbox","alertBox","loader","flashBox","init","extend","this","initList","unbind","click","length","alert","bcI18n","commonSelectDataFailedMessage","confirm","batchConfirmMessage","form","append","clone","each","value","bcToken","check","key","ajax","url","type","data","serialize","dataType","beforeSend","bcUtil","hideMessage","showLoader","success","result","setFlashMessage","message","location","reload","error","XMLHttpRequest","textStatus","errorThrown","errorMessage","status","commonNotFoundProgramMessage","responseText","JSON","parse","remove","showAlertMessage","commonBatchExecFailedMessage","hideLoader","useUpdate","change","find","e","stopPropagation","initRowSelected","bcCkeditor","editor","initStatus","styleInitStatus","show","setUpConfig","CKEDITOR","addStylesSet","initialStyle","editorStyle","map","themeEditorCsses","css","Array","isArray","contentsCss","push","ckeditorField","replace","editorDomId","editorOptions","setUpDraft","setUpToolBar","allowedContent","extraPlugins","stylesCombo_stylesSet","editorStylesSet","protectedSource","dtd","$removeEmpty","editorUrl","templates_files","editorEnterBr","enterMode","ENTER_BR","editorUseDraft","on","draftAreaId","draftDraftAreaId","publishAreaId","draftPublishAreaId","editorReadonlyPublish","draftReadOnlyPublish","editorDisableDraft","execCommand","editorDisablePublish","name","previewModeId","getCommand","uiItems","state","hide","bcConfirm","title","bcConfirmTitle1","bcConfirmAlertMessage1","defaultCancel","ok","html","dialog","modal","width","buttons","bcConfirmAlertMessage2","bcCredit","adminBaseUrl","hideTarget","isLogin","$html","$page","$credit","openedFavorite","prepend","$creditScroller","fadeIn","fadeOut","setViewSize","window","resize","resizeScroll","height","posX","id","setInterval","clearInterval","clearTimeout","event","cancelBubble","$toolBar","outerHeight","$body","bcJwt","accessToken","refreshToken","localStorage","getItem","getToken","login","email","password","saved","successCallback","errorCallback","apiAdminBaseUrl","done","response","setToken","access_token","refresh_token","bind","fail","async","headers","setItem","logout","removeToken","bcSortable","updateSortUrl","sortHandle","sortTable","sortable","sortableOptions","scroll","items","opacity","zIndex","containment","tolerance","distance","cursor","handle","placeholder","revert","start","sortStartHandler","update","sortUpdateHandler","ui","item","target","offset","index","sortId","sortOffset","getHiddenToken","i","v","complete","bcTimeUtil","getNowDateTime","getNowDate","getNowTime","date","Date","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","requested","requesting","defaultUrl","setTokenUrl","callback","timer","execCallback","_config","loaderType","always","getForm","options","fields","unlocked","debug","submitToken","submit","replaceLinkToSubmitToken","selector","match","get","onclick","postLinkForm","bcTree","shiftOnAnchor","ctrlOnAnchor","contextmenuAddOnly","settings","dropTarget","dragTarget","treeDom","jsTree","listDisplayed","beforeParentId","beforePosition","currentSiteId","isAdmin","isUseMoveContents","adminPrefix","editInIndexDisabled","_inited","load","_init","trigger","parseJSON","createTree","jstree","old_parent","old_position","updateShiftAndCtrlOnAnchor","nodeId","closest","get_node","alias","contentType","editDisabled","openUrl","contentId","createLink","baserCorePrefix","contentParentId","contentEntityId","isAliasMenuByLabel","trim","text","after","isAddMenuByLabel","refreshTree","destroy","operation","node","node_parent","node_position","more","contentSiteRoot","mode","get_parent","manageDisabled","editUrl","manageUrl","copyUrl","isEnabled","deleteLabel","menu","contentFullUrl","label","bcTreeCheck","obj","related","bcTreeUnpublish","siteId","contentSiteId","_csrfToken","showAjaxError","commonChangePublishFailedMessage","bcTreePublish","bcTreeManage","bcTreeRename","renameContent","bcTreeEdit","bcTreeCopy","copyContent","bcTreeDelete","bcTreeToTrash","deleteDisabled","bcTreeConfirmToTrash","bcTreeConfirmDeleteAlias","deleteContent","_disabled","bcTreeUndo","contentAliasId","exists","returnContent","bcTreeAlertMessage1","bcTreeEmptyTrash","bcTreeConfirmMessage1","empty","nodes","delete_node","showNoticeMessage","bcTreeInfoMessage1","bcTreeAlertMessage2","Default","ContentAlias","addMenu","counter","maxContents","addDisabled","createMenu","get_selected","multiple","disableCheck","treeData","get_json","flat","sort","decodeURIComponent","deselect_all","select_node","show_contextmenu","pageX","pageY","forceBlank","open","href","setting","current","iconAdd","iconMenu","contentTitle","bcTreeNewTitle","sprintf","contentPlugin","plugin","icon","separatorBefore","separatorAfter","bcTreeAliasTitle","separator_before","separator_after","action","createContent","_data","bcTreeUnNamedTitle","create_node","edit","editNode","content","parent_id","site_id","alias_id","entity_id","fillExtraData","bcTreeAlertMessage6","then","decodeURI","fullUrl","postData","settingData","extra","folder_template","page_template","contents","draft","code","encodeURI","param","bcTreeAlertMessage4","bcTreeCopyTitle","content_id","newNode","commonCopyFailedMessage","defaultTitle","first","oldTitle","newTitle","rename_node","bcTreeAlertMessage5","base","orderContent","changeNormalCursor","cancel","element","oldSort","commonSortSaveConfirmMessage","move_node","open_node","nextNode","get_next_dom","targetId","origin","parentId","entityId","commonSortSaveFailedMessage","showMenuByOuter","shiftKey","ctrlKey","metaKey","changeDnDCursor","addEventListener","componentId","tmpl","document","querySelector","dataStore","getElementById","textContent","console","warn","menuList","contentList","systemList","forEach","hidden","isSystemSettingPage","some","expanded","app","Vue","el","systemExpanded","baseURL","availableVersions","useUpdateNotice","mounted","availableCoreVersionInfo","versions","methods","openSystem","disabledHideMessage","apiBaseUrl","ajaxLoaderPath","ajaxLoaderSmallPath","adminScript","frontFullUrl","setUpTextCounter","div","img","loaderSelector","loaderKey","ajaxConfig","commonExecFailedMessage","responseJSON","Cookies","showFlashMessage","initTooltip","btConfig","$help","bt","closeWhenOthersOpen","positions","shadow","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOverlap","noShadowOpts","strokeStyle","strokeWidth","spikeLength","spikeGirth","padding","cornerRadius","fill","cssStyles","fontSize","showTip","box","hideTip","animate","contentSelector","$textCounter","keyup","len","maxlen","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","splice","r","d","definition","o","defineProperty","enumerable","g","globalThis","Function","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"js/admin/common.bundle.js","mappings":"UAAIA,E;;;;;;;;;;CCaJ,SAAWC,GACPA,EAAEC,QAAU,WACR,OAAOD,EAAE,gBAAgBE,KAAK,eAClC,CACH,CAJD,CAIIC,O,YCiKJ,SAASC,EAAUC,QACkBC,IAA7BD,EAASH,KAAK,WACdF,EAAEK,GAAUE,SAASA,SAASC,SAAS,eAEvCR,EAAEK,GAAUE,SAASA,SAASE,YAAY,cAElD;;;;;;;;;;CA1KA,SAAWT,GA0JP,SAASU,IACL,IAAIC,EAASX,EAAEY,QAAQD,OACnBX,EAAEW,EAAOE,cAAcC,MACvBd,EAAEW,EAAOI,eAAeC,WAAW,YAEnChB,EAAEW,EAAOI,eAAeE,KAAK,YAAY,EAEjD,CAhKAjB,EAAEY,QAAU,CAIRD,OAAQ,CACJO,SAAU,GACVC,UAAW,aACXJ,cAAe,iBACfF,aAAc,SACdO,SAAU,YACV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C,EAAoBQ,EAAEiC,E","sources":["webpack://bc-admin-third/webpack/runtime/chunk loaded","webpack://bc-admin-third/./src/js/admin/_lib/jquery.baseUrl.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcBatch.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcCkeditor.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcConfirm.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcCredit.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcJwt.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcSortable.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcTimeUtil.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcToken.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcTree.js","webpack://bc-admin-third/./src/js/admin/_module/sidebar.js","webpack://bc-admin-third/./src/js/admin/_lib/jquery.bcUtil.js","webpack://bc-admin-third/webpack/bootstrap","webpack://bc-admin-third/webpack/runtime/define property getters","webpack://bc-admin-third/webpack/runtime/global","webpack://bc-admin-third/webpack/runtime/hasOwnProperty shorthand","webpack://bc-admin-third/webpack/runtime/make namespace object","webpack://bc-admin-third/webpack/runtime/runtimeId","webpack://bc-admin-third/webpack/runtime/jsonp chunk loading","webpack://bc-admin-third/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * baseUrl プラグイン\n */\n(function( $ ){\n $.baseUrl = function() {\n return $(\"#AdminScript\").attr('data-baseUrl');\n };\n})( jQuery );\n\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Users Community \n *\n * @copyright Copyright (c) baserCMS Users Community\n * @link https://basercms.net baserCMS Project\n * @since baserCMS v 2.0.0\n * @license https://basercms.net/license/index.html\n */\n\n/**\n * bcBatch プラグイン\n */\n\n(function ($) {\n $.bcBatch = {\n /**\n * 初期値\n */\n config: {\n batchUrl: '',\n listTable: '#ListTable',\n executeButton: '#BtnApplyBatch',\n methodSelect: '#batch',\n checkAll: '#checkall',\n targetCheckbox: '.batch-targets',\n alertBox: '#AlertMessage',\n loader: '#Waiting',\n flashBox: '#flashMessage'\n },\n /**\n * 初期化\n */\n init: function (config) {\n if (config) {\n $.extend($.bcBatch.config, config);\n }\n this.initList();\n return this;\n },\n /**\n * リストの初期化\n */\n initList: function () {\n\n var config = $.bcBatch.config;\n\n // イベント削除\n $($.bcBatch.config.executeButton).unbind();\n $($.bcBatch.config.methodSelect).unbind();\n $(config.listTable + \" \" + config.targetCheckbox).unbind();\n $(config.checkAll).unbind();\n\n // イベント登録\n $($.bcBatch.config.executeButton).click(function () {\n if (!$(config.targetCheckbox + \":checked\").length) {\n alert(bcI18n.commonSelectDataFailedMessage);\n return false;\n }\n\n if (!confirm(bcI18n.batchConfirmMessage)) {\n return false;\n }\n\n var form = $('').append($(config.methodSelect).clone().val($(config.methodSelect).val()));\n $(config.targetCheckbox + \":checked\").each(function(){\n var value = $(this).attr('value');\n if(value) {\n form.append($('').val(value));\n }\n });\n\n $.bcToken.check(function () {\n form.append($('').val($.bcToken.key));\n return $.ajax({\n url: config.batchUrl,\n type: 'POST',\n data: form.serialize(),\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcUtil.setFlashMessage(result.message);\n location.reload();\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n $.bcToken.key = null;\n var errorMessage = '';\n if (XMLHttpRequest.status === 404) {\n errorMessage = '
' + bcI18n.commonNotFoundProgramMessage;\n } else {\n if (XMLHttpRequest.responseText && XMLHttpRequest.responseText !== 'null') {\n errorMessage = '
' + JSON.parse(XMLHttpRequest.responseText).message;\n } else {\n errorMessage = '
' + errorThrown;\n }\n }\n form.remove();\n $.bcUtil.showAlertMessage(bcI18n.commonBatchExecFailedMessage + '(' + XMLHttpRequest.status + ')' + errorMessage);\n $.bcUtil.hideLoader();\n }\n });\n }, {useUpdate: false, hideLoader: false});\n return false;\n });\n\n\n $($.bcBatch.config.methodSelect).change(toolChangeHandler);\n\n $(config.listTable + \" tbody td\").click(function () {\n var checkbox = $(this).parent().find(config.targetCheckbox);\n if (!checkbox.prop('checked')) {\n checkbox.prop('checked', true);\n } else {\n checkbox.prop('checked', false);\n }\n changeRow(checkbox);\n return false;\n });\n\n $(config.listTable + \" tbody td a\").click(function (e) {\n if ($(this).attr('rel') !== 'colorbox') {\n e.stopPropagation();\n }\n });\n\n $(config.listTable + \" \" + config.targetCheckbox).click(function (e) {\n e.stopPropagation();\n });\n\n $(config.listTable + \" \" + config.targetCheckbox).change(function () {\n changeRow($(this));\n });\n\n $(config.checkAll).change(function () {\n if ($(this).prop('checked')) {\n $(config.listTable + \" \" + config.targetCheckbox).prop('checked', true);\n } else {\n $(config.listTable + \" \" + config.targetCheckbox).prop('checked', false);\n }\n $.bcBatch.initRowSelected();\n });\n\n toolChangeHandler();\n $.bcBatch.initRowSelected();\n\n },\n /**\n * 行の選択状態を初期化\n */\n initRowSelected: function () {\n var config = $.bcBatch.config;\n $(config.listTable + \" \" + config.targetCheckbox).each(function () {\n if ($(this).prop('checked')) {\n $(this).parent().parent().addClass('selectedrow');\n } else {\n $(this).parent().parent().removeClass('selectedrow');\n }\n });\n }\n\n };\n\n /**\n * バッチ処理ドロップダウン変更時イベント\n */\n function toolChangeHandler() {\n var config = $.bcBatch.config;\n if ($(config.methodSelect).val()) {\n $(config.executeButton).removeAttr('disabled');\n } else {\n $(config.executeButton).prop('disabled', true);\n }\n }\n})(jQuery);\n\nfunction changeRow(checkbox) {\n if (checkbox.attr('checked') !== undefined) {\n $(checkbox).parent().parent().addClass('selectedrow');\n } else {\n $(checkbox).parent().parent().removeClass('selectedrow');\n }\n}\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * bcCkeditor プラグイン\n */\n(function ($) {\n $.bcCkeditor = {\n\n /**\n * editor\n */\n editor: {},\n\n /**\n * 初期化チェックフラグ\n */\n initStatus: false,\n\n /**\n * スタイル初期化チェックフラグ\n */\n styleInitStatus: false,\n\n /**\n * エディタを表示する\n * @param config\n */\n show: function (config) {\n this.setUpConfig(config);\n if (!this.initStatus) {\n CKEDITOR.addStylesSet('basercms', config.initialStyle);\n this.initStatus = true;\n }\n if (!this.styleInitStatus && config.editorStyle.length) {\n this.editorStyle.map((editor, key) => CKEDITOR.addStylesSet(key, editor));\n this.styleInitStatus = true;\n }\n config.themeEditorCsses.map((css) => {\n if (Array.isArray(CKEDITOR.config.contentsCss)) {\n CKEDITOR.config.contentsCss.push(css);\n }\n });\n this.editor[config.ckeditorField] = CKEDITOR.replace(config.editorDomId, config.editorOptions);\n this.setUpDraft(config);\n this.setUpToolBar(config);\n },\n\n /**\n * 基本設定\n * @param config\n */\n setUpConfig: function (config) {\n CKEDITOR.config.allowedContent = true;\n CKEDITOR.config.extraPlugins = 'draft,showprotected';\n CKEDITOR.config.stylesCombo_stylesSet = config.editorStylesSet;\n CKEDITOR.config.protectedSource.push(/<\\?[\\s\\S]*?\\?>/g);\n // 空「i」タグを消さないようにする\n CKEDITOR.dtd.$removeEmpty[\"i\"] = false;\n // 空「span」タグを消さないようにする\n CKEDITOR.dtd.$removeEmpty[\"span\"] = false;\n if (config.editorUrl) {\n CKEDITOR.config.templates_files = [config.editorUrl];\n }\n if (config.editorEnterBr) {\n CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;\n }\n // 複数入ることを前提に配列型に変更\n if (typeof CKEDITOR.config.contentsCss === 'string') {\n CKEDITOR.config.contentsCss = [CKEDITOR.config.contentsCss];\n }\n },\n\n /**\n * 下書き設定\n * @param config\n */\n setUpDraft: function(config)\n {\n if (!config.editorUseDraft) return;\n this.editor[config.ckeditorField].on('pluginsLoaded', function () {\n if (config.editorUseDraft) {\n if (config.draftAreaId) {\n this.draftDraftAreaId = config.draftAreaId;\n }\n if (config.publishAreaId) {\n this.draftPublishAreaId = config.publishAreaId;\n }\n if (config.editorReadonlyPublish) {\n this.draftReadOnlyPublish = true;\n }\n }\n });\n this.editor[config.ckeditorField].on('instanceReady', function () {\n if (config.editorDisableDraft) {\n this.execCommand('changePublish');\n this.execCommand('disableDraft');\n }\n if (config.editorDisablePublish) {\n this.execCommand('changeDraft');\n this.execCommand('disablePublish');\n }\n this.on('beforeCommandExec', function (e) {\n if (e.data.name === 'changePublish' || e.data.name === 'copyPublish') {\n $(`#${config.previewModeId}`).val('default');\n } else if (e.data.name === 'changeDraft' || e.data.name === 'copyDraft') {\n $(`#${config.previewModeId}`).val('draft');\n }\n });\n });\n },\n\n /**\n * ツールバー設定\n * @param config\n */\n setUpToolBar: function(config)\n {\n this.editor[config.ckeditorField].on('instanceReady', function () {\n if (this.getCommand('maximize').uiItems.length > 0) {\n // ツールバーの表示を切り替え\n this.getCommand('maximize').on('state', () => {\n if (this.state === 1) {\n $(\"#ToolBar\").hide();\n } else {\n $(\"#ToolBar\").show();\n }\n });\n }\n });\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Users Community \n *\n * @copyright Copyright (c) baserCMS Users Community\n * @link https://basercms.net baserCMS Project\n * @since baserCMS v 2.0.0\n * @license https://basercms.net/license/index.html\n */\n\n/**\n * bcConfirm\n */\n\n(function ($) {\n $.bcConfirm = {\n config: {\n title: bcI18n.bcConfirmTitle1,\n message: bcI18n.bcConfirmAlertMessage1,\n defaultCancel: true,\n ok: null\n },\n show: function (config) {\n $.extend($.bcConfirm.config, config);\n var message = $(\"
\").html($.bcConfirm.config.message);\n message.dialog({\n modal: true,\n title: $.bcConfirm.config.title,\n width: '50%',\n buttons: {\n \"キャンセル\": function () {\n $(this).dialog(\"close\");\n },\n \"OK\": function () {\n $(this).dialog(\"close\");\n if (typeof ($.bcConfirm.config.ok) == 'function') {\n $.bcConfirm.config.ok();\n } else {\n alert(bcI18n.bcConfirmAlertMessage2);\n }\n }\n }\n });\n }\n };\n})(jQuery);\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) baserCMS Users Community \n *\n * @copyright Copyright (c) baserCMS Users Community\n * @link https://basercms.net baserCMS Project\n * @since baserCMS v 2.0.0\n * @license https://basercms.net/license/index.html\n */\n\n/**\n * bcCredit\n */\n\n(function ($) {\n $.bcCredit = {\n show: function () {\n $.ajax({\n url: $.bcUtil.adminBaseUrl + 'baser-core/utilities/credit',\n type: \"GET\",\n success: function (result) {\n let hideTarget;\n let isLogin = false;\n let $html = $(\"html\");\n let $page = $(\"#Page\");\n let $credit = $(\"#Credit\");\n if ($(\"#SideBar\").css('display') === 'none') {\n openedFavorite = false;\n hideTarget = \"#Contents\";\n } else {\n openedFavorite = true;\n hideTarget = \"#Contents, #SideBar\";\n }\n if ($credit.length) {\n isLogin = true;\n $credit.remove();\n }\n\n if ($html.css('margin-top') !== '0px') {\n $html.prepend(result);\n } else {\n $page.prepend(result);\n }\n // 再度読み込み直す\n $credit = $(\"#Credit\");\n let $creditScroller = $(\"#CreditScroller\");\n\n if (isLogin) {\n $credit.show();\n } else {\n $credit.fadeIn(1000);\n }\n $page.css('overflow', 'hidden');\n if (!isLogin) {\n $(\"#Footer\").fadeOut(500);\n $(hideTarget).fadeOut(500, function () {\n $(\"#Footer\").fadeIn(2000);\n $.bcCredit.setViewSize();\n });\n }\n $creditScroller.fadeIn(1000);\n\n //リサイズイベント\n $(window).resize(function () {\n $.bcCredit.resizeScroll();\n });\n\n var scrollSpeed = 1;\n var height = $creditScroller.height();\n var posX = $(window).height();\n var id = setInterval(function () {\n if (posX < -height + $(window).height() / 2) {\n clearInterval(id);\n }\n posX -= scrollSpeed;\n $creditScroller.css(\"margin-top\", posX + \"px\");\n }, 40);\n\n $credit.click(function () {\n clearTimeout(id);\n $credit.fadeOut(1000, function () {\n $credit.remove();\n });\n if ($('#Login').length > 0) {\n hideTarget = \"\";\n $(\"#Wrap\").css('height', '280px');\n $(\"#LoginInner\").css('color', '#333');\n } else {\n $(\"#Wrap\").css('height', 'auto');\n if (!openedFavorite) {\n hideTarget = \"#Contents\";\n } else {\n hideTarget = \"#Contents, #SideBar\";\n }\n $(hideTarget).fadeIn(1000);\n }\n $page.css('height', 'auto').css('overflow', 'auto');\n });\n\n $(\"#CreditScrollerInner\").click(function (e) {\n if (e && e.stopPropagation) {\n e.stopPropagation();\n } else {\n window.event.cancelBubble = true;\n }\n });\n }\n });\n },\n\n /**\n * 表示領域を設定\n */\n setViewSize: function(){\n let $toolBar = $(\"#ToolBar\");\n let $credit = $(\"#Credit\");\n let $page = $(\"#Page\");\n let $html = $(\"html\");\n $(\"#Wrap\").css('height', '280px');\n $html.height($html.height() - $toolBar.outerHeight() * 1);\n $credit.height($page.height() + $toolBar.outerHeight() * 1);\n $credit.width($page.width());\n },\n\n /**\n * スクロールバーを非表示に\n */\n resizeScroll: function(){\n let $toolBar = $(\"#ToolBar\");\n let $credit = $(\"#Credit\");\n let $page = $(\"#Page\");\n let $html = $(\"html\");\n let $body = $(\"body\");\n $html.height($html.height() - $toolBar.outerHeight() * 1);\n $body.height($body.height() - $toolBar.outerHeight() * 1);\n $credit.width($page.width());\n $credit.height($page.height() + $toolBar.outerHeight() * 1);\n }\n };\n})(jQuery);\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n(function ($) {\n $.bcJwt = {\n\n /**\n * Access Token\n */\n accessToken: null,\n\n /**\n * Init\n */\n init: function() {\n let refreshToken = localStorage.getItem('refreshToken');\n if(refreshToken && refreshToken !== 'null') {\n this.getToken(refreshToken)\n }\n },\n\n /**\n * Login\n */\n login: function (email, password, saved, successCallback, errorCallback) {\n $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/users/login.json',\n type: 'post',\n data: {\n email: email,\n password: password,\n saved: (saved !== undefined && saved)? 1 : ''\n },\n dataType: 'json'\n }).done(function (response) {\n if (response) {\n this.setToken(response.access_token, response.refresh_token)\n if(successCallback) {\n successCallback(response);\n }\n }\n }.bind(this)).fail(function () {\n if(errorCallback) {\n errorCallback()\n }\n })\n },\n\n /**\n * Get Token\n * @param refreshToken\n */\n getToken: function (refreshToken) {\n if(!refreshToken) {\n return\n }\n $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/users/refresh_token.json',\n type: 'get',\n async: false,\n headers: {\n \"Authorization\": refreshToken,\n 'Content-Type': 'application/json'\n },\n dataType: 'json',\n }).done(function (response) {\n if (response) {\n this.setToken(response.access_token, response.refresh_token)\n } else {\n alert('APIトークンが取得できませんでした。ブラウザをリロードしてください。')\n }\n }.bind(this)).fail(function(error){\n if (error.status === 401) {\n localStorage.setItem('refreshToken', '')\n }\n })\n },\n\n /**\n * Set Token\n * @param accessToken\n * @param refreshToken\n */\n setToken: function (accessToken, refreshToken) {\n this.accessToken = accessToken\n localStorage.setItem('refreshToken', refreshToken);\n },\n\n /**\n * Logout\n */\n logout: function () {\n this.removeToken()\n },\n\n /**\n * Remove Token\n */\n removeToken: function () {\n localStorage.setItem('refreshToken', null);\n this.accessToken = null\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n(function ($) {\n\n $.bcSortable = {\n updateSortUrl : null,\n init: function (config) {\n this.updateSortUrl = config.updateSortUrl\n var sortHandle = $(\".sort-handle\");\n var sortTable = $(\".sort-table\");\n // イベント削除\n sortHandle.unbind();\n // 初期化されてない場合にメソッドを実行すると処理が止まってしまう為 try を利用\n try {\n $(sortTable).sortable(\"destroy\");\n } catch (e) {\n }\n // イベント登録\n var sortableOptions = {\n scroll: true,\n items: \"tr.sortable\",\n opacity: 1,\n zIndex: 55,\n containment: 'body',\n tolerance: 'pointer',\n distance: 5,\n cursor: 'move',\n handle: \".sort-handle\",\n placeholder: 'ui-sortable-placeholder',\n revert: 100,\n start: this.sortStartHandler,\n update: this.sortUpdateHandler\n };\n sortHandle.css('cursor', 'move');\n sortTable.sortable(sortableOptions);\n sortHandle.click(function (e) {\n e.stopPropagation();\n });\n },\n\n /**\n * 並び替え開始時イベント\n */\n sortStartHandler: function (event, ui) {\n var placeholder = $(\".ui-sortable-placeholder\");\n placeholder.css('height', ui.item.height());\n },\n\n /**\n * 並び順を更新時イベント\n */\n sortUpdateHandler: function (event, ui) {\n var target = ui.item;\n var targetNum = $(\".sort-table\" + \" \" + \"tr.sortable\").index(target) + 1;\n var sourceNum = target.attr('id').replace('Row', '');\n var offset = targetNum - sourceNum;\n var sortTable = $(\".sort-table\");\n var form = $('').hide();\n var sortId = $('').attr('type', 'hidden').attr('name', 'id').val(target.find('.id').val());\n var sortOffset = $('').attr('type', 'hidden').attr('name', 'offset').val(offset);\n form.append(sortId).append(sortOffset);\n\n $.bcToken.check(function () {\n form.append($.bcToken.getHiddenToken());\n var data = form.serialize();\n form.find('input[name=\"_csrfToken\"]').remove();\n return $.ajax({\n url: $.bcSortable.updateSortUrl,\n type: 'POST',\n data: data,\n dataType: 'text',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function () {\n sortTable.find(\"tr.sortable\").each(function (i, v) {\n $(this).attr('id', 'Row' + (i + 1));\n });\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n var errorMessage = '';\n if (XMLHttpRequest.status === 404) {\n errorMessage = '
' + bcI18n.commonNotFoundProgramMessage;\n } else {\n if (XMLHttpRequest.responseText) {\n errorMessage = '
' + JSON.parse(XMLHttpRequest.responseText).message;\n } else {\n errorMessage = '
' + errorThrown;\n }\n }\n sortTable.sortable(\"cancel\");\n $.bcUtil.showAlertMessage(bcI18n.commonBatchExecFailedMessage + '(' + XMLHttpRequest.status + ')' + errorMessage)\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n };\n\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n(function ($) {\n $.bcTimeUtil = {\n\n /**\n * 現在の日時を文字列で取得する\n *\n * @returns {string}\n */\n getNowDateTime : function () {\n return $.bcTimeUtil.getNowDate() + ' ' + $.bcTimeUtil.getNowTime();\n },\n\n /**\n * 現在の日付を文字列で取得する\n *\n * @returns {string}\n */\n getNowDate : function () {\n var date = new Date();\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n if (month < 10) month = '0' + month;\n if (day < 10) day = '0' + day;\n return year + '/' + month + '/' + day;\n },\n\n /**\n * 現在の時間を文字列で取得する\n *\n * @returns {string}\n */\n getNowTime : function () {\n var date = new Date();\n var hour = date.getHours();\n var minute = date.getMinutes();\n if (hour < 10) hour = '0' + hour;\n if (minute < 10) minute = '0' + minute;\n return hour + ':' + minute;\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * bcTokenプラグイン\n *\n * フロントエンドでCakePHPのセキュリティコンポーネントのトークンの管理等を行う\n */\n\n(function ($) {\n\n $.bcToken = {\n\n /**\n * トークン\n */\n key: null,\n\n /**\n * トークンを取得済かどうか\n */\n requested: false,\n\n /**\n * トークンを取得中かどうか\n */\n requesting: false,\n\n /**\n * トークンURL\n */\n url: null,\n\n /**\n * デフォルトトークンURL\n */\n defaultUrl: '/baser-core/bc_form/get_token?requestview=false',\n\n /**\n * 初期化\n */\n init: function () {\n this.setTokenUrl();\n },\n\n /**\n * トークンを取得しているかどうかチェックし、取得していない場合取得する\n * コールバック処理を登録する前提となっており、コールバック処理完了後、再度、新しいトークンを取得する\n *\n * @param callback\n * @param config\n */\n check: function (callback, config) {\n if (this.requesting) {\n var timer = setInterval(function () {\n if (!$.bcToken.requesting) {\n clearInterval(timer);\n if (callback) {\n $.bcToken.execCallback(callback, config);\n }\n }\n }, 100);\n } else {\n if (!this.key) {\n this.update(config).done(function () {\n if (callback) {\n $.bcToken.execCallback(callback, config);\n }\n });\n } else {\n if (callback) {\n this.execCallback(callback, config);\n }\n }\n }\n },\n\n /**\n * コールバック処理を実行\n * @param callback\n * @param config\n */\n execCallback: function (callback, config) {\n var _config = {\n useUpdate: true\n };\n if (config !== undefined) {\n config = $.extend(_config, config);\n } else {\n config = _config;\n }\n var result = callback();\n if (config.useUpdate) {\n config.hideLoader = true;\n config.loaderType = 'none';\n if (result) {\n result.always(function () {\n $.bcToken.update(config);\n });\n } else {\n this.update(config);\n }\n }\n },\n\n /**\n * 新しいトークンをサーバーより取得する\n *\n * @param config\n */\n update: function (config) {\n var _config = {\n type: 'GET'\n };\n if (config !== undefined) {\n config = $.extend(_config, config);\n } else {\n config = _config;\n }\n this.requesting = true;\n return $.bcUtil.ajax(this.url, function (result) {\n $.bcToken.key = result;\n $.bcToken.requesting = false;\n $('input[name=\"_csrfToken\"]').val($.bcToken.key);\n }, $.extend(true, {}, config));\n },\n\n /**\n * トークンを取得した空のフォームを取得する\n * コールバック処理の引数として利用可能\n * @param url\n * @param options\n * @param callback\n * @param config\n */\n getForm: function (url, options, callback, config) {\n var form = $('');\n form.attr('action', url).attr('method', 'post');\n this.check(function () {\n form.append($.bcToken.getHiddenToken());\n if (options.fields) form.append(options.fields);\n if (options.unlocked) form.append(options.unlocked);\n if (options.debug) form.append(options.debug);\n callback(form);\n }, config);\n },\n\n /**\n * トークン用の hidden タグを取得する\n *\n * @returns {*}\n */\n getHiddenToken: function () {\n return $('').val(this.key);\n },\n\n /**\n * 指定したURLに対しトークンを付加した上でPOST送信を行う\n * @param url\n * @param options\n */\n submitToken: function (url, options) {\n this.getForm(url, options, function (form) {\n $('body').append(form);\n form.submit();\n }, {useUpdate: false, hideLoader: false});\n },\n\n /**\n * 指定したセレクターのリンクのクリックイベントについて、\n * トークン付加前提のフォーム送信処理に置き換える\n *\n * CakePHP の postLink に対応\n * postLink を利用した場合、ローダーを表示するなどの処理を割り込ませる事ができないが、\n * CakePHP が生成するフォームでなく、こちらで生成するフォームを利用することで、ローダーを表示できるようにした。\n * @param selector\n */\n replaceLinkToSubmitToken: function (selector) {\n $(selector).each(function () {\n if ($(this).attr('onclick')) {\n var regex = /document\\.(post_.+?).submit\\(\\)/;\n var result = $(this).attr('onclick').match(regex);\n if (result) {\n $(this).attr('data-post-link-form-id', result[1]);\n }\n $(this).get(0).onclick = '';\n $(this).removeAttr('onclick');\n }\n });\n $(selector).click(function () {\n if ($(this).attr('data-confirm-message')) {\n var message = $(this).attr('data-confirm-message');\n if (!confirm(message)) {\n return false;\n }\n }\n let url = $(this).attr('href');\n let options = {};\n if ($(this).attr('data-post-link-form-id')) {\n let postLinkForm = $(\"form[name='\" + $(this).attr('data-post-link-form-id') + \"']\");\n let fields = postLinkForm.find(\"input[name='_Token[fields]']\");\n let unlocked = postLinkForm.find(\"input[name='_Token[unlocked]']\");\n let debug = postLinkForm.find(\"input[name='_Token[debug]']\");\n url = postLinkForm.attr('action');\n options = {\n fields: (fields.length) ? fields : null,\n unlocked: (unlocked.length) ? unlocked : null,\n debug: (debug.length) ? debug : null\n }\n }\n $.bcToken.submitToken(url, options);\n return false;\n });\n },\n\n /**\n * トークン発行URLのセット\n * @param url トークン発行URL。nullの場合はデフォルトURL\n */\n setTokenUrl: function (url) {\n this.url = url != null ? url : $.bcUtil.baseUrl + this.defaultUrl;\n return this;\n }\n\n };\n\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n/**\n * jsTree 設定\n */\n\n(function ($) {\n $.bcTree = {\n\n /**\n * リンクをクリックする際にShiftキーを押しているかどうか\n */\n shiftOnAnchor: false,\n\n /**\n * リンクをクリックする際にCtrlキーを押しているかどうか\n */\n ctrlOnAnchor: false,\n\n /**\n * コンテキストメニューを追加項目のみとする\n */\n contextmenuAddOnly: false,\n\n /**\n * 設定 BcManageContent より値を取得\n */\n settings: [],\n\n /**\n * ドラッグターゲット\n */\n dropTarget: null,\n\n /**\n * ドロップターゲット\n */\n dragTarget: null,\n\n /**\n * ツリー構造のDOM(jQueryオブジェクト)\n */\n treeDom: null,\n\n /**\n * jsTree実体\n */\n jsTree: null,\n\n /**\n * 一覧を表示した時間\n */\n listDisplayed: null,\n\n /**\n * ノードを移動する場合の直前の親ID\n */\n beforeParentId: null,\n\n /**\n * ノードを移動する場合の直前のポジション\n */\n beforePosition: null,\n\n /**\n * 現在のサイトid\n */\n currentSiteId: 1,\n\n /**\n * 設定\n */\n config: {\n isAdmin: false,\n isUseMoveContents: false,\n adminPrefix: 'admin',\n editInIndexDisabled: false\n },\n\n /**\n * 初期化済かどうか\n */\n _inited: false,\n\n /**\n * 初期化\n * @param config\n */\n init: function (config) {\n if (config) {\n $.extend($.bcTree.config, config);\n }\n $.bcTree._inited = true;\n },\n /**\n * ツリーを読み込む\n */\n load: function () {\n $.bcUtil.showLoader();\n if (!$.bcTree._inited) {\n return;\n }\n const mode = $(\"#viewsetting-mode\").val();\n let url;\n $.bcTree.listDisplayed = $.bcTimeUtil.getNowDateTime();\n $.bcTree._init();\n $($.bcTree).trigger('loaded');\n $.bcUtil.hideLoader();\n },\n\n /**\n * ツリーを初期化する\n */\n _init: function () {\n if (!$('#ContentsTreeList').length) {\n return false;\n }\n $.bcTree.settings = $.parseJSON($(\"#bcmanagecontent\").val());\n $.bcTree.treeDom = $('#ContentsTreeList');\n $.bcTree.createTree();\n $.bcTree.jsTree = $.bcTree.treeDom.jstree(true);\n $.bcTree.treeDom.bind(\"move_node.jstree\", function (e, data) {\n $.bcTree.beforeParentId = data.old_parent;\n $.bcTree.beforePosition = data.old_position;\n });\n\n // ダブルクリックイベント\n $.bcTree.treeDom.bind(\"dblclick\", $.bcTree.updateShiftAndCtrlOnAnchor);\n\n // ダブルクリックイベント\n $.bcTree.treeDom.bind(\"dblclick.jstree\", function (event) {\n var mode = $(\"#viewsetting-mode\").val();\n if (mode == 'trash') {\n return false;\n }\n var nodeId = $(event.target).closest(\"li\").attr('id');\n var data = $.bcTree.jsTree.get_node(nodeId).data.jstree;\n if (data.type == 'default' || data.alias) {\n if ($.bcTree.settings[data.contentType] == undefined || !$.bcTree.settings[data.contentType].editDisabled) {\n if (!data.alias) {\n if ($.bcTree.settings[data.contentType] == undefined) {\n $.bcTree.openUrl($.bcTree.createLink($.baseUrl() + '/' + $.bcTree.config.baserCorePrefix + '/' + $.bcTree.config.adminPrefix + '/contents/edit', data.contentId, data.contentParentId, data.contentEntityId));\n } else {\n if ($.bcTree.settings[data.contentType]['url']['dblclick'] !== undefined) {\n $.bcTree.openUrl($.bcTree.createLink($.bcTree.settings[data.contentType]['url']['dblclick'], data.contentId, data.contentParentId, data.contentEntityId));\n } else {\n $.bcTree.openUrl($.bcTree.createLink($.bcTree.settings[data.contentType]['url']['edit'], data.contentId, data.contentParentId, data.contentEntityId));\n }\n }\n } else {\n $.bcTree.openUrl($.bcUtil.adminBaseUrl + 'baser-core' + '/contents/edit_alias/' + data.contentId);\n }\n }\n }\n });\n\n // コンテキストメニュー表示イベント\n $.bcTree.treeDom.on(\"show_contextmenu.jstree\", function () {\n $(\"ul.jstree-contextmenu li\").each(function () {\n if ($.bcTree.isAliasMenuByLabel($.trim($(this).text()))) {\n $(this).find('a i').after('');\n }\n if ($.bcTree.isAddMenuByLabel($.trim($(this).text()))) {\n $(this).find('a i').after('');\n }\n });\n });\n\n // フォルダ展開イベント\n $.bcTree.treeDom.on(\"after_open.jstree\", function (e) {\n $.bcTree.refreshTree();\n });\n\n // テキスト変更イベント\n // コンテンツ追加のリネーム時\n $.bcTree.treeDom.on(\"set_text.jstree\", function (e) {\n $.bcTree.refreshTree();\n });\n\n // ロード完了イベント\n $.bcTree.treeDom.on(\"ready.jstree\", function (e) {\n $.bcTree.treeDom.show();\n $.bcTree.refreshTree();\n });\n\n },\n\n /**\n * ツリーを破棄する\n */\n destroy: function () {\n if ($.bcTree.treeDom) {\n $.bcTree.treeDom.unbind(\"dblclick\");\n $.bcTree.treeDom.unbind(\"dblclick.jstree\");\n $.bcTree.treeDom.unbind(\"show_contextmenu.jstree\");\n $.bcTree.treeDom.unbind(\"after_open.jstree\");\n $.bcTree.treeDom.unbind(\"set_text.jstree\");\n $.bcTree.treeDom.unbind(\"ready.jstree\");\n $.bcTree.treeDom.remove();\n }\n $.bcTree.shiftOnAnchor = false;\n $.bcTree.ctrlOnAnchor = false;\n $.bcTree.contextmenuAddOnly = false;\n $.bcTree.settings = [];\n $.bcTree.dropTarget = null;\n $.bcTree.dragTarget = null;\n $.bcTree.treeDom = null;\n $.bcTree.jsTree = null;\n },\n\n /**\n * ツリー構造を生成する\n */\n createTree: function () {\n\n // ツリービュー生成\n $.bcTree.treeDom.jstree({\n 'core': {\n 'themes': {\n 'name': 'proton',\n \"stripes\": true,\n \"variant\": \"large\"\n },\n \"multiple\": false,\n \"force_text\": true,\n \"check_callback\": function (operation, node, node_parent, node_position, more) {\n if (operation == 'move_node') {\n if (!$.bcTree.config.isUseMoveContents) {\n return false;\n }\n if (node_parent.type == 'folder' && !node_parent.data.jstree.alias && !node.data.jstree.contentSiteRoot) {\n $.bcTree.dropTarget = node_parent;\n $.bcTree.dragTarget = node;\n return true;\n } else {\n $.bcTree.dropTarget = null;\n $.bcTree.dragTarget = null\n return false;\n }\n }\n }\n },\n \"plugins\": [\n \"dnd\",\n \"changed\",\n \"state\",\n \"wholerow\",\n \"contextmenu\",\n \"types\"\n ],\n \"dnd\": {\n \"large_drop_target\": true\n },\n \"types\": {\n \"default\": {},\n \"folder\": {}\n },\n \"state\": {\n \"key\": 'jstree-' + $.bcTree.currentSiteId,\n \"events\": \"open_all.jstree close_all.jstree changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree\"\n },\n \"contextmenu\": {\n \"show_at_node\": false,\n \"items\": function (node) {\n var maxContents = 6;\n var data = node.data.jstree;\n var mode = $(\"#viewsetting-mode\").val();\n var parent;\n if (data.type === 'folder' && !node.data.jstree.alias) {\n parent = node;\n } else {\n parent = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_parent(node));\n }\n\n var editDisabled = false;\n var manageDisabled = false;\n var editUrl = null;\n var manageUrl = null;\n var copyUrl = null;\n var isEnabled = false;\n\n if ($.bcTree.settings[data.contentType] !== undefined) {\n editDisabled = data.editDisabled;\n manageDisabled = data.manageDisabled;\n manageUrl = $.bcTree.settings[data.contentType]['url']['manage'];\n editUrl = $.bcTree.settings[data.contentType]['url']['edit'];\n copyUrl = $.bcTree.settings[data.contentType]['url']['copy'];\n isEnabled = true;\n }\n\n var menu = {};\n\n // 確認\n // - 公開されている\n // - URLがある\n if (isEnabled && data.status && data.contentFullUrl && !$.bcTree.contextmenuAddOnly && mode === 'index') {\n $.extend(true, menu, {\n \"view\": {\n label: bcI18n.bcTreeCheck,\n \"icon\": \"bca-icon--preview\",\n \"action\": function (obj) {\n $.bcTree.openUrl(data.contentFullUrl, true);\n }\n }\n });\n }\n\n // 公開・非公開\n // - サイトルートではない\n // - 関連データではない\n if (isEnabled && !$.bcTree.config.editInIndexDisabled && !editDisabled && !data.contentSiteRoot && mode === 'index' && !$.bcTree.contextmenuAddOnly && !data.related) {\n if (!data.status) {\n $.extend(true, menu, {\n \"publish\": {\n label: bcI18n.bcTreePublish,\n \"icon\": \"bca-icon--publish\",\n \"action\": function (obj) {\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/change_status.json',\n type: 'PATCH',\n data: {\n id: data.contentId,\n status: 'publish',\n type: data.contentType,\n siteId: data.contentSiteId,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n node.data.jstree.status = true;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n }\n });\n } else if (data.status) {\n $.extend(true, menu, {\n \"unpublish\": {\n label: bcI18n.bcTreeUnpublish,\n \"icon\": \"bca-icon--unpublish\",\n \"action\": function (obj) {\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core' + '/contents/change_status.json',\n type: 'PATCH',\n data: {\n id: data.contentId,\n status: 'unpublish',\n type: data.contentType,\n siteId: data.contentSiteId,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n node.data.jstree.status = false;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.commonChangePublishFailedMessage, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n }\n });\n }\n }\n\n // 管理\n // - 管理権限あり\n // - 管理機能サポート\n // - エイリアスではない\n if (!manageDisabled && !$.bcTree.contextmenuAddOnly && manageUrl && mode === 'index' && !data.alias) {\n $.extend(true, menu, {\n \"manage\": {\n label: bcI18n.bcTreeManage,\n \"icon\": \"bca-icon--th-list\",\n \"action\": function (obj) {\n $.bcTree.openUrl($.bcTree.createLink(manageUrl, data.contentId, data.contentParentId, data.contentEntityId));\n }\n }\n });\n }\n\n // 名称変更\n // - 編集権限あり\n // - サイトルートでない\n // − サイト関連データでない\n if (isEnabled && !$.bcTree.config.editInIndexDisabled && !editDisabled && !$.bcTree.contextmenuAddOnly && !data.contentSiteRoot && mode === 'index' && !data.related) {\n $.extend(true, menu, {\n \"rename\": {\n label: bcI18n.bcTreeRename,\n \"icon\": \"bca-icon--rename\",\n \"action\": function (obj) {\n $.bcTree.renameContent(node, node.text);\n }\n }\n });\n }\n\n // 編集\n // - 編集権限あり\n if (isEnabled && !editDisabled && !$.bcTree.contextmenuAddOnly && mode === 'index') {\n $.extend(true, menu, {\n \"edit\": {\n label: bcI18n.bcTreeEdit,\n \"icon\": \"bca-icon--edit\",\n \"action\": function (obj) {\n if (!node.data.jstree.alias) {\n $.bcTree.openUrl($.bcTree.createLink(editUrl, data.contentId, data.contentParentId, data.contentEntityId));\n } else {\n $.bcTree.openUrl($.bcUtil.adminBaseUrl + 'baser-core' + '/contents/edit_alias/' + data.contentId);\n }\n }\n }\n });\n }\n\n // コピー\n // - 編集権限あり\n // - フォルダーでない\n // - コピー機能サポート\n if (!editDisabled && !$.bcTree.contextmenuAddOnly && data.contentType !== 'ContentFolder' && !data.alias && copyUrl && mode === 'index') {\n $.extend(true, menu, {\n \"copy\": {\n label: bcI18n.bcTreeCopy,\n \"icon\": \"bca-icon--copy\",\n \"action\": function (obj) {\n $.bcTree.copyContent(parent, node);\n }\n }\n });\n }\n var deleteLabel;\n if (data.alias) {\n deleteLabel = bcI18n.bcTreeDelete;\n } else {\n deleteLabel = bcI18n.bcTreeToTrash;\n }\n\n // 削除\n // - 編集権限あり\n // - サイトルートでない\n if (!$.bcTree.config.editInIndexDisabled && !editDisabled && !data.deleteDisabled && !$.bcTree.contextmenuAddOnly && !data.contentSiteRoot && mode === 'index') {\n $.extend(true, menu, {\n \"delete\": {\n label: deleteLabel,\n \"icon\": \"bca-icon--delete\",\n \"action\": function (obj) {\n var message = bcI18n.bcTreeConfirmToTrash;\n if (data.alias) {\n message = bcI18n.bcTreeConfirmDeleteAlias;\n }\n if (confirm(message)) {\n $.bcTree.deleteContent(node);\n }\n }\n }\n });\n }\n if (mode === 'trash') {\n $.extend(true, menu, {\n \"return\": {\n _disabled: editDisabled,\n label: bcI18n.bcTreeUndo,\n \"icon\": \"bca-icon--undo\",\n \"action\": function (obj) {\n if (data.alias) {\n $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/exists/' + data.contentAliasId + '.json',\n type: 'GET',\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n }).done(function (result) {\n if (result.exists) {\n $.bcTree.returnContent(node);\n } else {\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage1);\n }\n });\n } else {\n $.bcTree.returnContent(node);\n }\n }\n },\n \"empty\": {\n _disabled: !$.bcTree.config.isAdmin,\n label: bcI18n.bcTreeEmptyTrash,\n \"icon\": \"bca-icon--ban\",\n \"action\": function (obj) {\n if (confirm(bcI18n.bcTreeConfirmMessage1)) {\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/trash_empty.json',\n type: 'DELETE',\n dataType: 'json',\n data: {\n empty: true,\n _csrfToken: $.bcToken.key,\n },\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n if (result) {\n var nodes = [];\n $(\"li.jstree-node\").each(function (i) {\n nodes.push($.bcTree.jsTree.get_node(this));\n });\n $.bcTree.jsTree.delete_node(nodes);\n $.bcUtil.showNoticeMessage(result.message);\n $(\"#DataList\").html('
' + bcI18n.bcTreeInfoMessage1 + '
');\n }\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage2, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n });\n }, {hideLoader: false});\n }\n }\n }\n });\n }\n\n var settings = $.extend(true, {}, $.bcTree.settings);\n\n delete settings.Default;\n if (node.data.jstree.alias) {\n delete settings.ContentAlias;\n }\n\n if (mode === 'index') {\n var addMenu = {};\n var counter = 1;\n\n $.each(settings, function (i, val) {\n if (counter === maxContents + 1) {\n addMenu['Etc'] = {\n \"separator_before\": false,\n \"separator_after\": false,\n \"label\": \"その他...\",\n \"submenu\": {}\n }\n }\n if (counter <= maxContents) {\n if (!val.addDisabled) {\n addMenu[i] = $.bcTree.createMenu(val, parent, data, counter);\n }\n } else {\n if (!val.addDisabled) {\n addMenu['Etc']['submenu'][i] = $.bcTree.createMenu(val, parent, data, counter);\n }\n }\n counter++;\n });\n $.extend(true, menu, addMenu);\n }\n return menu;\n }\n }\n });\n },\n\n /**\n * メニューのラベルから登録メニューかどうかをチェックする\n *\n * @param name\n * @returns {boolean}\n */\n isAddMenuByLabel: function (name) {\n var node = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_selected());\n var settings = $.extend(true, {}, $.bcTree.settings);\n delete settings.Default;\n if (node.data.jstree.alias) {\n delete settings.ContentAlias;\n }\n var counter = 1;\n var result = false;\n $.each(settings, function (i) {\n if (name == counter + '.' + this.title) {\n result = true;\n }\n counter++;\n });\n return result;\n },\n\n /**\n * メニューのラベルからエイリアスかどうかをチェックする\n *\n * @param name\n * @returns {boolean}\n */\n isAliasMenuByLabel: function (name) {\n var node = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_selected());\n var settings = $.extend(true, {}, $.bcTree.settings);\n delete settings.Default;\n if (node.data.jstree.alias) {\n delete settings.ContentAlias;\n }\n var counter = 1;\n var result = false;\n $.each(settings, function (i) {\n if (i == 'Default') {\n return true;\n }\n if (node.data.jstree.alias && i == 'ContentLink') {\n return true;\n }\n if (name == counter + '.' + this.title && !this.multiple && this.exists) {\n result = true;\n }\n counter++;\n });\n return result;\n },\n\n /**\n * ツリーを更新する\n */\n refreshTree: function (disableCheck) {\n if (disableCheck === undefined) {\n disableCheck = false;\n }\n var treeData = $.bcTree.jsTree.get_json('#', {flat: true});\n sort = 1;\n // 並び順を特定する番号を更新する\n $(treeData).each(function () {\n var node = $.bcTree.jsTree.get_node(this.id);\n node.data.jstree.sort = sort;\n sort++;\n });\n // 公開状態によってカラーリングを更新する\n $(\"li.jstree-node\").each(function (i) {\n var node = $.bcTree.jsTree.get_node(this);\n // =====================================================================================================\n // コンテンツをドラッグ&ドロップした際に、階層が変更となると、フロントエンドの確認を行う為のURLの更新も行う必要がある。\n // 現在、対象コンテンツは更新されるが、フォルダの場合、子のコンテンツのURLが更新できていない為、\n // 確認ボタンをクリックするとNot Found となる。そのため一時的な対策として、確認ボタンを無効にする\n // TODO D&Dの際、子コンテンツのURLを返却し全てのコンテンツの確認ができるようにする\n // =====================================================================================================\n if (disableCheck) {\n node.data.jstree.contentFullUrl = false;\n }\n\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).removeClass('jstree-unpublish-odd jstree-unpublish-even jstree-publish-odd jstree-publish-even');\n return false;\n });\n if (node.data.jstree.status == false) {\n if (i % 2 == 0) {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-unpublish-odd');\n return false;\n });\n } else {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-unpublish-even');\n return false;\n });\n }\n } else {\n if (i % 2 == 0) {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-publish-odd');\n return false;\n });\n } else {\n $(this).find('div.jstree-wholerow').each(function () {\n $(this).addClass('jstree-publish-even');\n return false;\n });\n }\n }\n if (node.data.jstree.alias) {\n $(this).find('a i.jstree-icon:first').after('');\n }\n $(this).find('a.jstree-anchor:first').after('');\n $(this).find('.content-name').remove();\n if (node.data.jstree.name) {\n $(this).find('a.jstree-anchor:first').after('( ' + decodeURIComponent(node.data.jstree.name) + ' )')\n }\n });\n $(\"span.function\").on('click', function (e) {\n $.bcTree.jsTree.deselect_all();\n $.bcTree.jsTree.select_node($.bcTree.jsTree.get_node($(this).parent().attr('id')));\n $.bcTree.jsTree.show_contextmenu($.bcTree.jsTree.get_selected(), e.pageX, e.pageY);\n return false;\n });\n $(\"span.function\").on('contextmenu', function (e) {\n $.bcTree.jsTree.deselect_all();\n $.bcTree.jsTree.select_node($.bcTree.jsTree.get_node($(this).parent().attr('id')));\n $.bcTree.jsTree.show_contextmenu($.bcTree.jsTree.get_selected(), e.pageX, e.pageY);\n return false;\n });\n if ($.bcTree.config.isUseMoveContents) {\n $(\".jstree-icon\").css('cursor', 'move');\n }\n },\n\n /**\n * ゴミ箱から元にもどす\n *\n * @param node\n */\n returnContent: function (node) {\n $.bcToken.check(function () {\n return $(location).prop('href', $.bcUtil.adminBaseUrl + 'baser-core' + '/contents/trash_return/' + node.data.jstree.contentId);\n }, {hideLoader: false});\n },\n\n /**\n * Open Url\n *\n * @param url\n * @param forceBlank\n */\n openUrl: function (url, forceBlank) {\n forceBlank = forceBlank === undefined ? false : forceBlank;\n if ($.bcTree.ctrlOnAnchor || forceBlank) {\n window.open(url);\n } else if ($.bcTree.shiftOnAnchor) {\n window.open(url, '_blank');\n } else {\n window.location.href = url;\n }\n },\n\n /**\n * Create Menu\n *\n * @param setting\n * @param parent\n * @returns {{label: string, icon: string, action: function}}\n */\n createMenu: function (setting, parent, current, i) {\n var type = 'default';\n var contentAliasId = null;\n var contentTitle = bcI18n.bcTreeNewTitle.sprintf(setting.title);\n var contentPlugin = setting.plugin;\n var contentType = setting.type;\n var contentEntityId = null;\n var iconAdd;\n var iconMenu;\n if (setting.url.icon) {\n iconAdd = iconMenu = setting.url.icon;\n } else {\n iconAdd = iconMenu = setting.icon;\n }\n if (setting.type == 'ContentFolder') {\n var separatorBefore = true;\n type = 'folder';\n } else if (setting.type == 'ContentLink') {\n var separatorAfter = true;\n } else if (setting.type == 'ContentAlias') {\n iconAdd = current.icon;\n contentAliasId = current.contentId;\n contentPlugin = current.contentPlugin;\n contentType = current.contentType;\n contentTitle = bcI18n.bcTreeAliasTitle.sprintf(current.contentTitle);\n contentEntityId = current.contentEntityId;\n } else {\n if ((!setting['multiple'] && setting['exists'])) {\n contentTitle = bcI18n.bcTreeAliasTitle.sprintf(setting['existsTitle']);\n }\n }\n\n return {\n label: \"\" + i + \".\" + setting.title,\n icon: iconMenu,\n separator_before: separatorBefore,\n separator_after: separatorAfter,\n action: function () {\n $.bcTree.createContent(parent, {\n type: type,\n icon: iconAdd,\n contentParentId: parent.data.jstree.contentId,\n contentTitle: contentTitle,\n contentPlugin: contentPlugin,\n contentType: contentType,\n contentSiteId: parent.data.jstree.contentSiteId,\n contentAliasId: contentAliasId,\n contentEntityId: contentEntityId\n });\n }\n };\n },\n\n /**\n * Create Content\n *\n * @param parent\n * @param data\n */\n createContent: function (parent, data) {\n var _data = {\n icon: null,\n type: 'default',\n status: false,\n contentId: null,\n contentParentId: null,\n contentTitle: bcI18n.bcTreeUnNamedTitle,\n contentPlugin: null,\n contentType: null,\n contentEntityId: null,\n contentFullUrl: null,\n contentSiteId: null,\n contentAliasId: null\n };\n $.extend(true, _data, data);\n data = _data;\n var url = '';\n // シングルコンテンツでデータが既に存在する場合 エイリアス作成の場合\n if ((!$.bcTree.settings[data.contentType]['multiple'] && $.bcTree.settings[data.contentType]['exists']) || data.contentAliasId) {\n url = $.bcUtil.apiAdminBaseUrl + 'baser-core' + '/contents/add_alias.json';\n data.alias = true;\n } else {\n url = $.bcTree.settings[data.contentType]['url']['add'];\n }\n var nodeId = $.bcTree.jsTree.create_node(parent, {\n text: data.contentTitle,\n data: {jstree: data}\n });\n var node = $.bcTree.jsTree.get_node(nodeId);\n $.bcTree.jsTree.edit(node, data.contentTitle, function (editNode) {\n $.bcToken.check(function () {\n const content = {\n parent_id: data.contentParentId,\n title: editNode.text,\n plugin: data.contentPlugin,\n type: data.contentType,\n site_id: data.contentSiteId,\n alias_id: data.contentAliasId,\n entity_id: data.contentEntityId\n };\n return $.ajax({\n url: url,\n type: 'POST',\n data: {\n _csrfToken: $.bcToken.key,\n content: content,\n },\n dataType: 'json',\n beforeSend: function () {\n this.data = $.bcTree.fillExtraData(this.data, data);\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcUtil.showNoticeMessage(result.message);\n $.bcTree.settings[data.contentType]['exists'] = true;\n $.bcTree.settings[data.contentType]['existsTitle'] = editNode.text;\n data.contentId = result.content.id;\n data.contentEntityId = result.content.entity_id;\n data.name = decodeURIComponent(result.content.name);\n node.data.jstree = data;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage6, XMLHttpRequest);\n $.bcTree.jsTree.delete_node(node);\n $.bcUtil.hideLoader();\n }\n }).then(function () {\n return $.bcUtil.ajax($.bcUtil.apiAdminBaseUrl + 'baser-core' + '/contents/get_full_url/' + data.contentId + '.json', {}, {\n type: 'GET',\n dataType: 'json'\n }).done(function (result) {\n data.contentFullUrl = decodeURI(result.fullUrl);\n node.data.jstree = data;\n if (data.contentType == 'ContentFolder') {\n node.type = 'folder'\n }\n });\n });\n }\n , {hideLoader: false});\n });\n },\n /**\n * ポスト用のデータにコンテンツの種類に基づいた不足データを追加する\n *\n * @param postData 送信用データ\n * @param settingData 保持してるデータ\n */\n fillExtraData: function (postData, settingData) {\n const extra = (() => {\n switch (settingData.contentType) {\n case \"ContentFolder\":\n return {\n folder_template: \"\",\n page_template: \"\"\n };\n case \"Page\":\n return {\n contents: \"\",\n draft: \"\",\n page_template: \"\",\n code: \"\"\n };\n default:\n break;\n }\n })();\n if (extra) {\n postData += '&' + encodeURI($.param(extra));\n }\n return postData;\n },\n\n /**\n * Delete Content\n *\n * @param node\n */\n deleteContent: function (node) {\n var data = node.data.jstree;\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/delete/' + data.contentId + '.json',\n type: 'POST',\n data: {\n id: data.contentId,\n entity_id: data.contentEntityId,\n alias: data.alias,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcUtil.showNoticeMessage(result.message);\n $.bcToken.key = null;\n $.bcTree.jsTree.delete_node(node);\n // エイリアス削除\n var nodes = $.bcTree.jsTree.get_json(null, {flat: true});\n for (var i = 0; i < nodes.length; i++) {\n if (data.contentId == nodes[i].state.contentAliasId) {\n $.bcTree.jsTree.delete_node(nodes[i]);\n }\n }\n $.bcTree.refreshTree();\n $.bcUtil.hideLoader();\n },\n error: function (XMLHttpRequest) {\n $.bcToken.key = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage4, XMLHttpRequest);\n $.bcUtil.hideLoader();\n }\n });\n }, {useUpdate: false, hideLoader: false});\n },\n\n /**\n * Copy Content\n *\n * @param parent\n * @param node\n */\n copyContent: function (parent, node) {\n var data = $.extend(true, {}, node.data.jstree);\n data.status = false;\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcTree.settings[data.contentType]['url']['copy'],\n type: 'POST',\n data: {\n content_id: data.contentId,\n entity_id: data.contentEntityId,\n parent_id: data.contentParentId,\n site_id: data.contentSiteId,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n $.bcToken.key = null;\n $.bcTree.settings[data.contentType]['exists'] = true;\n $.bcTree.settings[data.contentType]['existsTitle'] = data.contentTitle;\n data.contentId = result.content.id;\n data.contentEntityId = result.content.entity_id;\n data.contentTitle = data.contentTitle.replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(//g, '>');\n $.ajax($.bcUtil.apiAdminBaseUrl + 'baser-core/contents/get_full_url/' + data.contentId + '.json', {\n type: 'GET',\n dataType: 'json'\n }).done(function (result) {\n data.contentFullUrl = result.fullUrl;\n var nodeId = $.bcTree.jsTree.create_node(parent, {\n text: data.contentTitle,\n data: {jstree: data}\n });\n var newNode = $.bcTree.jsTree.get_node(nodeId);\n newNode.data.jstree = data;\n if (data.contentType === 'ContentFolder') {\n newNode.type = 'folder'\n }\n $.bcUtil.hideLoader();\n $.bcTree.renameContent(newNode, data.contentTitle, true);\n });\n },\n error: function (XMLHttpRequest) {\n $.bcToken.key = null;\n $.bcUtil.showAjaxError(bcI18n.commonCopyFailedMessage, XMLHttpRequest);\n $.bcUtil.hideLoader();\n }\n });\n }, {useUpdate: false, hideLoader: false});\n },\n\n /**\n * Rename Content\n *\n * @param node\n * @param defaultTitle 初期タイトル\n * @param first 新規登録時の初回リネームかどうか\n */\n renameContent: function (node, defaultTitle, first) {\n if (first === undefined) {\n first = false;\n }\n var oldTitle = defaultTitle;\n $.bcTree.jsTree.edit(node, oldTitle, function (editNode) {\n var newTitle = editNode.text;\n $.bcTree.jsTree.rename_node(editNode, newTitle);\n if (oldTitle === newTitle) {\n return false;\n }\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/rename.json',\n type: 'PATCH',\n dataType: 'json',\n data: {\n id: node.data.jstree.contentId,\n title: newTitle,\n first: +first, // 0 Or 1 に変換\n _csrfToken: $.bcToken.key,\n },\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n if (!result) {\n $.bcUtil.showNoticeMessage(result.message);\n }\n $.bcTree.settings[node.data.jstree.contentType]['existsTitle'] = editNode.text;\n editNode.data.jstree.contentFullUrl = result.url;\n editNode.data.jstree.name = result.name;\n $.bcTree.refreshTree();\n },\n error: function (XMLHttpRequest) {\n $.bcTree.jsTree.rename_node(editNode, defaultTitle);\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.bcTreeAlertMessage5, XMLHttpRequest);\n },\n complete: function () {\n $.bcUtil.hideLoader();\n }\n })\n }, {hideLoader: false});\n });\n },\n\n /**\n * Create Link\n *\n * @param base\n * @param contentParentId\n * @param contentEntityId\n * @returns string\n */\n createLink: function (base, contentId, contentParentId, contentEntityId) {\n var url = base;\n if (contentEntityId) {\n url += '/' + contentEntityId;\n }\n if (contentId) {\n url += '/content_id:' + contentId;\n }\n if (contentParentId) {\n url += '/parent_id:' + contentParentId;\n }\n return url;\n },\n\n /**\n * コンテンツを並び替える\n *\n * @param e\n * @param data\n */\n orderContent: function (e, data) {\n $.bcTree.changeNormalCursor();\n var cancel = false;\n var node = $.bcTree.jsTree.get_node(data.element);\n if (!node) {\n node = $.bcTree.dragTarget;\n }\n if (!node) {\n cancel = true;\n }\n var oldSort = node.data.jstree.sort;\n $.bcTree.refreshTree();\n var newSort = node.data.jstree.sort;\n var offset = newSort - oldSort;\n if (offset == 0) {\n if (!$.bcTree.dropTarget) {\n cancel = true;\n }\n if (node.data.jstree.contentParentId == $.bcTree.dropTarget.data.jstree.contentId) {\n cancel = true;\n }\n }\n\n if (cancel || !confirm(bcI18n.commonSortSaveConfirmMessage)) {\n // コンテンツを別のフォルダに移動するか、コンテンツを上から下に移動\n if (node.parent != $.bcTree.beforeParentId || offset >= 0) {\n $.bcTree.jsTree.move_node(node, $.bcTree.beforeParentId, $.bcTree.beforePosition);\n // コンテンツを下から上に移動\n } else {\n $.bcTree.jsTree.move_node(node, $.bcTree.beforeParentId, $.bcTree.beforePosition + 1);\n }\n $.bcTree.refreshTree();\n return false;\n }\n\n if ($.bcTree.dropTarget) {\n $.bcTree.jsTree.open_node($.bcTree.dropTarget);\n }\n\n var nextNode = $.bcTree.jsTree.get_node($.bcTree.jsTree.get_next_dom(node, true));\n var targetId = null;\n if (nextNode) {\n targetId = nextNode.data.jstree.contentId;\n }\n $.bcToken.check(function () {\n return $.ajax({\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/contents/move.json',\n type: 'PATCH',\n data: {\n origin: {\n id: node.data.jstree.contentId,\n parentId: node.data.jstree.contentParentId,\n type: node.data.jstree.contentType,\n entityId: node.data.jstree.contentEntityId,\n },\n target: {\n id: targetId,\n parentId: $.bcTree.dropTarget.data.jstree.contentId,\n siteId: $.bcTree.dropTarget.data.jstree.contentSiteId,\n },\n listDisplayed: $.bcTree.listDisplayed,\n _csrfToken: $.bcToken.key,\n },\n dataType: 'json',\n beforeSend: function () {\n $.bcUtil.hideMessage();\n $.bcUtil.showLoader();\n },\n success: function (result) {\n node.data.jstree.contentFullUrl = result.url;\n $.bcTree.refreshTree(true);\n node.data.jstree.contentParentId = $.bcTree.dropTarget.data.jstree.contentId;\n $.bcUtil.showNoticeMessage(result.message);\n $.bcUtil.hideLoader();\n },\n error: function (XMLHttpRequest) {\n XMLHttpRequest.responseText = null;\n $.bcUtil.showAjaxError(bcI18n.commonSortSaveFailedMessage, XMLHttpRequest);\n $.bcTree.load();\n },\n complete: function () {\n }\n });\n }, {hideLoader: false});\n },\n\n /**\n * 外部よりメニューを表示する\n *\n * @param e\n * @returns {boolean}\n */\n showMenuByOuter: function (e) {\n $.bcTree.contextmenuAddOnly = true;\n var selected = $.bcTree.jsTree.get_selected();\n if (!selected.length) {\n $.bcTree.jsTree.select_node($.bcTree.jsTree.get_json());\n }\n $.bcTree.jsTree.show_contextmenu($.bcTree.jsTree.get_selected(), e.pageX, e.pageY);\n $.bcTree.contextmenuAddOnly = false;\n return false;\n },\n\n /**\n * Shift / Ctrl キーの押印状態を更新する\n *\n * @param e\n */\n updateShiftAndCtrlOnAnchor: function (e) {\n $.bcTree.shiftOnAnchor = e.shiftKey;\n $.bcTree.ctrlOnAnchor = (e.ctrlKey || e.metaKey);\n },\n\n changeDnDCursor: function () {\n $(\"#ContentsTreeList .jstree-wholerow\").css('cursor', 'move');\n $(\"#ContentsTreeList .jstree-anchor\").css('cursor', 'move');\n $(\"#ContentsTreeList .function\").css('cursor', 'move');\n $(\"#ContentsTreeList .jstree-ocl\").css('cursor', 'move');\n },\n\n changeNormalCursor: function () {\n $(\"#ContentsTreeList .jstree-wholerow\").css('cursor', 'pointer');\n $(\"#ContentsTreeList .jstree-anchor\").css('cursor', 'pointer');\n $(\"#ContentsTreeList .function\").css('cursor', 'pointer');\n $(\"#ContentsTreeList .jstree-ocl\").css('cursor', 'pointer');\n }\n\n };\n})(jQuery);\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n\n/**\n * サイドバーのコンテンツメニューを設定する\n */\nwindow.addEventListener('DOMContentLoaded', function () {\n\tvar componentId = 'AdminMenu';\n\tvar tmpl = document.querySelector('[data-js-tmpl=\"' + componentId + '\"]');\n\tvar dataStore = document.getElementById(componentId);\n\tvar data = null;\n\ttry {\n\t\tdata = JSON.parse(dataStore ? dataStore.textContent : '{}');\n\t} catch (error) {\n\t\tif (window.console) {\n\t\t\tconsole.warn('管理メニューのデータが破損しています(JSONデータが不正です)')\n\t\t}\n\t}\n\n\tif (tmpl && data && data.menuList && data.menuList.length) {\n\n\t\tvar contentList = [];\n\t\tvar systemList = [];\n\n\t\tdata.menuList.forEach(function (item, i) {\n\t\t\tif (item.type === 'system') {\n\t\t\t\t//item.menus = item.menus.filter(function (menu) { return menu.url !== item.url });\n\t\t\t\tsystemList.push(item);\n\t\t\t} else {\n\t\t\t\tcontentList.push(item);\n\t\t\t}\n\t\t});\n\n\t\t/**\n\t\t * for deubg\n\t\t */\n\t\t// console.log($.extend(true, {}, contentList));\n\t\t// console.log($.extend(true, {}, systemList));\n\n\t\ttmpl.hidden = false;\n\t\tvar isSystemSettingPage = systemList.some(function (item) { return (item.current || item.expanded); });\n\t\tvar app = new Vue({\n\t\t\tel: tmpl,\n\t\t\tdata: {\n\t\t\t\tsystemExpanded: isSystemSettingPage,\n\t\t\t\tbaseURL: $.baseUrl(),\n\t\t\t\tcurrentSiteId: data.currentSiteId,\n\t\t\t\tcontentList: contentList,\n\t\t\t\tisSystemSettingPage: isSystemSettingPage,\n\t\t\t\tsystemList: systemList,\n\t\t\t\tavailableVersions: null,\n\t\t\t\tuseUpdateNotice: data.useUpdateNotice\n\t\t\t},\n mounted() {\n if(!this.useUpdateNotice) return;\n $.get($.bcUtil.apiAdminBaseUrl + 'baser-core/plugins/get_available_core_version_info.json', function (response){\n if(response.availableCoreVersionInfo !== undefined) {\n app.availableVersions = response.availableCoreVersionInfo.versions.length;\n }\n });\n },\n\t\t\tmethods: {\n\t\t\t\topenSystem () {\n\t\t\t\t\tapp.systemExpanded = !app.systemExpanded;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t} else {\n\n\t\tif (window.console) {\n\t\t\tconsole.warn('データが空のため、管理メニューは表示されませんでした');\n\t\t}\n\n\t}\n\n});\n\n","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\nimport Cookies from 'js-cookie'\n\n(function ($) {\n $.bcUtil = {\n /**\n * hideMessage() を無効にする\n */\n disabledHideMessage: false,\n\n\n /**\n * ベースとなるURL\n */\n baseUrl: null,\n\n /**\n * BaserCoreプレフィックス\n */\n baserCorePrefix: null,\n\n /**\n * 管理画面用URLプレフィックス\n */\n adminPrefix: null,\n\n /**\n * 管理画面用のベースURL\n */\n adminBaseUrl: null,\n\n /**\n * API用のベースURL\n */\n apiBaseUrl: null,\n\n /**\n * 管理画面用APIのベースURL\n */\n apiAdminBaseUrl: null,\n\n /**\n * Ajaxローダーのパス\n */\n ajaxLoaderPath: null,\n\n /**\n * Ajaxローダー(小)のパス\n */\n ajaxLoaderSmallPath: null,\n\n /**\n * 初期化\n *\n * @param config\n */\n init: function (config) {\n if(config === undefined) config = {};\n var adminScript = $(\"#AdminScript\");\n $.bcUtil.baseUrl = adminScript.attr('data-baseUrl');\n $.bcUtil.baserCorePrefix = adminScript.attr('data-baserCorePrefix');\n $.bcUtil.adminPrefix = adminScript.attr('data-adminPrefix');\n $.bcUtil.ajaxLoaderPath = adminScript.attr('data-ajaxLoaderPath');\n $.bcUtil.ajaxLoaderSmallPath = adminScript.attr('data-ajaxLoaderSmallPath');\n $.bcUtil.frontFullUrl = adminScript.attr('data-frontFullUrl');\n if (config.baseUrl !== undefined) {\n $.bcUtil.baseUrl = config.baseUrl;\n }\n if (config.baserCorePrefix !== undefined) {\n $.bcUtil.baserCorePrefix = config.baserCorePrefix;\n }\n if (config.adminPrefix !== undefined) {\n $.bcUtil.adminPrefix = config.adminPrefix;\n }\n if (config.ajaxLoaderPath !== undefined) {\n $.bcUtil.ajaxLoaderPath = config.ajaxLoaderPath;\n }\n if (config.ajaxLoaderSmallPath !== undefined) {\n $.bcUtil.ajaxLoaderSmallPath = config.ajaxLoaderSmallPath;\n }\n $.bcUtil.adminBaseUrl = $.bcUtil.baseUrl + '/' + $.bcUtil.baserCorePrefix + '/' + $.bcUtil.adminPrefix + '/';\n $.bcUtil.apiBaseUrl = $.bcUtil.baseUrl + '/' + $.bcUtil.baserCorePrefix + '/api/';\n $.bcUtil.apiAdminBaseUrl = $.bcUtil.baseUrl + '/' + $.bcUtil.baserCorePrefix + '/api/admin/';\n this.setUpTextCounter();\n },\n\n /**\n * アラートメッセージを表示\n *\n * @param message\n */\n showAlertMessage: function (message) {\n $.bcUtil.hideMessage();\n $(\"#BcSystemMessage\")\n .removeClass('notice-messge alert-message')\n .addClass('alert-message')\n .html(message);\n $(\"#BcMessageBox\").fadeIn(500);\n },\n\n /**\n * ノーティスメッセージを表示\n *\n * @param message\n */\n showNoticeMessage: function (message) {\n $.bcUtil.hideMessage();\n $(\"#BcSystemMessage\")\n .removeClass('notice-messge alert-message')\n .addClass('notice-message')\n .html(message);\n $(\"#BcMessageBox\").fadeIn(500);\n },\n\n /**\n * メッセージを隠す\n */\n hideMessage: function () {\n if (!$.bcUtil.disabledHideMessage) {\n $(\"#BcMessageBox\").fadeOut(200);\n $(\"#AlertMessage\").fadeOut(200);\n $(\"#MessageBox\").fadeOut(200);\n }\n },\n\n /**\n * ローダーを表示\n */\n showLoader: function (type, selector, key) {\n if (type == undefined || (type != 'none' && selector == undefined)) {\n type = 'over';\n }\n switch (type) {\n case 'over':\n $(\"#Waiting\").show();\n break;\n case 'inner':\n var div = $('
').css({'text-align': 'center'}).attr('id', key);\n var img = $('').attr('src', $.bcUtil.ajaxLoaderPath);\n div.html(img);\n $(selector).html(div);\n break;\n case 'after':\n var img = $('').attr('src', $.bcUtil.ajaxLoaderSmallPath).attr('id', key).css({\n 'width':'16px',\n 'vertical-align': 'middle',\n 'margin':'5px'\n });\n $(selector).after(img);\n break;\n case 'target':\n $(selector).show();\n break;\n case 'none':\n break;\n }\n },\n\n /**\n * ローダーを隠す\n */\n hideLoader: function (type, selector, key) {\n if (type == undefined || (type != 'none' && selector == undefined)) {\n type = 'over';\n }\n switch (type) {\n case 'over':\n $(\"#Waiting\").hide();\n break;\n case 'inner':\n $(\"#\" + key).remove();\n break;\n case 'after':\n $(\"#\" + key).remove();\n break;\n case 'target':\n $(selector).show();\n break;\n case 'none':\n break;\n }\n },\n\n /**\n * Ajax\n */\n ajax: function (url, success, config) {\n if (!config) {\n config = {};\n }\n var loaderType, loaderSelector, loaderKey;\n var hideLoader = true;\n if (typeof config.loaderType !== 'undefined') {\n loaderType = config.loaderType;\n delete config.loaderType;\n }\n if (typeof config.loaderSelector !== 'undefined') {\n loaderSelector = config.loaderSelector;\n delete config.loaderSelector;\n loaderKey = loaderSelector.replace(/\\./g, '').replace(/#/g, '').replace(/\\s/g, '') + 'loaderkey';\n }\n if (typeof config.hideLoader !== 'undefined') {\n hideLoader = config.hideLoader;\n delete config.loaderType;\n }\n var ajaxConfig = {\n url: url,\n type: 'POST',\n dataType: 'html',\n beforeSend: function () {\n $.bcUtil.showLoader(loaderType, loaderSelector, loaderKey);\n },\n complete: function () {\n if (hideLoader) {\n $.bcUtil.hideLoader(loaderType, loaderSelector, loaderKey);\n }\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n $.bcUtil.showAjaxError(bcI18n.commonExecFailedMessage, XMLHttpRequest, errorThrown);\n },\n success: success\n };\n if (config) {\n $.extend(ajaxConfig, config);\n }\n return $.ajax(ajaxConfig);\n },\n\n /**\n * Ajax のエラーメッセージを表示\n *\n * @param XMLHttpRequest\n * @param errorThrown\n * @param message\n */\n showAjaxError: function (message, XMLHttpRequest, errorThrown) {\n var errorMessage = '';\n if (XMLHttpRequest !== undefined && XMLHttpRequest.status) {\n errorMessage = '
(' + XMLHttpRequest.status + ') ';\n }\n if(XMLHttpRequest !== undefined && XMLHttpRequest.responseJSON){\n errorMessage += XMLHttpRequest.responseJSON.message;\n }\n if (XMLHttpRequest !== undefined && XMLHttpRequest.responseText) {\n errorMessage += '
' + XMLHttpRequest.responseText;\n } else if (errorThrown !== undefined) {\n errorMessage += '
' + errorThrown;\n }\n $.bcUtil.showAlertMessage(message + errorMessage);\n },\n\n /**\n * フラッシュメッセージをセットする\n *\n * 一度しか表示できないメッセージ\n * @param message\n */\n setFlashMessage: function(message) {\n Cookies.set('bcFlashMessage', message);\n },\n\n /**\n * フラッシュメッセージを表示する\n *\n * 一度表示したら削除する\n */\n showFlashMessage: function () {\n let message = Cookies.get('bcFlashMessage');\n if(message !== undefined) {\n this.showNoticeMessage(message);\n Cookies.remove('bcFlashMessage')\n }\n },\n\n /**\n * ツールチップを初期化する\n *\n * @param config\n */\n initTooltip: function(config) {\n let btConfig = {\n target: '.bca-help',\n content: '.bca-helptext'\n };\n if(config !== undefined) {\n $.extend(btConfig, config);\n }\n let $help = $(btConfig.target);\n if ($help.bt) {\n $(btConfig.content).css('display', 'none');\n $.bt.options.closeWhenOthersOpen = true;\n $help.bt({\n trigger: 'click',\n positions: 'top',\n shadow: true,\n shadowOffsetX: 1,\n shadowOffsetY: 1,\n shadowBlur: 8,\n shadowColor: 'rgba(101,101,101,.6)',\n shadowOverlap: false,\n noShadowOpts: {\n strokeStyle: '#999',\n strokeWidth: 1\n },\n width: '600px',\n /*shrinkToFit: true,*/\n spikeLength: 12,\n spikeGirth: 18,\n padding: 20,\n cornerRadius: 0,\n strokeWidth: 1, /*no stroke*/\n strokeStyle: '#656565',\n fill: 'rgba(255, 255, 255, 1.00)',\n cssStyles: {\n fontSize: '14px'\n },\n showTip: function (box) {\n $(box).fadeIn(200);\n },\n hideTip: function (box, callback) {\n $(box).animate({\n opacity: 0\n }, 100, callback);\n },\n contentSelector: `$(this).next('${btConfig.content}').html()`\n });\n }\n },\n\n /**\n * テキストカウンターをセットアップする\n */\n setUpTextCounter(selector) {\n if(selector === undefined) {\n selector = \".bca-text-counter\";\n }\n const $textCounter = $(selector);\n $textCounter.after('');\n $textCounter.keyup(function (){\n var len = $(this).val().length;\n var maxlen = $(this).attr('maxlength');\n if(!maxlen || maxlen === -1){\n maxlen = '-';\n }\n $(this).next().html(len+' /'+maxlen+'');\n });\n $textCounter.keyup();\n },\n\n };\n})(jQuery);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.j = 3207;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t3207: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkbc_admin_third\"] = self[\"webpackChunkbc_admin_third\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [5000], () => (__webpack_require__(2670)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","$","baseUrl","attr","jQuery","changeRow","checkbox","undefined","parent","addClass","removeClass","toolChangeHandler","config","bcBatch","methodSelect","val","executeButton","removeAttr","prop","batchUrl","listTable","checkAll","targetCheckbox","alertBox","loader","flashBox","init","extend","this","initList","unbind","click","length","alert","bcI18n","commonSelectDataFailedMessage","confirm","batchConfirmMessage","form","append","clone","each","value","bcToken","check","key","ajax","url","type","data","serialize","dataType","beforeSend","bcUtil","hideMessage","showLoader","success","result","setFlashMessage","message","location","reload","error","XMLHttpRequest","textStatus","errorThrown","errorMessage","status","commonNotFoundProgramMessage","responseText","JSON","parse","remove","showAlertMessage","commonBatchExecFailedMessage","hideLoader","useUpdate","change","find","e","stopPropagation","initRowSelected","bcCkeditor","editor","initStatus","styleInitStatus","show","setUpConfig","CKEDITOR","addStylesSet","initialStyle","editorStyle","map","themeEditorCsses","css","Array","isArray","contentsCss","push","ckeditorField","replace","editorDomId","editorOptions","setUpDraft","setUpToolBar","allowedContent","extraPlugins","stylesCombo_stylesSet","editorStylesSet","protectedSource","dtd","$removeEmpty","editorUrl","templates_files","editorEnterBr","enterMode","ENTER_BR","editorUseDraft","on","draftAreaId","draftDraftAreaId","publishAreaId","draftPublishAreaId","editorReadonlyPublish","draftReadOnlyPublish","editorDisableDraft","execCommand","editorDisablePublish","name","previewModeId","getCommand","uiItems","state","hide","bcConfirm","title","bcConfirmTitle1","bcConfirmAlertMessage1","defaultCancel","ok","html","dialog","modal","width","buttons","bcConfirmAlertMessage2","bcCredit","adminBaseUrl","hideTarget","isLogin","$html","$page","$credit","openedFavorite","prepend","$creditScroller","fadeIn","fadeOut","setViewSize","window","resize","resizeScroll","height","posX","id","setInterval","clearInterval","clearTimeout","event","cancelBubble","$toolBar","outerHeight","$body","bcJwt","accessToken","refreshToken","localStorage","getItem","getToken","login","email","password","saved","successCallback","errorCallback","apiAdminBaseUrl","done","response","setToken","access_token","refresh_token","bind","fail","async","headers","setItem","logout","removeToken","bcSortable","updateSortUrl","sortHandle","sortTable","sortable","sortableOptions","scroll","items","opacity","zIndex","containment","tolerance","distance","cursor","handle","placeholder","revert","start","sortStartHandler","update","sortUpdateHandler","ui","item","target","offset","index","sortId","sortOffset","getHiddenToken","i","v","complete","bcTimeUtil","getNowDateTime","getNowDate","getNowTime","date","Date","year","getFullYear","month","getMonth","day","getDate","hour","getHours","minute","getMinutes","requested","requesting","defaultUrl","setTokenUrl","callback","timer","execCallback","_config","loaderType","always","getForm","options","fields","unlocked","debug","submitToken","submit","replaceLinkToSubmitToken","selector","match","get","onclick","postLinkForm","bcTree","shiftOnAnchor","ctrlOnAnchor","contextmenuAddOnly","settings","dropTarget","dragTarget","treeDom","jsTree","listDisplayed","beforeParentId","beforePosition","currentSiteId","isAdmin","isUseMoveContents","adminPrefix","editInIndexDisabled","_inited","load","_init","trigger","parseJSON","createTree","jstree","old_parent","old_position","updateShiftAndCtrlOnAnchor","nodeId","closest","get_node","alias","contentType","editDisabled","openUrl","contentId","createLink","baserCorePrefix","contentParentId","contentEntityId","isAliasMenuByLabel","trim","text","after","isAddMenuByLabel","refreshTree","destroy","operation","node","node_parent","node_position","more","contentSiteRoot","mode","get_parent","manageDisabled","editUrl","manageUrl","copyUrl","isEnabled","deleteLabel","menu","contentFullUrl","label","bcTreeCheck","obj","related","bcTreeUnpublish","siteId","contentSiteId","_csrfToken","showAjaxError","commonChangePublishFailedMessage","bcTreePublish","bcTreeManage","bcTreeRename","renameContent","bcTreeEdit","bcTreeCopy","copyContent","bcTreeDelete","bcTreeToTrash","deleteDisabled","bcTreeConfirmToTrash","bcTreeConfirmDeleteAlias","deleteContent","_disabled","bcTreeUndo","contentAliasId","exists","returnContent","bcTreeAlertMessage1","bcTreeEmptyTrash","bcTreeConfirmMessage1","empty","nodes","delete_node","showNoticeMessage","bcTreeInfoMessage1","bcTreeAlertMessage2","Default","ContentAlias","addMenu","counter","maxContents","addDisabled","createMenu","get_selected","multiple","disableCheck","treeData","get_json","flat","sort","decodeURIComponent","deselect_all","select_node","show_contextmenu","pageX","pageY","forceBlank","open","href","setting","current","iconAdd","iconMenu","contentTitle","bcTreeNewTitle","sprintf","contentPlugin","plugin","icon","separatorBefore","separatorAfter","bcTreeAliasTitle","separator_before","separator_after","action","createContent","_data","bcTreeUnNamedTitle","create_node","edit","editNode","content","parent_id","site_id","alias_id","entity_id","fillExtraData","bcTreeAlertMessage6","then","decodeURI","fullUrl","postData","settingData","extra","folder_template","page_template","contents","draft","code","encodeURI","param","bcTreeAlertMessage4","content_id","newNode","commonCopyFailedMessage","defaultTitle","first","oldTitle","newTitle","rename_node","bcTreeAlertMessage5","base","orderContent","changeNormalCursor","cancel","element","oldSort","commonSortSaveConfirmMessage","move_node","open_node","nextNode","get_next_dom","targetId","origin","parentId","entityId","commonSortSaveFailedMessage","showMenuByOuter","shiftKey","ctrlKey","metaKey","changeDnDCursor","addEventListener","componentId","tmpl","document","querySelector","dataStore","getElementById","textContent","console","warn","menuList","contentList","systemList","forEach","hidden","isSystemSettingPage","some","expanded","app","Vue","el","systemExpanded","baseURL","availableVersions","useUpdateNotice","mounted","availableCoreVersionInfo","versions","methods","openSystem","disabledHideMessage","apiBaseUrl","ajaxLoaderPath","ajaxLoaderSmallPath","adminScript","frontFullUrl","setUpTextCounter","div","img","loaderSelector","loaderKey","ajaxConfig","commonExecFailedMessage","responseJSON","Cookies","showFlashMessage","initTooltip","btConfig","$help","bt","closeWhenOthersOpen","positions","shadow","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOverlap","noShadowOpts","strokeStyle","strokeWidth","spikeLength","spikeGirth","padding","cornerRadius","fill","cssStyles","fontSize","showTip","box","hideTip","animate","contentSelector","$textCounter","keyup","len","maxlen","next","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","splice","r","d","definition","o","defineProperty","enumerable","g","globalThis","Function","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js b/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js index 8171d21556..8b909dae7b 100644 --- a/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js +++ b/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js @@ -7,5 +7,5 @@ * @since 5.0.0 * @license https://basercms.net/license/index.html MIT License */ -$((function(){$("#BtnSave").click((function(){$.bcUtil.showLoader()})),$("input[name='permission_group_type']").click(o);var i=$("select#permission-group-id").val();function o(){$("select#permission-group-id").val(""),$("select#permission-group-id option").each((function(){""!==$(this).val()&&$(this).remove()}));var i=$("input[name='permission_group_type']:checked").val();JSON.parse($("#permission-group").val()).forEach((function(o){o.type===i&&$("#permission-group-id").append('"))}))}o(),i&&$("select#permission-group-id").val(i)})); +$((function(){$("#BtnSave").click((function(){$.bcUtil.showLoader()})),$("input[name='permission_group_type']").click(i);var e=$("select#permission-group-id").val();function i(){$("select#permission-group-id").val(""),$("select#permission-group-id option").each((function(){""!==$(this).val()&&$(this).remove()}));var e=$("input[name='permission_group_type']:checked").val();JSON.parse($("#permission-group").val()).forEach((function(i){i.type===e&&(name=i.name.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),$("#permission-group-id").append('")))}))}i(),e&&$("select#permission-group-id").val(e)})); //# sourceMappingURL=form.bundle.js.map \ No newline at end of file diff --git a/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js.map b/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js.map index d730f61e78..83e10ec41f 100644 --- a/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js.map +++ b/plugins/bc-admin-third/webroot/js/admin/permissions/form.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"js/admin/permissions/form.bundle.js","mappings":";;;;;;;;;AAWAA,GAAE,WACEA,EAAE,YAAYC,OAAM,WAChBD,EAAEE,OAAOC,YACb,IAEAH,EAAE,uCAAuCC,MAAMG,GAE/C,IAAIC,EAAoBL,EAAE,8BAA8BM,MAMxD,SAASF,IACLJ,EAAE,8BAA8BM,IAAI,IACpCN,EAAE,qCAAqCO,MAAK,WAClB,KAAlBP,EAAEQ,MAAMF,OACRN,EAAEQ,MAAMC,QAEhB,IAEA,IAAMC,EAAOV,EAAE,+CAA+CM,MACvCK,KAAKC,MAAMZ,EAAE,qBAAqBM,OACxCO,SAAQ,SAAAC,GACjBA,EAAgBJ,OAASA,GACzBV,EAAE,wBAAwBe,OAAO,kBAAD,OAAmBD,EAAgBE,GAAE,aAAKF,EAAgBG,KAAI,aAEtG,GACJ,CApBAb,IACIC,GACAL,EAAE,8BAA8BM,IAAID,EAoB5C","sources":["webpack://bc-admin-third/./src/js/admin/permissions/form.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n\n$(function () {\n $(\"#BtnSave\").click(function () {\n $.bcUtil.showLoader();\n });\n\n $(\"input[name='permission_group_type']\").click(updatePermissionGroupId);\n\n let permissionGroupId = $('select#permission-group-id').val();\n updatePermissionGroupId();\n if (permissionGroupId) {\n $('select#permission-group-id').val(permissionGroupId);\n }\n\n function updatePermissionGroupId() {\n $('select#permission-group-id').val('');\n $('select#permission-group-id option').each(function () {\n if ($(this).val() !== '') {\n $(this).remove();\n }\n });\n\n const type = $(\"input[name='permission_group_type']:checked\").val();\n let permissionGroups = JSON.parse($(\"#permission-group\").val());\n permissionGroups.forEach(permissionGroup => {\n if (permissionGroup.type === type) {\n $(\"#permission-group-id\").append(``)\n }\n });\n }\n\n});\n"],"names":["$","click","bcUtil","showLoader","updatePermissionGroupId","permissionGroupId","val","each","this","remove","type","JSON","parse","forEach","permissionGroup","append","id","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"js/admin/permissions/form.bundle.js","mappings":";;;;;;;;;AAWAA,GAAE,WACEA,EAAE,YAAYC,OAAM,WAChBD,EAAEE,OAAOC,YACb,IAEAH,EAAE,uCAAuCC,MAAMG,GAE/C,IAAIC,EAAoBL,EAAE,8BAA8BM,MAMxD,SAASF,IACLJ,EAAE,8BAA8BM,IAAI,IACpCN,EAAE,qCAAqCO,MAAK,WAClB,KAAlBP,EAAEQ,MAAMF,OACRN,EAAEQ,MAAMC,QAEhB,IAEA,IAAMC,EAAOV,EAAE,+CAA+CM,MACvCK,KAAKC,MAAMZ,EAAE,qBAAqBM,OACxCO,SAAQ,SAAAC,GACjBA,EAAgBJ,OAASA,IACzBK,KAAOD,EAAgBC,KAClBC,QAAQ,KAAM,SACdA,QAAQ,KAAM,UACdA,QAAQ,KAAM,UACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACnBhB,EAAE,wBAAwBiB,OAAO,kBAAD,OAAmBH,EAAgBI,GAAE,aAAKH,KAAI,cAEtF,GACJ,CA1BAX,IACIC,GACAL,EAAE,8BAA8BM,IAAID,EA0B5C","sources":["webpack://bc-admin-third/./src/js/admin/permissions/form.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n\n$(function () {\n $(\"#BtnSave\").click(function () {\n $.bcUtil.showLoader();\n });\n\n $(\"input[name='permission_group_type']\").click(updatePermissionGroupId);\n\n let permissionGroupId = $('select#permission-group-id').val();\n updatePermissionGroupId();\n if (permissionGroupId) {\n $('select#permission-group-id').val(permissionGroupId);\n }\n\n function updatePermissionGroupId() {\n $('select#permission-group-id').val('');\n $('select#permission-group-id option').each(function () {\n if ($(this).val() !== '') {\n $(this).remove();\n }\n });\n\n const type = $(\"input[name='permission_group_type']:checked\").val();\n let permissionGroups = JSON.parse($(\"#permission-group\").val());\n permissionGroups.forEach(permissionGroup => {\n if (permissionGroup.type === type) {\n name = permissionGroup.name\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(//g, '>');\n $(\"#permission-group-id\").append(``)\n }\n });\n }\n\n});\n"],"names":["$","click","bcUtil","showLoader","updatePermissionGroupId","permissionGroupId","val","each","this","remove","type","JSON","parse","forEach","permissionGroup","name","replace","append","id"],"sourceRoot":""} \ No newline at end of file From 6dd51c1c4a4a5a58e396037893fb949b00928dc6 Mon Sep 17 00:00:00 2001 From: ryuring Date: Wed, 25 Oct 2023 19:50:47 +0900 Subject: [PATCH 2/5] =?UTF-8?q?BcAppController=20=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/Admin/BcAdminAppController.php | 4 +- .../src/Controller/AppController.php | 83 ++++-- .../src/Controller/BcAppController.php | 252 ------------------ .../src/Controller/PagesController.php | 1 - plugins/baser-core/src/Model/Entity/User.php | 16 ++ plugins/baser-core/src/Service/AppService.php | 12 +- .../TestCase/Controller/AppControllerTest.php | 39 +++ .../Controller/BcAppControllerTest.php | 106 -------- .../BcFrontContentsComponentTest.php | 2 +- .../CustomContentFrontAppController.php | 4 +- 10 files changed, 130 insertions(+), 389 deletions(-) delete mode 100644 plugins/baser-core/src/Controller/BcAppController.php delete mode 100644 plugins/baser-core/tests/TestCase/Controller/BcAppControllerTest.php diff --git a/plugins/baser-core/src/Controller/Admin/BcAdminAppController.php b/plugins/baser-core/src/Controller/Admin/BcAdminAppController.php index e9aefeba3d..80aa39c9d0 100644 --- a/plugins/baser-core/src/Controller/Admin/BcAdminAppController.php +++ b/plugins/baser-core/src/Controller/Admin/BcAdminAppController.php @@ -12,7 +12,7 @@ namespace BaserCore\Controller\Admin; use Authentication\Controller\Component\AuthenticationComponent; -use BaserCore\Controller\BcAppController; +use BaserCore\Controller\AppController; use BaserCore\Service\Admin\BcAdminAppServiceInterface; use BaserCore\Service\SiteConfigsService; use BaserCore\Service\SiteConfigsServiceInterface; @@ -34,7 +34,7 @@ * Class BcAdminAppController * @property AuthenticationComponent $Authentication */ -class BcAdminAppController extends BcAppController +class BcAdminAppController extends AppController { /** diff --git a/plugins/baser-core/src/Controller/AppController.php b/plugins/baser-core/src/Controller/AppController.php index cec02db8f7..dde852c2af 100644 --- a/plugins/baser-core/src/Controller/AppController.php +++ b/plugins/baser-core/src/Controller/AppController.php @@ -20,6 +20,7 @@ use BaserCore\Annotation\Checked; use BaserCore\Annotation\Note; use BaserCore\Service\AppServiceInterface; +use BaserCore\Service\DblogsServiceInterface; use BaserCore\Service\PermissionsServiceInterface; use BaserCore\Utility\BcContainerTrait; use BaserCore\Utility\BcSiteConfig; @@ -37,6 +38,7 @@ use Cake\Http\ServerRequest; use Cake\Utility\Hash; use Cake\Utility\Inflector; +use Psr\Http\Message\ResponseInterface; /** * Class AppController @@ -54,22 +56,23 @@ class AppController extends BaseController use BcContainerTrait; /** - * BcAppController constructor. + * AppController constructor. * @param ServerRequest|null $request * @param Response|null $response * @param string|null $name * @param EventManagerInterface|null $eventManager * @param ComponentRegistry|null $components + * @return void|ResponseInterface * @checked * @noTodo * @unitTest */ public function __construct( - ?ServerRequest $request = null, - ?Response $response = null, - ?string $name = null, + ?ServerRequest $request = null, + ?Response $response = null, + ?string $name = null, ?EventManagerInterface $eventManager = null, - ?ComponentRegistry $components = null + ?ComponentRegistry $components = null ) { parent::__construct($request, $response, $name, $eventManager, $components); @@ -82,10 +85,10 @@ public function __construct( if (!($request? $request->is('install') : false)) { // app_local.php が存在しない場合は、CakePHPの Internal Server のエラー画面が出て、 // 原因がわからなくなるので強制的にコピーする - if($this->getName() === 'BcError' && !file_exists(CONFIG . 'app_local.php')) { + if ($this->getName() === 'BcError' && !file_exists(CONFIG . 'app_local.php')) { copy(CONFIG . 'app_local.example.php', CONFIG . 'app_local.php'); // app_local.php が存在しない場合、.env もない可能性があるので確認 - if(!file_exists(CONFIG . '.env')){ + if (!file_exists(CONFIG . '.env')) { copy(CONFIG . '.env.example', CONFIG . '.env'); } } @@ -105,7 +108,6 @@ public function __construct( } } } - } /** @@ -137,13 +139,13 @@ public function initialize(): void public function beforeFilter(EventInterface $event) { $response = parent::beforeFilter($event); - if($response) return $response; + if ($response) return $response; - // index.php をつけたURLの場合、base の値が正常でなくなり、 - // 内部リンクが影響を受けておかしくなってしまうため強制的に Not Found とする - if(preg_match('/\/index\.php\//', $this->getRequest()->getAttribute('base'))) { - $this->notFound(); - } + // index.php をつけたURLの場合、base の値が正常でなくなり、 + // 内部リンクが影響を受けておかしくなってしまうため強制的に Not Found とする + if (preg_match('/\/index\.php\//', $this->getRequest()->getAttribute('base'))) { + $this->notFound(); + } if (!$this->getRequest()->is('requestview')) return; @@ -160,13 +162,13 @@ public function beforeFilter(EventInterface $event) return; } - if(!$this->checkPermission()) { + if (!$this->checkPermission()) { $prefix = BcUtil::getRequestPrefix($this->getRequest()); if ($prefix === 'Api/Admin') { throw new ForbiddenException(__d('baser_core', '指定されたAPIエンドポイントへのアクセスは許可されていません。')); } else { if (BcUtil::loginUser()) { - if($this->getRequest()->getMethod() === 'GET') { + if ($this->getRequest()->getMethod() === 'GET') { $this->BcMessage->setError(__d('baser_core', '指定されたページへのアクセスは許可されていません。')); } else { $this->BcMessage->setError(__d('baser_core', '実行した操作は許可されていません。')); @@ -174,7 +176,7 @@ public function beforeFilter(EventInterface $event) } // リファラが存在する場合はリファラにリダイレクトする // $this->referer() で判定した場合、リファラがなくてもトップのURLが返却されるため ServerRequest で判定 - if($this->getRequest()->getEnv('HTTP_REFERER')) { + if ($this->getRequest()->getEnv('HTTP_REFERER')) { $url = $this->referer(); } else { $url = Configure::read("BcPrefixAuth.{$prefix}.loginRedirect"); @@ -200,7 +202,7 @@ public function beforeFilter(EventInterface $event) private function checkPermission() { $user = BcUtil::loginUser(); - if($user && $user->user_groups) { + if ($user && $user->user_groups) { $userGroupsIds = Hash::extract($user->toArray()['user_groups'], '{n}.id'); } else { $userGroupsIds = []; @@ -292,8 +294,8 @@ protected function _autoConvertEncodingByArray($data, $outenc = 'UTF-8'): array continue; } $inenc = mb_detect_encoding((string)$value); - if(!$inenc) continue; - if(!in_array($inenc, Configure::read('BcEncode.detectOrder'))) continue; + if (!$inenc) continue; + if (!in_array($inenc, Configure::read('BcEncode.detectOrder'))) continue; if ($inenc === $outenc) continue; // 半角カナは一旦全角に変換する $value = mb_convert_kana($value, 'KV', $inenc); @@ -533,4 +535,45 @@ public function notFound() throw new NotFoundException(__d('baser_core', '見つかりませんでした。')); } + /** + * データベースログを記録する + * + * @param string $message + * @return \Cake\Datasource\EntityInterface + * @checked + * @unitTest + * @noTodo + */ + protected function saveDblog($message) + { + $dblogsService = $this->getService(DblogsServiceInterface::class); + return $dblogsService->create(['message' => $message]); + } + + /** + * Ajax用のエラーを出力する + * + * @param int $errorNo エラーのステータスコード + * @param mixed $message エラーメッセージ + * @return void + * @deprecated since 5.0.5 このメソッドは非推奨です。 + * @checked + * @noTodo + */ + public function ajaxError(int $errorNo = 500, $message = '') + { + $this->response = $this->getResponse()->withStatus($errorNo); + if (!$message) return; + if (!is_array($message)) $message = [$message]; + $aryMessage = []; + foreach($message as $value) { + if (is_array($value)) { + $aryMessage[] = implode('
', $value); + } else { + $aryMessage[] = $value; + } + } + echo implode('
', $aryMessage); + } + } diff --git a/plugins/baser-core/src/Controller/BcAppController.php b/plugins/baser-core/src/Controller/BcAppController.php deleted file mode 100644 index 36159dc980..0000000000 --- a/plugins/baser-core/src/Controller/BcAppController.php +++ /dev/null @@ -1,252 +0,0 @@ - - * Copyright (c) NPO baser foundation - * - * @copyright Copyright (c) NPO baser foundation - * @link https://basercms.net baserCMS Project - * @since 5.0.0 - * @license https://basercms.net/license/index.html MIT License - */ - -namespace BaserCore\Controller; - -use BaserCore\Utility\BcContainerTrait; -use Cake\Event\EventInterface; -use BaserCore\Utility\BcUtil; -use BaserCore\Service\DblogsServiceInterface; -use Cake\Core\Configure; -use BaserCore\Annotation\UnitTest; -use BaserCore\Annotation\NoTodo; -use BaserCore\Annotation\Checked; -use BaserCore\Annotation\Note; - -/** - * Class BcAppController - */ -class BcAppController extends AppController -{ - - /** - * Trait - */ - use BcContainerTrait; - - /** - * サブディレクトリ - * - * @var string - * @access public - */ - public $subDir = null; - - /** - * コンテンツタイトル - * - * @var string - */ - public $contentsTitle = ''; - - /** - * プレビューフラグ - * - * @var bool - */ - public $preview = false; - - /** - * 管理画面テーマ - * - * @var string - */ - public $adminTheme = null; - - /** - * サイトデータ - * - * @var array - */ - public $site = []; - - /** - * コンテンツデータ - * - * @var array - */ - public $content = []; - - /** - * beforeFilter - * - * @checked - * @note(value="マイルストーン2が終わってから確認する") - * @todo ucmitz 未確認 - */ - public function beforeFilter(EventInterface $event) - { - return parent::beforeFilter($event); - - // 認証設定 - if (isset($this->BcAuthConfigure)) { - $authConfig = []; - if (!empty($this->request->getParam('prefix'))) { - $currentAuthPrefix = $this->request->getParam('prefix'); - } else { - $currentAuthPrefix = 'front'; - } - $authPrefixSettings = Configure::read('BcPrefixAuth'); - foreach($authPrefixSettings as $key => $authPrefixSetting) { - if (isset($authPrefixSetting['alias']) && $authPrefixSetting['alias'] == $currentAuthPrefix) { - $authConfig = $authPrefixSetting; - $authConfig['auth_prefix'] = $authPrefixSetting['alias']; - break; - } - if ($this->request->getParam('action') !== 'back_agent') { - if ($key == $currentAuthPrefix) { - $authConfig = $authPrefixSetting; - $authConfig['auth_prefix'] = $key; - break; - } - } - } - if ($authConfig) { - $this->BcAuthConfigure->setting($authConfig); - } else { - $this->BcAuth->setSessionKey('Auth.' . Configure::read('BcPrefixAuth.Admin.sessionKey')); - } - - // ================================================================= - // ユーザーの存在チェック - // ログイン中のユーザーを管理側で削除した場合、ログイン状態を削除する必要がある為 - // ================================================================= - $user = $this->BcAuth->user(); - if ($user && $authConfig && (empty($authConfig['type']) || $authConfig['type'] === 'Form')) { - $userModel = $authConfig['userModel']; - $User = ClassRegistry::init($userModel); - if (strpos($userModel, '.') !== false) { - [$plugin, $userModel] = explode('.', $userModel); - } - if ($userModel && !empty($this->{$userModel})) { - $nameField = 'name'; - if (!empty($authConfig['username'])) { - $nameField = $authConfig['username']; - } - $conditions = [ - $userModel . '.id' => $user['id'], - $userModel . '.' . $nameField => $user[$nameField] - ]; - if (isset($User->belongsTo['UserGroup'])) { - $UserGroup = ClassRegistry::init('UserGroup'); - $userGroups = $UserGroup->find('all', ['conditions' => ['UserGroup.auth_prefix LIKE' => '%' . $authConfig['auth_prefix'] . '%'], 'recursive' => -1]); - $userGroupIds = Hash::extract($userGroups, '{n}.UserGroup.id'); - $conditions[$userModel . '.user_group_id'] = $userGroupIds; - } - if (!$User->find('count', [ - 'conditions' => $conditions, - 'recursive' => -1])) { - $this->Session->delete(BcAuthComponent::$sessionKey); - } - } - } - } - - } - - /** - * beforeRender - * - * @return void - */ - public function beforeRender(EventInterface $event): void - { - parent::beforeRender($event); - // TODO ucmitz 未確認 - return; - $this->__loadDataToView(); - } - - /** - * View用のデータを読み込む。 - * beforeRenderで呼び出される - * - * @return void - */ - private function __loadDataToView() - { - $this->set('preview', $this->preview); - - if (!empty($this->request->getParam('prefix'))) { - $currentPrefix = $this->request->getParam('prefix'); - } else { - $currentPrefix = 'front'; - } - - $user = BcUtil::loginUser(); - $sessionKey = Configure::read('BcPrefixAuth.Admin.sessionKey'); - - $authPrefix = Configure::read('BcPrefixAuth.' . $currentPrefix); - if ($authPrefix) { - $currentPrefixUser = BcUtil::loginUser($currentPrefix); - if ($currentPrefixUser) { - $user = $currentPrefixUser; - $sessionKey = BcUtil::getLoginUserSessionKey(); - } - } - - /* ログインユーザー */ - if (BcUtil::isInstalled() && $user && $this->name !== 'Installations' && !Configure::read('BcRequest.isUpdater') && !Configure::read('BcRequest.isMaintenance') && $this->name !== 'CakeError') { - $this->set('user', $user); - } - - $currentUserAuthPrefixes = []; - if ($this->Session->check('Auth.' . $sessionKey . '.UserGroup.auth_prefix')) { - $currentUserAuthPrefixes = explode(',', $this->Session->read('Auth.' . $sessionKey . '.UserGroup.auth_prefix')); - } - $this->set('currentUserAuthPrefixes', $currentUserAuthPrefixes); - } - - /** - * Ajax用のエラーを出力する - * - * @param int $errorNo エラーのステータスコード - * @param mixed $message エラーメッセージ - * @return void - */ - public function ajaxError($errorNo = 500, $message = '') - { - $this->response = $this->response->withStatus($errorNo); - if (!$message) { - return; - } - - if (!is_array($message)) { - return; - } - - $aryMessage = []; - foreach($message as $value) { - if (is_array($value)) { - $aryMessage[] = implode('
', $value); - } else { - $aryMessage[] = $value; - } - } - echo implode('
', $aryMessage); - return; - } - - /** - * データベースログを記録する - * - * @param string $message - * @return \Cake\Datasource\EntityInterface - * @checked - * @unitTest - * @noTodo - */ - protected function saveDblog($message) - { - $DblogsService = $this->getService(DblogsServiceInterface::class); - return $DblogsService->create(['message' => $message]); - } -} diff --git a/plugins/baser-core/src/Controller/PagesController.php b/plugins/baser-core/src/Controller/PagesController.php index adf07b584e..2a24fa80a1 100644 --- a/plugins/baser-core/src/Controller/PagesController.php +++ b/plugins/baser-core/src/Controller/PagesController.php @@ -29,7 +29,6 @@ class PagesController extends BcFrontAppController /** * Trait - * NOTE: BcAppControllerにもあるので、移行時に取り除く */ use BcContainerTrait; diff --git a/plugins/baser-core/src/Model/Entity/User.php b/plugins/baser-core/src/Model/Entity/User.php index 5cab089453..58535591cd 100644 --- a/plugins/baser-core/src/Model/Entity/User.php +++ b/plugins/baser-core/src/Model/Entity/User.php @@ -201,4 +201,20 @@ public function getDisplayName() } } + /** + * 認証領域のプレフィックスを配列で取得する + * @return array + * @checked + * @noTodo + */ + public function getAuthPrefixes(): array + { + if(!$this->user_groups) return []; + $prefixes = []; + foreach($this->user_groups as $userGroup) { + $prefixes += explode(',', $userGroup->auth_prefix); + } + return $prefixes; + } + } diff --git a/plugins/baser-core/src/Service/AppService.php b/plugins/baser-core/src/Service/AppService.php index 93b76a650d..2201069f89 100644 --- a/plugins/baser-core/src/Service/AppService.php +++ b/plugins/baser-core/src/Service/AppService.php @@ -34,7 +34,7 @@ class AppService /** * アプリケーション全体で必要な変数を取得 - * + * * @return array * @checked * @noTodo @@ -42,17 +42,19 @@ class AppService */ public function getViewVarsForAll(): array { + $user = BcUtil::loginUser(); return [ 'currentSite' => $this->getCurrentSite(), 'otherSites' => $this->getOtherSiteList(), - 'loginUser' => BcUtil::loginUser(), - 'currentAdminTheme' => BcUtil::getCurrentAdminTheme() + 'loginUser' => $user, + 'currentAdminTheme' => BcUtil::getCurrentAdminTheme(), + 'currentUserAuthPrefixes' => $user ? $user->getAuthPrefixes() : [], ]; } /** * 現在の管理対象のサイトを取得する - * + * * @return EntityInterface * @checked * @noTodo @@ -72,7 +74,7 @@ public function getCurrentSite(): ?Site /** * 現在の管理対象のサイト以外のリストを取得する - * + * * @return array * @checked * @noTodo diff --git a/plugins/baser-core/tests/TestCase/Controller/AppControllerTest.php b/plugins/baser-core/tests/TestCase/Controller/AppControllerTest.php index 83c5d50b9f..d84c9e77bb 100644 --- a/plugins/baser-core/tests/TestCase/Controller/AppControllerTest.php +++ b/plugins/baser-core/tests/TestCase/Controller/AppControllerTest.php @@ -352,4 +352,43 @@ public function test_setViewConditions() $data = $session->read('BcApp.viewConditions.PagesView.index.data.Content'); $this->assertEquals(['title' => 'default'], $data); } + + + /** + * Test saveDblog + * + * @return void + * @dataProvider saveDblogDataProvider + */ + public function testSaveDblog(string $message, int $userId = null): void + { + $request =$this->getRequest('/baser/admin/baser-core/users/'); + if (isset($userId)) $this->loginAdmin($request, $userId); + + $this->execPrivateMethod($this->AppController, 'saveDblog', [$message]); + + $where = [ + 'message' => $message, + 'controller' => 'Users', + 'action' => 'index' + ]; + if (isset($userId)) { + $where['user_id'] = $userId; + } else { + $where['user_id IS'] = null; + } + + $dblogs = $this->getTableLocator()->get('Dblogs'); + $query = $dblogs->find()->where($where); + $this->assertSame(1, $query->count()); + } + + public function saveDblogDataProvider(): array + { + return [ + ['dblogs testSaveDblog message guest', null], + ['dblogs testSaveDblog message login', 1] + ]; + } + } diff --git a/plugins/baser-core/tests/TestCase/Controller/BcAppControllerTest.php b/plugins/baser-core/tests/TestCase/Controller/BcAppControllerTest.php deleted file mode 100644 index 0122e4e8d0..0000000000 --- a/plugins/baser-core/tests/TestCase/Controller/BcAppControllerTest.php +++ /dev/null @@ -1,106 +0,0 @@ - - * Copyright (c) NPO baser foundation - * - * @copyright Copyright (c) NPO baser foundation - * @link https://basercms.net baserCMS Project - * @since 5.0.0 - * @license https://basercms.net/license/index.html MIT License - */ - -namespace BaserCore\Test\TestCase\Controller; - -use Cake\TestSuite\IntegrationTestTrait; -use BaserCore\TestSuite\BcTestCase; -use BaserCore\Controller\BcAppController; -use Cake\Event\Event; - -/** - * BaserCore\Controller\BcAppController Test Case - */ -class BcAppControllerTest extends BcTestCase -{ - use IntegrationTestTrait; - - /** - * Fixtures - * - * @var array - */ - protected $fixtures = [ - 'plugin.BaserCore.Dblogs', - 'plugin.BaserCore.Users', - 'plugin.BaserCore.UsersUserGroups', - 'plugin.BaserCore.UserGroups', - 'plugin.BaserCore.Sites' - ]; - - /** - * set up - */ - public function setUp(): void - { - parent::setUp(); - $this->BcAppController = new BcAppController($this->getRequest()); - } - - /** - * Tear Down - * - * @return void - */ - public function tearDown(): void - { - parent::tearDown(); - unset($this->BcAppController); - } - - /** - * Test beforeFilter - * - * @return void - */ - public function testBeforeFilter(): void - { - $this->markTestIncomplete('このテストは、まだ実装されていません。'); - } - - /** - * Test saveDblog - * - * @return void - * @dataProvider saveDblogDataProvider - */ - public function testSaveDblog(string $message, int $userId = null): void - { - $request =$this->getRequest('/baser/admin/baser-core/users/'); - if (isset($userId)) $this->loginAdmin($request, $userId); - - $result = $this->execPrivateMethod($this->BcAppController, 'saveDblog', [$message]); - - $where = [ - 'message' => $message, - 'controller' => 'Users', - 'action' => 'index' - ]; - if (isset($userId)) { - $where['user_id'] = $userId; - } else { - $where['user_id IS'] = null; - } - - $dblogs = $this->getTableLocator()->get('Dblogs'); - $query = $dblogs->find()->where($where); - $this->assertSame(1, $query->count()); - } - - public function saveDblogDataProvider(): array - { - return [ - ['dblogs testSaveDblog message guest', null], - ['dblogs testSaveDblog message login', 1] - ]; - } - -} diff --git a/plugins/baser-core/tests/TestCase/Controller/Component/BcFrontContentsComponentTest.php b/plugins/baser-core/tests/TestCase/Controller/Component/BcFrontContentsComponentTest.php index 9d115b5dbd..3e0339961a 100644 --- a/plugins/baser-core/tests/TestCase/Controller/Component/BcFrontContentsComponentTest.php +++ b/plugins/baser-core/tests/TestCase/Controller/Component/BcFrontContentsComponentTest.php @@ -18,7 +18,7 @@ use BaserCore\TestSuite\BcTestCase; use BaserCore\Service\ContentsService; use Cake\Controller\ComponentRegistry; -use BaserCore\Controller\BcAppController; +use BaserCore\Controller\AppController; use BaserCore\Controller\PagesController; use BaserCore\Controller\Component\BcFrontContentsComponent; diff --git a/plugins/bc-custom-content/src/Controller/CustomContentFrontAppController.php b/plugins/bc-custom-content/src/Controller/CustomContentFrontAppController.php index a462bf794c..3929033cc2 100644 --- a/plugins/bc-custom-content/src/Controller/CustomContentFrontAppController.php +++ b/plugins/bc-custom-content/src/Controller/CustomContentFrontAppController.php @@ -11,7 +11,7 @@ namespace BcCustomContent\Controller; -use BaserCore\Controller\BcAppController; +use BaserCore\Controller\AppController; use Cake\Event\EventInterface; use BaserCore\Annotation\UnitTest; use BaserCore\Annotation\NoTodo; @@ -20,7 +20,7 @@ /** * CustomContentFrontAppController */ -class CustomContentFrontAppController extends BcAppController +class CustomContentFrontAppController extends AppController { /** From 28bfebff061daa761ac55e3e49b1b07eb8dd2986 Mon Sep 17 00:00:00 2001 From: ryuring Date: Wed, 25 Oct 2023 20:47:03 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=83=A1=E3=82=A4=E3=83=B3=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=83=88=E3=83=AA=E3=83=80=E3=82=A4=E3=83=AC=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Middleware/BcRedirectMainSiteFilter.php | 118 ------------------ .../BcRedirectMainSiteMiddleware.php | 80 ++++++++++++ ...er.php => BcRedirectSubSiteMiddleware.php} | 4 +- .../Middleware/BcRequestFilterMiddleware.php | 5 +- plugins/baser-core/src/Plugin.php | 7 +- .../BcRedirectMainSiteFilterTest.php | 23 ++-- ...hp => BcRedirectSubSiteMiddlewareTest.php} | 20 +-- 7 files changed, 111 insertions(+), 146 deletions(-) delete mode 100644 plugins/baser-core/src/Middleware/BcRedirectMainSiteFilter.php create mode 100644 plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php rename plugins/baser-core/src/Middleware/{BcRedirectSubSiteFilter.php => BcRedirectSubSiteMiddleware.php} (96%) rename plugins/baser-core/tests/TestCase/Middleware/{BcRedirectSubSiteFilterTest.php => BcRedirectSubSiteMiddlewareTest.php} (86%) diff --git a/plugins/baser-core/src/Middleware/BcRedirectMainSiteFilter.php b/plugins/baser-core/src/Middleware/BcRedirectMainSiteFilter.php deleted file mode 100644 index d0d0c24bbb..0000000000 --- a/plugins/baser-core/src/Middleware/BcRedirectMainSiteFilter.php +++ /dev/null @@ -1,118 +0,0 @@ - - * Copyright (c) NPO baser foundation - * - * @copyright Copyright (c) NPO baser foundation - * @link https://basercms.net baserCMS Project - * @since 5.0.0 - * @license https://basercms.net/license/index.html MIT License - */ - -namespace BaserCore\Middleware; - -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Server\MiddlewareInterface; -use Psr\Http\Server\RequestHandlerInterface; - -/** - * Class BcRedirectMainSiteFilter - * - * サブサイトにコンテンツが存在しない場合、同階層のメインサイトのコンテンツを確認し、 - * 存在していれば、メインサイトへリダイレクトをする。 - * - * (例) - * /s/service → /service - * - */ -class BcRedirectMainSiteFilter implements MiddlewareInterface -{ - - /** - * Trait - */ - use \BaserCore\Utility\BcContainerTrait; - - /** - * priority - * - * URLの存在確認が完了しているタイミングを前提としている為、 - * Dispacher::parseParams() より後に実行される必要がある - * - * @var int - */ - public $priority = 10; - - /** - * Process - * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler - * @return ResponseInterface - */ - public function process( - ServerRequestInterface $request, - RequestHandlerInterface $handler - ): ResponseInterface - { - $request = $event->getData('request'); - $response = $event->getData('response'); - if (!empty($request->getAttribute('currentContent'))) { - return $handler->handle($request); - } else { - if ($this->_existController($request)) { - return $handler->handle($request); - } - } - $sites = \Cake\ORM\TableRegistry::getTableLocator()->get('BaserCore.Sites'); - $site = $sites->findByUrl($request->getPath()); - if (!$site || !$site->enabled) { - return $handler->handle($request); - } - $mainSite = $site->getMain(); - if (!$mainSite) { - return $handler->handle($request); - } - $mainSiteUrl = '/' . preg_replace('/^' . $site->alias . '\//', '', $request->url); - if ($mainSite->alias) { - $mainSiteUrl = '/' . $mainSite->alias . $mainSiteUrl; - } - if ($mainSiteUrl) { - $request = new CakeRequest($mainSiteUrl); - $params = Router::parse($request->url); - $request->addParams($params); - if ($this->_existController($request)) { - $response->header('Location', $request->base . $mainSiteUrl); - $response->statusCode(302); - return $response; - } - } - return $handler->handle($request); - } - - /** - * コントローラーが存在するか確認 - * - * @param $request - * @return bool - */ - protected function _existController($request) - { - $pluginName = $pluginPath = $controller = null; - if (!empty($request->getParam('plugin'))) { - $pluginName = $controller = Inflector::camelize($request->getParam('plugin')); - $pluginPath = $pluginName . '.'; - } - if (!empty($request->getParam('controller'))) { - $controller = Inflector::camelize($request->getParam('controller')); - } - if ($pluginPath . $controller) { - $class = $controller . 'Controller'; - App::uses('AppController', 'Controller'); - App::uses($pluginName . 'AppController', $pluginPath . 'Controller'); - App::uses($class, $pluginPath . 'Controller'); - return class_exists($class); - } - return false; - } -} diff --git a/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php b/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php new file mode 100644 index 0000000000..57927661f1 --- /dev/null +++ b/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php @@ -0,0 +1,80 @@ + + * Copyright (c) NPO baser foundation + * + * @copyright Copyright (c) NPO baser foundation + * @link https://basercms.net baserCMS Project + * @since 5.0.0 + * @license https://basercms.net/license/index.html MIT License + */ + +namespace BaserCore\Middleware; + +use BaserCore\Utility\BcUtil; +use Cake\Core\Configure; +use Cake\Http\Response; +use Cake\ORM\TableRegistry; +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Server\MiddlewareInterface; +use Psr\Http\Server\RequestHandlerInterface; +use BaserCore\Annotation\NoTodo; +use BaserCore\Annotation\Checked; +use BaserCore\Annotation\UnitTest; + +/** + * Class BcRedirectMainSiteMiddleware + * + * サブサイトにコンテンツが存在しない場合、同階層のメインサイトのコンテンツを確認し、 + * 存在していれば、メインサイトへリダイレクトをする。 + * + * (例) + * /s/service → /service + * + */ +class BcRedirectMainSiteMiddleware implements MiddlewareInterface +{ + + /** + * Process + * @param ServerRequestInterface $request + * @param RequestHandlerInterface $handler + * @return ResponseInterface + * @checked + * @noTodo + */ + public function process( + ServerRequestInterface $request, + RequestHandlerInterface $handler + ): ResponseInterface + { + if (Configure::read('BcRequest.isUpdater')) { + return $handler->handle($request); + } + if ($request->is('admin') || !BcUtil::isInstalled()) { + return $handler->handle($request); + } + $sites = TableRegistry::getTableLocator()->get('BaserCore.Sites'); + $site = $sites->findByUrl($request->getPath()); + if (!$site || !$site->status || $site->id === 1) { + return $handler->handle($request); + } + $mainSite = $site->getMain(); + if (!$mainSite) { + return $handler->handle($request); + } + $mainSiteUrl = '/' . preg_replace('/^\/' . $site->alias . '\//', '', $request->getPath()); + if ($mainSite->alias) { + $mainSiteUrl = '/' . $mainSite->alias . $mainSiteUrl; + } + if ($mainSiteUrl) { + $response = new Response([ + 'status' => 302 + ]); + return $response->withLocation($request->getAttribute('base') . $mainSiteUrl); + } + return $handler->handle($request); + } + +} diff --git a/plugins/baser-core/src/Middleware/BcRedirectSubSiteFilter.php b/plugins/baser-core/src/Middleware/BcRedirectSubSiteMiddleware.php similarity index 96% rename from plugins/baser-core/src/Middleware/BcRedirectSubSiteFilter.php rename to plugins/baser-core/src/Middleware/BcRedirectSubSiteMiddleware.php index 4165113646..5ed4c19a79 100644 --- a/plugins/baser-core/src/Middleware/BcRedirectSubSiteFilter.php +++ b/plugins/baser-core/src/Middleware/BcRedirectSubSiteMiddleware.php @@ -23,12 +23,12 @@ use BaserCore\Annotation\UnitTest; /** - * Class BcRedirectSubSiteFilter + * Class BcRedirectSubSiteMiddleware * * ユーザーエージェントにより、関連するサブサイトにリダイレクトを行う * */ -class BcRedirectSubSiteFilter implements MiddlewareInterface +class BcRedirectSubSiteMiddleware implements MiddlewareInterface { /** diff --git a/plugins/baser-core/src/Middleware/BcRequestFilterMiddleware.php b/plugins/baser-core/src/Middleware/BcRequestFilterMiddleware.php index c1c81b839b..331bfdfcd4 100644 --- a/plugins/baser-core/src/Middleware/BcRequestFilterMiddleware.php +++ b/plugins/baser-core/src/Middleware/BcRequestFilterMiddleware.php @@ -15,7 +15,6 @@ use BaserCore\Utility\BcUtil; use Cake\Core\Configure; use Cake\Http\Response; -use Cake\Http\ServerRequest; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; @@ -125,12 +124,12 @@ public function getDetectorConfigs() /** * リクエスト検出器を追加する * - * @param ServerRequest $request リクエスト + * @param ServerRequestInterface $request リクエスト * @checked * @noTodo * @unitTest */ - public function addDetectors(ServerRequest $request): ServerRequest + public function addDetectors(ServerRequestInterface $request): ServerRequestInterface { foreach($this->getDetectorConfigs() as $name => $callback) { $request->addDetector($name, $callback); diff --git a/plugins/baser-core/src/Plugin.php b/plugins/baser-core/src/Plugin.php index 53bd386361..f5f86acf96 100644 --- a/plugins/baser-core/src/Plugin.php +++ b/plugins/baser-core/src/Plugin.php @@ -27,7 +27,8 @@ use BaserCore\Event\BcViewEventDispatcher; use BaserCore\Middleware\BcAdminMiddleware; use BaserCore\Middleware\BcFrontMiddleware; -use BaserCore\Middleware\BcRedirectSubSiteFilter; +use BaserCore\Middleware\BcRedirectMainSiteMiddleware; +use BaserCore\Middleware\BcRedirectSubSiteMiddleware; use BaserCore\Middleware\BcRequestFilterMiddleware; use BaserCore\ServiceProvider\BcServiceProvider; use BaserCore\Utility\BcEvent; @@ -45,6 +46,7 @@ use Cake\I18n\I18n; use Cake\Log\Log; use Cake\ORM\TableRegistry; +use Cake\Routing\Middleware\RoutingMiddleware; use Cake\Routing\RouteBuilder; use Cake\Routing\Router; use Cake\Utility\Inflector; @@ -280,9 +282,10 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue $middlewareQueue ->prepend(new BcRequestFilterMiddleware()) ->insertBefore(CsrfProtectionMiddleware::class, new AuthenticationMiddleware($this)) + ->insertBefore(RoutingMiddleware::class, new BcRedirectMainSiteMiddleware()) ->add(new BcAdminMiddleware()) ->add(new BcFrontMiddleware()) - ->add(new BcRedirectSubSiteFilter()); + ->add(new BcRedirectSubSiteMiddleware()); // APIへのアクセスの場合、セッションによる認証以外は、CSRFを利用しない設定とする $ref = new ReflectionClass($middlewareQueue); diff --git a/plugins/baser-core/tests/TestCase/Middleware/BcRedirectMainSiteFilterTest.php b/plugins/baser-core/tests/TestCase/Middleware/BcRedirectMainSiteFilterTest.php index 279d5ac369..4f6f3a6668 100644 --- a/plugins/baser-core/tests/TestCase/Middleware/BcRedirectMainSiteFilterTest.php +++ b/plugins/baser-core/tests/TestCase/Middleware/BcRedirectMainSiteFilterTest.php @@ -1,22 +1,23 @@ - * Copyright (c) baserCMS Users Community + * Copyright (c) NPO baser foundation * - * @copyright Copyright (c) baserCMS Users Community - * @link https://basercms.net baserCMS Project - * @since baserCMS v 4.0.9 - * @license https://basercms.net/license/index.html + * @copyright Copyright (c) NPO baser foundation + * @link https://basercms.net baserCMS Project + * @since 5.0.0 + * @license https://basercms.net/license/index.html MIT License */ -App::uses('BcRedirectMainSiteFilter', 'Routing/Filter'); +namespace BaserCore\Test\TestCase\Middleware; + +use BaserCore\Middleware\BcRedirectMainSiteMiddleware; +use BaserCore\TestSuite\BcTestCase; /** * Class BcRedirectMainSiteFilterTest * - * @property BcRedirectMainSiteFilter $BcRedirectMainSiteFilter + * @property BcRedirectMainSiteMiddleware $BcRedirectMainSiteMiddleware */ class BcRedirectMainSiteFilterTest extends BcTestCase { @@ -26,7 +27,7 @@ class BcRedirectMainSiteFilterTest extends BcTestCase * * @return void */ - public function setUp() + public function setUp(): void { parent::setUp(); } @@ -36,7 +37,7 @@ public function setUp() * * @return void */ - public function tearDown() + public function tearDown(): void { parent::tearDown(); } diff --git a/plugins/baser-core/tests/TestCase/Middleware/BcRedirectSubSiteFilterTest.php b/plugins/baser-core/tests/TestCase/Middleware/BcRedirectSubSiteMiddlewareTest.php similarity index 86% rename from plugins/baser-core/tests/TestCase/Middleware/BcRedirectSubSiteFilterTest.php rename to plugins/baser-core/tests/TestCase/Middleware/BcRedirectSubSiteMiddlewareTest.php index 2965c6ee81..d7606d2ce1 100644 --- a/plugins/baser-core/tests/TestCase/Middleware/BcRedirectSubSiteFilterTest.php +++ b/plugins/baser-core/tests/TestCase/Middleware/BcRedirectSubSiteMiddlewareTest.php @@ -11,7 +11,7 @@ namespace BaserCore\Test\TestCase\Middleware; -use BaserCore\Middleware\BcRedirectSubSiteFilter; +use BaserCore\Middleware\BcRedirectSubSiteMiddleware; use BaserCore\Service\SitesServiceInterface; use BaserCore\Test\Factory\ContentFactory; use BaserCore\Test\Factory\PageFactory; @@ -23,10 +23,10 @@ use CakephpFixtureFactories\Scenario\ScenarioAwareTrait; /** - * Class BcRedirectSubSiteFilterTest - * @property BcRedirectSubSiteFilter $BcRedirectSubSiteFilter + * Class BcRedirectSubSiteMiddlewareTest + * @property BcRedirectSubSiteMiddleware $BcRedirectSubSiteMiddleware */ -class BcRedirectSubSiteFilterTest extends BcTestCase +class BcRedirectSubSiteMiddlewareTest extends BcTestCase { /** * Trait @@ -41,7 +41,7 @@ class BcRedirectSubSiteFilterTest extends BcTestCase public function setUp(): void { parent::setUp(); - $this->BcRedirectSubSiteFilter = new BcRedirectSubSiteFilter(); + $this->BcRedirectSubSiteMiddleware = new BcRedirectSubSiteMiddleware(); } /** @@ -51,7 +51,7 @@ public function setUp(): void */ public function tearDown(): void { - unset($this->BcRedirectSubSiteFilter); + unset($this->BcRedirectSubSiteMiddleware); parent::tearDown(); } @@ -98,7 +98,7 @@ public function test_process(): void $_SERVER['HTTP_USER_AGENT'] = 'iPhone'; $request = $this->getRequest('/about')->withParam('plugin', 'BaserCore')->withParam('controller', 'Pages')->withParam('action', 'view'); - $this->_response = $this->BcRedirectSubSiteFilter->process($request, $this->Application); + $this->_response = $this->BcRedirectSubSiteMiddleware->process($request, $this->Application); $this->assertResponseCode(302); } @@ -130,7 +130,7 @@ public function test_process_auto_redirect_off(): void ->withParam('plugin', 'BaserCore') ->withParam('controller', 'Pages') ->withParam('action', 'view'); - $this->_response = $this->BcRedirectSubSiteFilter->process($request, $this->Application); + $this->_response = $this->BcRedirectSubSiteMiddleware->process($request, $this->Application); //リダイレクトしない確認 $this->assertResponseSuccess(); } @@ -149,7 +149,7 @@ public function test_process_site_private(): void $SitesService->unpublish(1); $request = $this->loginAdmin($this->getRequest('/baser/admin/?site_id=1')); - $this->_response = $this->BcRedirectSubSiteFilter->process($request, $this->Application); + $this->_response = $this->BcRedirectSubSiteMiddleware->process($request, $this->Application); //リダイレクトしない確認 $this->assertResponseSuccess(); } @@ -165,7 +165,7 @@ public function test_process_admin(): void //管理画面へのアクセスを確認 $request = $this->loginAdmin($this->getRequest('/baser/admin')); - $this->_response = $this->BcRedirectSubSiteFilter->process($request, $this->Application); + $this->_response = $this->BcRedirectSubSiteMiddleware->process($request, $this->Application); //リダイレクトしない確認 $this->assertResponseSuccess(); } From 897b887fd3ceaf54426921d953f3245b9dc22e89 Mon Sep 17 00:00:00 2001 From: ryuring Date: Thu, 26 Oct 2023 09:27:03 +0900 Subject: [PATCH 4/5] =?UTF-8?q?BcRedirectMainSiteMiddleware=E3=81=8C?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E5=8B=95=E4=BD=9C=E3=81=97=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=84=E3=81=9F=E3=82=81=E3=80=81=E4=B8=80?= =?UTF-8?q?=E6=97=A6=E3=80=81=E5=88=A9=E7=94=A8=E5=81=9C=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Middleware/BcRedirectMainSiteMiddleware.php | 5 ++++- plugins/baser-core/src/Plugin.php | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php b/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php index 57927661f1..38b85773df 100644 --- a/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php +++ b/plugins/baser-core/src/Middleware/BcRedirectMainSiteMiddleware.php @@ -42,13 +42,16 @@ class BcRedirectMainSiteMiddleware implements MiddlewareInterface * @param RequestHandlerInterface $handler * @return ResponseInterface * @checked - * @noTodo */ public function process( ServerRequestInterface $request, RequestHandlerInterface $handler ): ResponseInterface { + // TODO 対象サイトでの存在確認ができていない + // ルーティング後だと、ルーティングで失敗するので、ルーティング前に実行する必要があるが、 + // ルーティング前だと対象サイトでの存在確認ができないため、現在は利用していない。 + // ルーティングに組み込むことを検討する if (Configure::read('BcRequest.isUpdater')) { return $handler->handle($request); } diff --git a/plugins/baser-core/src/Plugin.php b/plugins/baser-core/src/Plugin.php index f5f86acf96..fe31d6b04a 100644 --- a/plugins/baser-core/src/Plugin.php +++ b/plugins/baser-core/src/Plugin.php @@ -27,7 +27,6 @@ use BaserCore\Event\BcViewEventDispatcher; use BaserCore\Middleware\BcAdminMiddleware; use BaserCore\Middleware\BcFrontMiddleware; -use BaserCore\Middleware\BcRedirectMainSiteMiddleware; use BaserCore\Middleware\BcRedirectSubSiteMiddleware; use BaserCore\Middleware\BcRequestFilterMiddleware; use BaserCore\ServiceProvider\BcServiceProvider; @@ -46,7 +45,6 @@ use Cake\I18n\I18n; use Cake\Log\Log; use Cake\ORM\TableRegistry; -use Cake\Routing\Middleware\RoutingMiddleware; use Cake\Routing\RouteBuilder; use Cake\Routing\Router; use Cake\Utility\Inflector; @@ -282,7 +280,6 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue $middlewareQueue ->prepend(new BcRequestFilterMiddleware()) ->insertBefore(CsrfProtectionMiddleware::class, new AuthenticationMiddleware($this)) - ->insertBefore(RoutingMiddleware::class, new BcRedirectMainSiteMiddleware()) ->add(new BcAdminMiddleware()) ->add(new BcFrontMiddleware()) ->add(new BcRedirectSubSiteMiddleware()); From 31ed51018a8902059998822fedb47111fecf8b9e Mon Sep 17 00:00:00 2001 From: uchino <44802818+kk-uchino@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:30:20 +0900 Subject: [PATCH 5/5] =?UTF-8?q?BcMailer=E3=82=92=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=81=8B=E3=82=89=E5=AE=9F=E8=A1=8C=E3=81=97?= =?UTF-8?q?=E3=81=9F=E9=9A=9B=E3=81=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20(#2826)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/baser-core/src/Mailer/BcMailer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/baser-core/src/Mailer/BcMailer.php b/plugins/baser-core/src/Mailer/BcMailer.php index 977b6d41c6..2714a56013 100644 --- a/plugins/baser-core/src/Mailer/BcMailer.php +++ b/plugins/baser-core/src/Mailer/BcMailer.php @@ -53,7 +53,7 @@ public function __construct($config = null) { parent::__construct($config); $request = Router::getRequest(); - $site = $request->getAttribute('currentSite'); + $site = $request ? $request->getAttribute('currentSite') : null; $this->setEmailTransport(); if ($site) $this->viewBuilder() ->setTheme($site->theme)