-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/unaio/una
- Loading branch information
Showing
27 changed files
with
22,838 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaCore UNA Core | ||
* @{ | ||
*/ | ||
|
||
function bx_editor_insert_html (sEditorId, sImgId, sHtml) { | ||
|
||
var eEditor = 'object' == typeof(quill) ? quill.get(sEditorId) : undefined; | ||
if ('undefined' == typeof(eEditor)) | ||
return; | ||
|
||
if (eEditor.dom && eEditor.dom.doc && eEditor.dom.doc.getElementById(sImgId)) | ||
return; | ||
|
||
eEditor.execCommand('mceInsertContent', false, sHtml); | ||
} | ||
|
||
function bx_editor_insert_img (sEditorId, sImgId, sImgUrl, sClasses) { | ||
|
||
if ('undefined' == typeof(sClasses)) | ||
sClasses = ''; | ||
|
||
bx_editor_insert_html(sEditorId, sImgId, '<img id="' + sImgId + '" class="' + sClasses + '" src="' + sImgUrl + '" />') | ||
} | ||
|
||
function bx_editor_on_init (sEditorId) | ||
{ | ||
if (typeof glOnInitEditor !== 'undefined' && glOnInitEditor instanceof Array) { | ||
for (var i = 0; i < glOnInitEditor.length; i++) | ||
if (typeof glOnInitEditor[i] === "function") | ||
glOnInitEditor[i](sEditorId); | ||
} | ||
} | ||
|
||
function bx_editor_on_space_enter (sEditorId) | ||
{ | ||
// TODO: | ||
} | ||
|
||
function bx_editor_remove_img (aEditorIds, aMarkers) { | ||
if ('object' != typeof(quill)) | ||
return; | ||
|
||
var aEditors = []; | ||
for (var i = 0; i < aEditorIds.length; i++) | ||
aEditors.push(quill.get(aEditorIds[i])); | ||
|
||
for (var j = 0; j < aEditors.length; j++) { | ||
var eEditor = aEditors[j]; | ||
if (typeof(eEditor) != 'object' || null === eEditor || typeof(eEditor.dom) != 'object' || typeof(eEditor.dom.doc) != 'object') | ||
continue; | ||
|
||
// delete images in html editor | ||
for (var k = 0; k < aMarkers.length; k++) { | ||
var jFiles = $(eEditor.dom.doc).find(aMarkers[k]); | ||
jFiles.each(function () { | ||
eEditor.execCommand('mceRemoveNode', false, this); | ||
}); | ||
} | ||
} | ||
} | ||
|
||
function bx_editor_get_htmleditable (sEditorSelector) | ||
{ | ||
if (!$(sEditorSelector).size()) | ||
return false; | ||
|
||
var sId = $(sEditorSelector).attr('id'); | ||
|
||
var eEditor = 'object' == typeof(quill) ? quill.get(sId) : undefined; | ||
if ('undefined' == typeof(eEditor) || !eEditor.dom) | ||
return false; | ||
|
||
return $(eEditor.dom.doc).find('body').get(0); | ||
} | ||
|
||
function bx_editor_remove_all (oElement) | ||
{ | ||
if ('undefined' == typeof(oElement)) | ||
oElement = window; | ||
oElement = $(oElement); | ||
|
||
if ('undefined' == typeof(quill) || !quill.editors.length) | ||
return; | ||
$.each(quill.editors, function () { | ||
if ($(this.getElement()).parents().filter(oElement).length) | ||
this.remove(); | ||
}); | ||
} | ||
|
||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
modules/boonex/artificer/data/template/mod_profile/unit_meta_item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<bx_if:span> | ||
<span class="__style_prefix__-div text-sm text-gray-500 dark:text-gray-400"> · </span> | ||
<span class="bx-base-profile-unit-meta-item"> | ||
<span class="text-sm text-gray-500 dark:text-gray-400 __class__" <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</span> | ||
</span> | ||
</bx_if:span> | ||
<bx_if:a> | ||
<span class="__style_prefix__-div text-sm text-gray-500 dark:text-gray-400"> · </span> | ||
<span class="bx-base-profile-unit-meta-item"><a class="__class__" <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</a></span> | ||
</bx_if:a> | ||
<bx_if:button> | ||
<span class="bx-base-profile-unit-meta-item px-1"><a class="bx-btn __class__" <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</a></span> | ||
</bx_if:button> | ||
<bx_if:sbutton> | ||
<span class="bx-base-profile-unit-meta-item px-1"> | ||
<a class="bx-btn bx-btn-small __class__" <bx_repeat:attrs>__key__="__value__"</bx_repeat:attrs>>__content__</a> | ||
</span> | ||
</bx_if:sbutton> | ||
<bx_if:custom><span class="bx-base-profile-unit-meta-item">__content__</span></bx_if:custom> | ||
<bx_if:nl></bx_if:nl> |
21 changes: 21 additions & 0 deletions
21
modules/boonex/artificer/data/template/system/scripts/BxTemplEditorQuill.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php defined('BX_DOL') or die('hack attempt'); | ||
/** | ||
* Copyright (c) UNA, Inc - https://una.io | ||
* MIT License - https://opensource.org/licenses/MIT | ||
* | ||
* @defgroup UnaTemplate UNA Template Classes | ||
* @{ | ||
*/ | ||
|
||
/** | ||
* @see BxDolEditor | ||
*/ | ||
class BxTemplEditorQuill extends BxBaseEditorQuill | ||
{ | ||
public function __construct ($aObject, $oTemplate = false) | ||
{ | ||
parent::__construct ($aObject, $oTemplate); | ||
} | ||
} | ||
|
||
/** @} */ |
Oops, something went wrong.