mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
docs for set-on-load-script
This commit is contained in:
parent
e43afc3d9e
commit
0fce8207c1
2 changed files with 60 additions and 10 deletions
|
|
@ -819,12 +819,23 @@ dicarded, return <code>CLOG-OBJ</code>. (Internal)</p></li>
|
|||
<a id="CLOG:SET-ON-EVENT%20GENERIC-FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[generic-function]</span> <span class="reference-object"><a href="#CLOG:SET-ON-EVENT%20GENERIC-FUNCTION" >SET-ON-EVENT</a></span></span> <span class="locative-args">CLOG-OBJ EVENT-NAME HANDLER</span></span></p>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[generic-function]</span> <span class="reference-object"><a href="#CLOG:SET-ON-EVENT%20GENERIC-FUNCTION" >SET-ON-EVENT</a></span></span> <span class="locative-args">CLOG-OBJ EVENT-NAME HANDLER &KEY CANCEL-EVENT ONE-TIME</span></span></p>
|
||||
|
||||
<p>Set a <code>HANDLER</code> for <code>EVENT-NAME</code> on <code>CLOG-OBJ</code>. If handler is
|
||||
nil unbind all event handlers. (Internal)</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-3ASET-ON-EVENT-WITH-DATA-20GENERIC-FUNCTION-29"></a>
|
||||
<a id="CLOG:SET-ON-EVENT-WITH-DATA%20GENERIC-FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[generic-function]</span> <span class="reference-object"><a href="#CLOG:SET-ON-EVENT-WITH-DATA%20GENERIC-FUNCTION" >SET-ON-EVENT-WITH-DATA</a></span></span> <span class="locative-args">CLOG-OBJ EVENT-NAME HANDLER &KEY CANCEL-EVENT ONE-TIME</span></span></p>
|
||||
|
||||
<p>Set a <code>HANDLER</code> for <code>EVENT-NAME</code> on <code>CLOG-OBJ</code>. If handler is nil unbind
|
||||
all event handlers. Handler is called with a data option passed from javascript
|
||||
calling the jQuery custom event mechanism .trigger('event_name', data) (Internal)</p></li>
|
||||
</ul>
|
||||
|
||||
<p>CLOG-Obj - Event Handling</p>
|
||||
|
||||
<p><a id="x-28CLOG-3ASET-ON-RESIZE-20GENERIC-FUNCTION-29"></a>
|
||||
|
|
@ -7538,14 +7549,36 @@ no token or fails to match as user returns nil</p></li>
|
|||
<a id="CLOG-WEB-DBI:SIGN-UP%20FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:SIGN-UP%20FUNCTION" >SIGN-UP</a></span></span> <span class="locative-args">BODY SQL-CONNECTION &KEY (TITLE "Sign Up") (NEXT-STEP "/login")</span></span></li>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:SIGN-UP%20FUNCTION" >SIGN-UP</a></span></span> <span class="locative-args">BODY SQL-CONNECTION &KEY (TITLE "Sign Up") (NEXT-STEP "/login")</span></span></p>
|
||||
|
||||
<p>Setup a sign-up form and process a new sign-up</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-WEB-DBI-3ACHANGE-PASSWORD-20FUNCTION-29"></a>
|
||||
<a id="CLOG-WEB-DBI:CHANGE-PASSWORD%20FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:CHANGE-PASSWORD%20FUNCTION" >CHANGE-PASSWORD</a></span></span> <span class="locative-args">BODY SQL-CONNECTION &KEY (TITLE "Change Password") (NEXT-STEP "/")</span></span></p>
|
||||
|
||||
<p>Setup a change password form and handle change of password</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-WEB-DBI-3ARESET-PASSWORD-20FUNCTION-29"></a>
|
||||
<a id="CLOG-WEB-DBI:RESET-PASSWORD%20FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:RESET-PASSWORD%20FUNCTION" >RESET-PASSWORD</a></span></span> <span class="locative-args">SQL-CONNECTION USERNAME &KEY (NEW-PASSWORD "password")</span></span></p>
|
||||
|
||||
<p>Reset <code>USERNAME</code>'s password to <code>:NEW-PASSWORD</code></p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-WEB-DBI-3AMAKE-TOKEN-20FUNCTION-29"></a>
|
||||
<a id="CLOG-WEB-DBI:MAKE-TOKEN%20FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:MAKE-TOKEN%20FUNCTION" >MAKE-TOKEN</a></span></span></span></li>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:MAKE-TOKEN%20FUNCTION" >MAKE-TOKEN</a></span></span></span></p>
|
||||
|
||||
<p>Create a unique token used to associate a browser with a user</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-WEB-DBI-3ALOAD-CONTENT-20FUNCTION-29"></a>
|
||||
|
|
@ -7562,7 +7595,9 @@ optional <code>WHERE</code> and <code>ORDER-BY</code> sql.</p></li>
|
|||
<a id="CLOG-WEB-DBI:CREATE-BASE-TABLES%20FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:CREATE-BASE-TABLES%20FUNCTION" >CREATE-BASE-TABLES</a></span></span> <span class="locative-args">SQL-CONNECTION &KEY (SQL-TIMESTAMP-FUNC <a href="#CLOG:*SQLITE-TIMESTAMP*%20VARIABLE" title="CLOG:*SQLITE-TIMESTAMP* VARIABLE"><code>*SQLITE-TIMESTAMP*</code></a>)</span></span></li>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[function]</span> <span class="reference-object"><a href="#CLOG-WEB-DBI:CREATE-BASE-TABLES%20FUNCTION" >CREATE-BASE-TABLES</a></span></span> <span class="locative-args">SQL-CONNECTION &KEY (SQL-TIMESTAMP-FUNC <a href="#CLOG:*SQLITE-TIMESTAMP*%20VARIABLE" title="CLOG:*SQLITE-TIMESTAMP* VARIABLE"><code>*SQLITE-TIMESTAMP*</code></a>)</span></span></p>
|
||||
|
||||
<p>Create default tables</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-3A-40CLOG-WEB-THEMES-20MGL-PAX-3ASECTION-29"></a>
|
||||
|
|
@ -8268,6 +8303,17 @@ on-storage event is fired for changes to :local storage keys.</p></li>
|
|||
If <code>ON-FULL-SCREEN-CHANGE-HANDLER</code> is nil unbind the event.</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-3ASET-ON-LOAD-SCRIPT-20GENERIC-FUNCTION-29"></a>
|
||||
<a id="CLOG:SET-ON-LOAD-SCRIPT%20GENERIC-FUNCTION"></a></p>
|
||||
|
||||
<ul>
|
||||
<li><p><span class=reference-bullet><span class=reference><span class="locative-type">[generic-function]</span> <span class="reference-object"><a href="#CLOG:SET-ON-LOAD-SCRIPT%20GENERIC-FUNCTION" >SET-ON-LOAD-SCRIPT</a></span></span> <span class="locative-args">CLOG-DOCUMENT HANDLER &KEY CANCEL-EVENT ONE-TIME</span></span></p>
|
||||
|
||||
<p>Set a <code>HANDLER</code> for script load complete on CLOG-document.
|
||||
the handler (clog-obj data) data is the script-url used to load it.
|
||||
The handler should be installed on the document before calling load-script.</p></li>
|
||||
</ul>
|
||||
|
||||
<p><a id="x-28CLOG-3A-40CLOG-LOCATION-20MGL-PAX-3ASECTION-29"></a>
|
||||
<a id="CLOG:@CLOG-LOCATION%20MGL-PAX:SECTION"></a></p>
|
||||
|
||||
|
|
@ -8703,7 +8749,7 @@ keyboard-event-script:</p>
|
|||
<span class="paren3">(<span class="code">when handler
|
||||
<span class="paren4">(<span class="code"><i><span class="symbol">lambda</span></i> <span class="paren5">(<span class="code">data</span>)</span>
|
||||
<span class="paren5">(<span class="code">funcall handler obj <span class="paren6">(<span class="code">parse-keyboard-event data</span>)</span></span>)</span></span>)</span></span>)</span>
|
||||
<span class="keyword">:call-back-script</span> keyboard-event-script</span>)</span></span>)</span> </span></code></pre>
|
||||
<span class="keyword">:call-back-script</span> keyboard-event-script</span>)</span></span>)</span></span></code></pre>
|
||||
|
||||
<ul>
|
||||
<li>The script</li>
|
||||
|
|
|
|||
|
|
@ -167,7 +167,11 @@ clog-document object. (Private)"))
|
|||
(:documentation "Load script from SCRIPT-URL."))
|
||||
|
||||
(defmethod load-script ((obj clog-document) script-url)
|
||||
(jquery-execute (head-element obj)
|
||||
;; After we load the script from src we then fire the
|
||||
;; custom on-load-script event in the next line of
|
||||
;; script after the load as scripts are loaded
|
||||
;; synchronously.
|
||||
(Jquery-execute (head-element obj)
|
||||
(format nil "append('<script src=\"~A\"></script>~
|
||||
<script>$(clog[\\'document\\']).trigger(\\'on-load-script\\',~
|
||||
\\'~A\\')</script>')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue