nested copy and paste

This commit is contained in:
David Botton 2022-01-30 15:16:41 -05:00
parent 31ee855ed0
commit 9f5d1b9df7

View file

@ -12,7 +12,7 @@
(defclass builder-app-data ()
((copy-buf
:accessor copy-buf
:initform ""
:initform nil
:documentation "Copy buffer")
(next-panel-id
:accessor next-panel-id
@ -812,7 +812,8 @@ z.html()"
(write-file (js-query content
(format nil
"var z=~a.clone();~
z.find('*').each(function(){if($(this).attr('id').substring(0,5)=='CLOGB'){$(this).removeAttr('id')}});~
z.find('*').each(function(){if($(this).attr('id') !== undefined && ~
if($(this).attr('id').substring(0,5)=='CLOGB'){$(this).removeAttr('id')}});~
z.html()"
(clog::jquery content)))
fname)
@ -881,12 +882,13 @@ z.html()"
(js-query content
(format nil
"var z=~a.clone(); z=$('<div />').append(z);~
z.find('*').each(function(){if($(this).attr('id').substring(0,5)=='CLOGB'){$(this).removeAttr('id')}});~
z.find('*').each(function(){if($(this).attr('id') !== undefined && ~
$(this).attr('id').substring(0,5)=='CLOGB'){$(this).removeAttr('id')}});~
z.html()"
(clog::jquery (current-control app))))))))
(set-on-click btn-paste (lambda (obj)
(declare (ignore obj))
(unless (eq (copy-buf app) "")
(when (copy-buf app)
(let ((control (create-control content content
`(:name "custom"
:clog-type clog:clog-element
@ -1059,12 +1061,13 @@ z.html()"
(js-query content
(format nil
"var z=~a.clone(); z=$('<div />').append(z);~
z.find('*').each(function(){if($(this).attr('id').substring(0,5)=='CLOGB'){$(this).removeAttr('id')}});~
z.find('*').each(function(){if($(this).attr('id') !== undefined && ~
$(this).attr('id').substring(0,5)=='CLOGB'){$(this).removeAttr('id')}});~
z.html()"
(clog::jquery (current-control app))))))))
(set-on-click btn-paste (lambda (obj)
(declare (ignore obj))
(unless (eq (copy-buf app) "")
(when (copy-buf app)
(let ((control (create-control content content
`(:name "custom"
:clog-type clog:clog-element