Anonymous avatar Anonymous committed f8e30f8

CORS support example moved to 2.0 list and minor issue is fixed

Comments (0)

Files changed (3)

htraf/examples10/cors.html

-<!DOCTYPE html>
-<html>
-<head>
-    <title>On-page linking and slots demo</title>
-    <script type="text/javascript" src="/-/htraf/htraf.js"></script>
-    <script data-server="edgar" data-htsql-prefix="http://edgar.htsql.com/">
-    </script>
-    <link type="text/css" rel="stylesheet" href="../css/htraf-02.css"/> 
-</head>
-<body>
-<style>
-    .de {
-        font-weight: bold;
-        font-style: italic;
-    }
-</style>
-<table data-htsql="/company/select(limit=10)" data-server="edgar"/>
-</body>
-</html>

htraf/examples20/cors.html

+<!DOCTYPE html>
+<html>
+<head>
+    <title>Getting data from the custom server (CORS)</title>
+    <script type="text/javascript" 
+            src="../htraf.js"
+            data-htsql-version="2"
+            data-htsql-prefix="/@">
+    </script>
+    <script data-server="edgar" data-htsql-prefix="http://htsql.org/@edgar">
+    </script>
+    <link type="text/css" rel="stylesheet" href="../css/htraf-02.css"/> 
+</head>
+<body>
+    <strong>Data is taken from the <a href="http://htsql.org/@edgar">EDGAR</a> 
+        database.</strong><br/><br/>
+    Filter by Name: <input type="text" id="name" value="ALE"/><br/>
+    <table data-htsql="/company?name~$name" data-ref="name" 
+           data-server="edgar"/>
+</body>
+</html>

htraf/js/htraf.init.js

             .widgetize()
             .detectCycles()
             .filter(function() {
-                return $(this).ref().size() == 0; 
+                return $(this).ref().filter(function() {
+                    return $(this).data('htraf') ? true:false; 
+                }).size() == 0; 
             })
             .loadWidget();
     });
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.