Version 5.0.0 release
This commit is contained in:
1 parent
90e8c7e903
commit
a3a4a9ccbd
651 files changed
+7275
-9481
No files matched your search
@@ -139,14 +139,14 @@ ips.templates.set('tableOfContents.linkOptions',`\
|
||||
<i class="fa-solid fa-plus"></i>
|
||||
</button>
|
||||
<span class="ipsTableOfContents__incrementOptions">
|
||||
<button class="ipsButton ipsButton_link ipsButton--icon" data-ipstooltip title="{{#lang}}table_of_contents_decrement{{/lang}}" data-role="decrement" aria-label="{{#lang}}table_of_contents_decrement{{/lang}}" >
|
||||
<button class="ipsButton ipsButton--text ipsButton--icon" data-ipstooltip title="{{#lang}}table_of_contents_decrement{{/lang}}" data-role="decrement" aria-label="{{#lang}}table_of_contents_decrement{{/lang}}" >
|
||||
<i class="fa-solid fa-outdent"></i>
|
||||
</button>
|
||||
<button class="ipsButton ipsButton_link ipsButton--icon" data-ipstooltip title="{{#lang}}table_of_contents_increment{{/lang}}" data-role="increment" aria-label="{{#lang}}table_of_contents_increment{{/lang}}" >
|
||||
<button class="ipsButton ipsButton--text ipsButton--icon" data-ipstooltip title="{{#lang}}table_of_contents_increment{{/lang}}" data-role="increment" aria-label="{{#lang}}table_of_contents_increment{{/lang}}" >
|
||||
<i class="fa-solid fa-indent"></i>
|
||||
</button>
|
||||
</span>
|
||||
<button class="ipsButton ipsButton_link ipsButton--icon ipsButton--negative" data-ipstooltip title="{{#lang}}table_of_contents_remove{{/lang}}" data-role="remove" aria-label="{{#lang}}table_of_contents_remove{{/lang}}" >
|
||||
<button class="ipsButton ipsButton--text ipsButton--icon ipsButton--negative" data-ipstooltip title="{{#lang}}table_of_contents_remove{{/lang}}" data-role="remove" aria-label="{{#lang}}table_of_contents_remove{{/lang}}" >
|
||||
<i class="fa-solid fa-times"></i>
|
||||
</button>
|
||||
{{/canEdit}}
|
||||
@@ -503,7 +503,7 @@ const editorLocation=document.createElement('div')
|
||||
editorLocation.dataset.role='reactRoot'
|
||||
textArea.parentElement.insertBefore(editorLocation,textArea)
|
||||
config.content=textArea.innerHTML
|
||||
config.onUpdate=(editor)=>{const value=editor.getValue();textArea.innerHTML="";textArea.appendChild(document.createTextNode(value));}
|
||||
config.onUpdate=(editor)=>{const value=editor.getValue();textArea.innerHTML="";textArea.appendChild(document.createTextNode(value));textArea.dispatchEvent(new CustomEvent('ips:codebox#update',{detail:{instance,elem:textArea},bubbles:true}));}
|
||||
textArea.ipsHide()
|
||||
let result=await ips.utils.tiptap.editorInstance(editorLocation,config);instance=result[0]
|
||||
textArea.dispatchEvent(new CustomEvent('ips:codeboxAfterInit',{bubbles:true,cancelable:true,detail:{instance,config}}))
|
||||
@@ -512,16 +512,17 @@ reactRoot=result[1]}
|
||||
function destruct(){instance?.dispose()
|
||||
reactRoot.unmount();}
|
||||
return{instance,destruct,init}}}(jQuery,_));;
|
||||
((($,_)=>{"use strict";ips.createModule('ips.ui._codehighlighting',function(){let timeout;let attempts=0;function inject(){clearTimeout(timeout);window.removeEventListener('load',inject);if(typeof ips.ui?.codehighlighting==='object'){return;}
|
||||
if(!document?.body){if(attempts++<5){timeout=setTimeout(inject,100);Debug.log(`Attempting to load the codehighlighting module. Attempt: ${attempts}`);}else{Debug.warn(`Couldn't load the codehighlighting module after 5 attempts because document.body isn't present!`);}
|
||||
((($,_)=>{"use strict";ips.createModule('ips.ui._codehighlighting',function(){const LOADER_RESOLVERS=new Set();const LOADER_REJECTS=new Set();let STATE='loading';document.addEventListener('ipsCodehighlightingLoaded',()=>{STATE='loaded';LOADER_RESOLVERS.forEach(resolve=>resolve());LOADER_RESOLVERS.clear();LOADER_REJECTS.clear();});let timeout;let attempts=0;function inject(){clearTimeout(timeout);window.removeEventListener('load',inject);if(typeof ips.ui?.codehighlighting==='object'){STATE='loaded';LOADER_REJECTS.clear();LOADER_RESOLVERS.forEach(resolve=>resolve());;LOADER_RESOLVERS.clear();return;}
|
||||
if(!document?.body){if(attempts++<5){timeout=setTimeout(inject,100);Debug.log(`Attempting to load the codehighlighting module. Attempt: ${attempts}`);}else{STATE='error';LOADER_RESOLVERS.clear();LOADER_REJECTS.forEach(reject=>reject(new Error(`The codehighlighting module could not be loaded`)));LOADER_RESOLVERS.clear();Debug.warn(`Couldn't load the codehighlighting module after 5 attempts because document.body isn't present!`);}
|
||||
return;}
|
||||
const script=document.createElement('script')
|
||||
document.body.appendChild(script)
|
||||
script.src=ips.getSetting('baseURL').replace(/\/+$/,"")+"/applications/core/interface/static/codehighlighting/codehighlighting.js?antiCache="+encodeURIComponent(ips.getSetting('jsAntiCache'));}
|
||||
try{if(!document?.body){throw new Error();}
|
||||
inject();}catch(e){window.addEventListener('load',inject,{once:true});timeout=setTimeout(()=>{if(typeof ips.ui?.codehighlighting==="object"){return;}
|
||||
inject();}catch(e){window.addEventListener('load',inject,{once:true});timeout=setTimeout(()=>{if(typeof ips.ui?.codehighlighting==="object"){STATE='loaded';LOADER_REJECTS.clear();LOADER_RESOLVERS.forEach(resolve=>resolve());LOADER_RESOLVERS.clear();return;}
|
||||
Debug.warn(`The codehighlighting module was not appended to document.body because the window's \`load\` event didn't fire within 2 seconds after ips.ui._codehighlighting was initialized.`);inject()},2000);}
|
||||
return{}})})(jQuery,_));
|
||||
return{whenLoaded(){return new Promise((resolve,reject)=>{if(STATE==='loaded'){return resolve();}else if(STATE==='error'){return reject();}
|
||||
LOADER_REJECTS.add(reject);LOADER_RESOLVERS.add(resolve);})}}})})(jQuery,_));
|
||||
;(function($,_,undefined){"use strict";ips.createModule('ips.ui.contentItem',function(){var defaults={multiValues:true,unique:false,fieldTemplate:'core.contentItem.field',resultsTemplate:'core.contentItem.resultWrapper',resultItemTemplate:'core.contentItem.resultItem',itemTemplate:'core.contentItem.item',queryParam:'q',minAjaxLength:1};var respond=function(elem,options){if(!$(elem).data('_contentItem')){$(elem).data('_contentItem',contentItemObj(elem,_.defaults(options,defaults)));}},destruct=function(elem){var obj=getObj(elem);if(!_.isUndefined(obj)){obj.destruct();}},getObj=function(elem){elem=$(elem);if(elem.data('_contentItem')){return elem.data('_contentItem');}else if($('[name="'+elem.attr('name')+'_original'+'"]').length&&$('[name="'+elem.attr('name')+'_original'+'"]').data('_contentItem')){return $('[name="'+elem.attr('name')+'_original'+'"]').data('_contentItem');}
|
||||
return undefined;};ips.ui.registerWidget('contentItem',ips.ui.contentItem,['resultsTemplate','resultItemTemplate','itemTemplate','queryParam','dataSource','maxItems','minAjaxLength']);return{respond:respond,destruct:destruct,getObj:getObj};});var contentItemObj=function(elem,options,e){var timer,blurTimer,lastValue='',originalTextField,valueField,hiddenValueField,itemListWrapper,textField,dataSource,elemID=$(elem).identify().attr('id'),wrapper,inputItem,resultsElem,disabled=false,required=false,tooltip=null,tooltipTimer=null;var init=function(){if($(elem).is('input[type="text"], input[type="search"]')){originalTextField=$(elem);}else{originalTextField=$(elem).find('input[type="text"], input[type="search"]').first();}
|
||||
_buildWrapper();_getDataSource();originalTextField.removeAttr('list');_buildResultsList();if(originalTextField.is(':disabled')){disabled=true;}
|
||||
@@ -772,7 +773,7 @@ if(!toInsert){return;}
|
||||
instance.chain().insertContent(toInsert+"<p></p>",{parseOptions:{preserveWhitespace:false}}).focus().run();};if(minimized){unminimize(function(){try{instance.chain().setContent('').run();elem.find('[data-role="autoSaveRestoreMessage"]').hide();}catch(err){}
|
||||
_doInsert();});}else{_doInsert();}}
|
||||
function insertHtml(html){instance.chain().insertContent(html,{parseOptions:{preserveWhitespace:false}}).focus().run();}
|
||||
function reset(){instance.chain().setContent(originalContent||'<p></p>').clearAutosave().run();$(elem).find('[data-ipsUploader]').trigger('resetUploader');if(options.minimized&&options.minimizeAfterReset){minimize();}
|
||||
function reset(){instance.chain().setContent(originalContent||'<p></p>',{emitUpdate:true}).clearAutosave().run();$(elem).find('[data-ipsUploader]').trigger('resetUploader');if(options.minimized&&options.minimizeAfterReset){minimize();}
|
||||
clearTextarea();}
|
||||
function saveAndClearAutosave(){if(instance){instance?.commands.clearAutoSave?.()}else{ips.utils.db.remove('editorSave',options.autoSaveKey);}}
|
||||
function _belongsToThisEditor(data){return data.editorID!==undefined&&data.editorID===name;}
|
||||
@@ -2061,7 +2062,7 @@ return{type:'inside',range:range};};var getSelection=function(){return(window.ge
|
||||
var current=child;while(current){if(current===parent){return true;}
|
||||
current=current.parentNode;}
|
||||
return false;};return{getSelectedText:getSelectedText,getSelection:getSelection,getRange:getRange,getCommonAncestor:getCommonAncestor};});}(jQuery,_));;
|
||||
(function($,_,undefined){"use strict";ips.createModule("ips.utils.serviceWorker",function(){const SERVICE_WORKER_URL=ips.getSetting("baseURL")+"index.php?app=core&module=system&controller=serviceworker&v="+ips.getSetting("jsAntiCache");const supported="serviceWorker"in navigator;const registerServiceWorker=(type,loggedIn)=>{return navigator.serviceWorker.register(`${SERVICE_WORKER_URL}&type=${type}&loggedIn=${JSON.stringify(loggedIn)}`).then((registration)=>{Debug.log("ServiceWorker registration successful with scope: ",registration.scope);return registration;}).catch((err)=>{Debug.log("ServiceWorker registration failed: ",err);});};const getRegistration=()=>{return navigator.serviceWorker.ready;};return{registerServiceWorker,supported,getRegistration,};});})(jQuery,_);;
|
||||
(function($,_,undefined){"use strict";ips.createModule("ips.utils.serviceWorker",function(){const SERVICE_WORKER_URL=ips.getSetting("baseURL")+"index.php?app=core&module=system&controller=serviceworker&v="+ips.getSetting("jsAntiCache");const supported="serviceWorker"in navigator;const registerServiceWorker=(type)=>{return navigator.serviceWorker.register(`${SERVICE_WORKER_URL}&type=${type}`).then((registration)=>{Debug.log("ServiceWorker registration successful with scope: ",registration.scope);return registration;}).catch((err)=>{Debug.log("ServiceWorker registration failed: ",err);});};const getRegistration=()=>{return navigator.serviceWorker.ready;};return{registerServiceWorker,supported,getRegistration,};});})(jQuery,_);;
|
||||
(function($,_){"use strict";ips.createModule("ips.utils.sockets",function(){let socketIo;let pingInterval;let refreshToken;let refreshInterval;let refreshTokenUsed=false;let connected=false;function init(){if(!enabled()){return;}
|
||||
ips.loader.get([`${ips.getSetting('socketUrl')}/socket.io/socket.io.min.js`]).then(function(){initializeSocketIo();});}
|
||||
function enabled(){let res=!!(ips.getSetting('memberID')&&ips.getSetting('socketEnabled')&&ips.getSetting('page_token'));return res;}
|
||||
|
||||
Reference in new issue
Block a user