diff --git a/tools/projects.clog b/tools/projects.clog index 78b1392..95c05ae 100644 --- a/tools/projects.clog +++ b/tools/projects.clog @@ -1,7 +1,7 @@ - \ No newline at end of file + (projects-populate panel))">Unload \ No newline at end of file diff --git a/tools/projects.lisp b/tools/projects.lisp index 560bc69..099ebb4 100644 --- a/tools/projects.lisp +++ b/tools/projects.lisp @@ -1,13 +1,12 @@ + (in-package "CLOG-TOOLS") (defclass projects (clog:clog-panel) - ((runtime-list :reader runtime-list) (edit-asd :reader edit-asd) - (runtime-add-lisp :reader runtime-add-lisp) - (designtime-add-lisp :reader designtime-add-lisp) - (designtime-add-clog :reader designtime-add-clog) - (label-10 :reader label-10) - (designtime-list :reader designtime-list) (label-7 :reader label-7) + ((unload-project-button :reader unload-project-button) (new-project-button :reader new-project-button) - (unload-project-button :reader unload-project-button) + (designtime-list :reader designtime-list) + (runtime-list :reader runtime-list) + (designtime-label :reader designtime-label) + (runtime-label :reader runtime-label) (edit-asd :reader edit-asd) (project-list :reader project-list) (projects-label :reader projects-label))) (defun create-projects @@ -15,45 +14,36 @@ (let ((panel (change-class (clog:create-div clog-obj :content - "" + "" :hidden hidden :class class :html-id html-id :auto-place auto-place) 'projects))) - (setf (slot-value panel 'runtime-list) - (attach-as-child clog-obj "CLOGB3868392595" :clog-type - 'clog:clog-select :new-id t)) - (setf (slot-value panel 'edit-asd) - (attach-as-child clog-obj "CLOGB3868392594" :clog-type - 'clog:clog-button :new-id t)) - (setf (slot-value panel 'runtime-add-lisp) - (attach-as-child clog-obj "CLOGB3868392593" :clog-type - 'clog:clog-button :new-id t)) - (setf (slot-value panel 'designtime-add-lisp) - (attach-as-child clog-obj "CLOGB3868392592" :clog-type - 'clog:clog-button :new-id t)) - (setf (slot-value panel 'designtime-add-clog) - (attach-as-child clog-obj "CLOGB3868392591" :clog-type - 'clog:clog-button :new-id t)) - (setf (slot-value panel 'label-10) - (attach-as-child clog-obj "CLOGB3868392590" :clog-type - 'clog:clog-label :new-id t)) - (setf (slot-value panel 'designtime-list) - (attach-as-child clog-obj "CLOGB3868392589" :clog-type - 'clog:clog-select :new-id t)) - (setf (slot-value panel 'label-7) - (attach-as-child clog-obj "CLOGB3868392588" :clog-type - 'clog:clog-label :new-id t)) - (setf (slot-value panel 'new-project-button) - (attach-as-child clog-obj "CLOGB3868392587" :clog-type - 'clog:clog-button :new-id t)) (setf (slot-value panel 'unload-project-button) - (attach-as-child clog-obj "CLOGB3868392586" :clog-type + (attach-as-child clog-obj "CLOGB3868394900" :clog-type + 'clog:clog-button :new-id t)) + (setf (slot-value panel 'new-project-button) + (attach-as-child clog-obj "CLOGB3868394899" :clog-type + 'clog:clog-button :new-id t)) + (setf (slot-value panel 'designtime-list) + (attach-as-child clog-obj "CLOGB3868394893" :clog-type + 'clog:clog-select :new-id t)) + (setf (slot-value panel 'runtime-list) + (attach-as-child clog-obj "CLOGB3868394892" :clog-type + 'clog:clog-select :new-id t)) + (setf (slot-value panel 'designtime-label) + (attach-as-child clog-obj "CLOGB3868394891" :clog-type + 'clog:clog-label :new-id t)) + (setf (slot-value panel 'runtime-label) + (attach-as-child clog-obj "CLOGB3868394890" :clog-type + 'clog:clog-label :new-id t)) + (setf (slot-value panel 'edit-asd) + (attach-as-child clog-obj "CLOGB3868394889" :clog-type 'clog:clog-button :new-id t)) (setf (slot-value panel 'project-list) - (attach-as-child clog-obj "CLOGB3868392585" :clog-type + (attach-as-child clog-obj "CLOGB3868394888" :clog-type 'clog:clog-select :new-id t)) (setf (slot-value panel 'projects-label) - (attach-as-child clog-obj "CLOGB3868392584" :clog-type + (attach-as-child clog-obj "CLOGB3868394887" :clog-type 'clog:clog-label :new-id t)) (let ((target (projects-label panel))) (declare (ignorable target)) @@ -63,34 +53,20 @@ (let ((target (project-list panel))) (declare (ignorable target)) (projects-setup panel)) - (let ((target (label-7 panel))) + (let ((target (runtime-label panel))) (declare (ignorable target)) - nil) - (let ((target (label-10 panel))) + (setf (attribute target "for") + (clog:js-query target + "$('[data-clog-name=\\'runtime-list\\']').attr('id')"))) + (let ((target (designtime-label panel))) (declare (ignorable target)) - nil) + (setf (attribute target "for") + (clog:js-query target + "$('[data-clog-name=\\'designtime-list\\']').attr('id')"))) (clog:set-on-change (project-list panel) (lambda (target) (declare (ignorable target)) (projects-populate panel))) - (clog:set-on-click (unload-project-button panel) - (lambda (target) - (declare (ignorable target)) - (let ((sel (text-value (project-list panel)))) - (asdf/system-registry:clear-system sel) - (setf (text-value (project-list panel)) "None") - (projects-populate panel)))) - (clog:set-on-click (new-project-button panel) - (lambda (target) - (declare (ignorable target)) - (on-new-app-template panel))) - (clog:set-on-double-click (designtime-list panel) - (lambda (target) - (declare (ignorable target)) - (open-projects-component target - (format nil "~A/tools" - (text-value (project-list panel))) - target))) (clog:set-on-click (edit-asd panel) (lambda (target) (declare (ignorable target)) @@ -103,4 +79,22 @@ (declare (ignorable target)) (open-projects-component target (text-value (project-list panel)) target))) - panel)) + (clog:set-on-double-click (designtime-list panel) + (lambda (target) + (declare (ignorable target)) + (open-projects-component target + (format nil "~A/tools" + (text-value (project-list panel))) + target))) + (clog:set-on-click (new-project-button panel) + (lambda (target) + (declare (ignorable target)) + (on-new-app-template panel))) + (clog:set-on-click (unload-project-button panel) + (lambda (target) + (declare (ignorable target)) + (let ((sel (text-value (project-list panel)))) + (asdf/system-registry:clear-system sel) + (setf (text-value (project-list panel)) "None") + (projects-populate panel)))) + panel)) \ No newline at end of file