Commit b9632d10 authored by Dave Cooper's avatar Dave Cooper

Consolidated 3rd party web assets.

parent d18a6beb
......@@ -385,7 +385,7 @@ z-index: 1;
(:big (:b "No Graphics Object Specified"))))))
(let ((raphael-string (the raphael-string)))
(htm ((:script :type "text/javascript")
(htm ((:script :type "text/javascript")
(str raphael-string))))))))))
......
......@@ -30,7 +30,10 @@
:output-functions
((raphael-paper-def
(&key width length)
(format *stream* "var paper = Raphael('~a', ~a, ~a);
(format *stream* "
var paper = Raphael('~a', ~a, ~a);
paper.canvas.style.backgroundColor = '~a';
......
......@@ -156,7 +156,9 @@ but which you can fill in your own specific lens to do something useful for the
</pre>")
:input-slots ((url-depth 0)
:input-slots ((local-assets? t)
(url-depth 0)
("String of HTML. The main body of the page.
......@@ -192,9 +194,10 @@ Default nil."
use-jquery? nil :settable)
(use-raphael? nil)
(use-x3dom? nil)
(use-fontawesome? nil)
(use-anyresize? nil)
(include-default-favicon? t)
......@@ -240,6 +243,59 @@ interface. Defaults to nil."
development-links
(with-cl-who-string () (write-the development-links))))
:objects ((standard-javascript-section
:type 'sheet-section
:js-to-eval :parse
:inner-html (with-cl-who-string (:indent t)
(when (the use-jquery?)
(htm
((:script :src "/static/3rdpty/jquery/js/jquery.min.js"))
((:script :src "/static/3rdpty/jquery/js/jquery-ui.min.js"))
((:script :src "/static/3rdpty/jquery/js/jquery.layout.min.js"))
((:script :src "/static/3rdpty/jquery/js/superfish.min.js"))
((:script :src "/static/3rdpty/jquery/js/jquery.bgiframe.js"))))
(when (the use-x3dom?)
(htm ((:script :src (if (the local-assets?)
"/static/3rdpty/x3dom/x3dom.js"
"https://www.x3dom.org/download/1.7.2/x3dom.js")
:id "x3dom_script"))))
(when (the use-raphael?)
(htm ((:script :id "raphael-script"
:src (if (the local-assets?)
"/static/3rdpty/raphael/js/raphael-min.js"
"https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js")))))
(when (the use-fontawesome?)
(htm ((:link :id "fontawesome-css"
:rel "stylesheet"
:href (if (the local-assets?)
"/static/3rdpty/fa/css/all.min.css"
"https://use.fontawesome.com/releases/v5.3.1/css/all.css")
:integrity (unless (the local-assets?)
"sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU")
:crossorigin "anonymous"))))
(when (the use-anyresize?)
(htm ((:script :id "anyresize-script"
:src (if (the local-assets?)
"/static/3rdpty/resize/any-resize-event.js"
"https://is.gd/sAeEPt")))))
((:script) (fmt "~%var gdliid = '~a';" (the instance-id)))
((:script :src (if (the local-assets?)
"/static/gwl/js/gdlajax1593.js"
"https://genworks.com/static/gwl/js/gdlajax1593.js")))
(when (the ui-specific-layout-js)
(htm
((:script :type "text/javascript"
:src (the ui-specific-layout-js))))))))
:functions ((prepend-url-depth
(string)
(prepend-url-depth string (the url-depth)))
......@@ -313,7 +369,7 @@ from a saved snapshot file."
(when (the include-default-favicon?)
(htm (:link :rel "icon" :type "image/x-icon" :href "/static/gwl/images/favicon.ico")))
(when (the additional-header-content) (str (the additional-header-content)))
(write-the standard-javascript)
(str (the standard-javascript-section main-div))
(when (the additional-header-js-content)
(str (the additional-header-js-content))))
......@@ -385,40 +441,7 @@ from a saved snapshot file."
(main-sheet-body
()
(with-html-output (*stream*)
"No Body has been defined."))
(standard-javascript
()
(with-cl-who (:indent t)
(when (the use-jquery?)
(htm
((:script :src "/static/3rdpty/jquery/js/jquery.min.js"))
((:script :src "/static/3rdpty/jquery/js/jquery-ui.min.js"))
((:script :src "/static/3rdpty/jquery/js/jquery.layout.min.js"))
((:script :src "/static/3rdpty/jquery/js/superfish.min.js"))
((:script :src "/static/3rdpty/jquery/js/jquery.bgiframe.js"))))
(when (the use-x3dom?)
(htm ((:script :src
(if *x3dom-dev?*
"/static/3rdpty/x3dom/x3dom-dev.js"
"/static/3rdpty/x3dom/x3dom.js")
:id "x3dom_script"))))
(when (the use-raphael?)
(htm ((:script :src "/static/3rdpty/raphael/js/raphael-min.js"
))))
((:script :src "/static/gwl/js/gdlajax1593.js"))
((:script) (fmt "~%var gdliid = '~a';" (the instance-id)))
(when (the ui-specific-layout-js)
(htm
((:script :type "text/javascript"
:src (the ui-specific-layout-js)))))))))
"No Body has been defined."))))
......
......@@ -26,4 +26,3 @@
(defparameter *ajax-timeout* 60)
(defparameter *x3dom-dev?* nil)
......@@ -108,11 +108,6 @@ function gdlAjax (evt, params, asynch)
request.open('POST', url, asynch);
request.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
//request.setRequestHeader('content-length', params.length);
//request.setRequestHeader('user-agent', 'Firefox3-ajax');
//request.setRequestHeader('connection', 'close');
request.send(params);
......@@ -156,7 +151,8 @@ function gdlUpdate (request) {
if (child.getElementsByTagName('newHTML')[0].firstChild != null)
{newHTML = child.getElementsByTagName('newHTML')[0].firstChild.nodeValue}
//alert(newHTML);
var jsToEval = null;
......@@ -171,10 +167,13 @@ function gdlUpdate (request) {
if (jsToEval && (jsToEval == 'parseme'))
{
codes = myelem.getElementsByTagName("script");
for (var j=0;j<codes.length;j++)
{
var text = codes[j].text;
if (text) eval(codes[j].text);
}}
for(var j=0;j<codes.length;j++)
{ //alert(codes[j].text);
eval(codes[j].text); }}
}
if (jsToEval && (jsToEval != 'parseme') && (jsToEval != ''))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment