|
|
|
@ -111,6 +111,11 @@ menu.events._dialog = function (_item,_context){
|
|
|
|
|
// var url = _args['url']
|
|
|
|
|
_item.type = (_item.type == null)? 'redirect' :_item.type
|
|
|
|
|
var http = HttpClient.instance()
|
|
|
|
|
_regex = /uri=(.+)/;
|
|
|
|
|
if (_item.uri.match(_regex)) {
|
|
|
|
|
_seg = _item.uri.match(_regex)
|
|
|
|
|
_item.uri = _seg[_seg.length - 1]
|
|
|
|
|
}
|
|
|
|
|
http.setHeader('uri',_item.uri)
|
|
|
|
|
http.setHeader('dom',(_item.title)?_item.title:'dialog')
|
|
|
|
|
// http.setHeader('dom',_args.text)
|
|
|
|
@ -121,6 +126,11 @@ menu.events._dialog = function (_item,_context){
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
menu.events._openTabs = function (_TabContentPane, _id) {
|
|
|
|
|
_id = _id[0] != '.' ? ('.'+_id) : _id
|
|
|
|
|
$(_TabContentPane).children().slideUp('fast')
|
|
|
|
|
$(_id).slideDown()
|
|
|
|
|
}
|
|
|
|
|
menu.events._open = function (id,uri,_context){
|
|
|
|
|
id = id.replace(/ /g,'-')
|
|
|
|
|
|
|
|
|
@ -243,6 +253,7 @@ var QCMSBasic= function(_layout,_context,_clickEvent) {
|
|
|
|
|
if(this.data.uri && this.data.type != 'open') {
|
|
|
|
|
|
|
|
|
|
if (this.data.type == 'dialog') {
|
|
|
|
|
// console.log(this.data)
|
|
|
|
|
menu.events._dialog(this.data,_context)
|
|
|
|
|
}else{
|
|
|
|
|
menu.events._open(menu.utils.format(this.data.text),this.data.uri,_context)
|
|
|
|
@ -417,3 +428,22 @@ menu.init =function (_layout,_context){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
*
|
|
|
|
|
* Source Code
|
|
|
|
|
*/
|
|
|
|
|
if (! code){
|
|
|
|
|
var code = {}
|
|
|
|
|
}
|
|
|
|
|
code.copy = function(_node) {
|
|
|
|
|
var _code = $(_node.parentNode).text().trim().replace(/ {8}/g,'').replace(/ {4}/g,'\t').replace(/\r/g,'\n')
|
|
|
|
|
navigator.clipboard.writeText(_code);
|
|
|
|
|
$(_node).empty()
|
|
|
|
|
$(_node).html('<i class="fa-solid fa-check"></i>')
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
$(_node).empty()
|
|
|
|
|
$(_node).html('<i class="fa-regular fa-copy"></i>')
|
|
|
|
|
},750)
|
|
|
|
|
}
|