Просмотр исходного кода

need to filter pulled data for GGB movies. WIP

Jarrett Samuels 6 лет назад
Родитель
Сommit
402ba556df
2 измененных файлов: 40 добавлений и 22 удалений
  1. 15
    13
      .idea/workspace.xml
  2. 25
    9
      index.html

+ 15
- 13
.idea/workspace.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="a4cb58da-e3a4-48aa-b01c-d7b210292293" name="Default Changelist" comment="">
5
-      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6 6
       <change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
7 7
     </list>
8 8
     <ignored path="$PROJECT_DIR$/.tmp/" />
@@ -19,8 +19,8 @@
19 19
       <file pinned="false" current-in-tab="true">
20 20
         <entry file="file://$PROJECT_DIR$/index.html">
21 21
           <provider selected="true" editor-type-id="text-editor">
22
-            <state relative-caret-position="366">
23
-              <caret line="18" column="14" lean-forward="true" selection-start-line="18" selection-start-column="14" selection-end-line="18" selection-end-column="14" />
22
+            <state relative-caret-position="529">
23
+              <caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
24 24
             </state>
25 25
           </provider>
26 26
         </entry>
@@ -46,10 +46,10 @@
46 46
     </option>
47 47
   </component>
48 48
   <component name="ProjectFrameBounds">
49
-    <option name="x" value="-306" />
50
-    <option name="y" value="-1057" />
51
-    <option name="width" value="960" />
52
-    <option name="height" value="1057" />
49
+    <option name="x" value="1920" />
50
+    <option name="y" value="23" />
51
+    <option name="width" value="1920" />
52
+    <option name="height" value="2081" />
53 53
   </component>
54 54
   <component name="ProjectLevelVcsManager">
55 55
     <ConfirmationsSetting value="2" id="Add" />
@@ -59,6 +59,7 @@
59 59
       <foldersAlwaysOnTop value="true" />
60 60
     </navigator>
61 61
     <panes>
62
+      <pane id="Scope" />
62 63
       <pane id="ProjectPane">
63 64
         <subPane>
64 65
           <expand>
@@ -70,7 +71,6 @@
70 71
           <select />
71 72
         </subPane>
72 73
       </pane>
73
-      <pane id="Scope" />
74 74
     </panes>
75 75
   </component>
76 76
   <component name="PropertiesComponent">
@@ -104,17 +104,19 @@
104 104
       <updated>1543611178687</updated>
105 105
       <workItem from="1543611180215" duration="1269000" />
106 106
       <workItem from="1543872028398" duration="1330000" />
107
+      <workItem from="1543892043008" duration="53000" />
108
+      <workItem from="1543892111513" duration="3611000" />
107 109
     </task>
108 110
     <servers />
109 111
   </component>
110 112
   <component name="TimeTrackingManager">
111
-    <option name="totallyTimeSpent" value="2599000" />
113
+    <option name="totallyTimeSpent" value="6263000" />
112 114
   </component>
113 115
   <component name="ToolWindowManager">
114
-    <frame x="-306" y="-1057" width="960" height="1057" extended-state="0" />
116
+    <frame x="1920" y="23" width="1920" height="2081" extended-state="0" />
115 117
     <editor active="true" />
116 118
     <layout>
117
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.18636848" />
119
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.13909379" />
118 120
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
119 121
       <window_info id="Favorites" order="2" side_tool="true" />
120 122
       <window_info anchor="bottom" id="Message" order="0" />
@@ -140,8 +142,8 @@
140 142
     <entry file="file://$PROJECT_DIR$/tehjs.js" />
141 143
     <entry file="file://$PROJECT_DIR$/index.html">
142 144
       <provider selected="true" editor-type-id="text-editor">
143
-        <state relative-caret-position="366">
144
-          <caret line="18" column="14" lean-forward="true" selection-start-line="18" selection-start-column="14" selection-end-line="18" selection-end-column="14" />
145
+        <state relative-caret-position="529">
146
+          <caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
145 147
         </state>
146 148
       </provider>
147 149
     </entry>

+ 25
- 9
index.html Просмотреть файл

@@ -8,16 +8,32 @@
8 8
 <body>
9 9
 <script type="text/javascript">
10 10
 
11
-    let ajax = new XMLHttpRequest();
12
-    ajax.open('GET','https://data.sfgov.org/api/views/yitu-d5am/rows.json?accessType=DOWNLOAD', true);
13
-    ajax.onreadystatechange = function (){
14
-        console.log('state changed', ajax.readyState, ajax.status);
15
-        if(ajax.readyState === 4 && ajax.status === 200) {
16
-            var jsonData = JSON.parse(ajax.responseText)
17
-            console.log(jsonData);
11
+    function ggb (value){
12
+        if (value.includes("bridge")){
13
+            return value;
18 14
         }
19
-            };
20
-    ajax.send();
15
+    }
16
+
17
+        let ajax = new XMLHttpRequest();
18
+        ajax.open('GET', 'https://data.sfgov.org/api/views/yitu-d5am/rows.json?accessType=DOWNLOAD', true);
19
+        ajax.onreadystatechange = function () {
20
+            console.log('state changed', ajax.readyState, ajax.status);
21
+            if (ajax.readyState === 4 && ajax.status === 200) {
22
+                var jsondata = JSON.parse(ajax.responseText);
23
+                var arr = [];
24
+
25
+                for (i = 0; i < jsondata.data.length; i++){
26
+                    if(jsondata.data[i][10].includes('bridge') == true){
27
+                        arr.push(jsondata.data[i])
28
+                    }
29
+                }
30
+
31
+                console.log(arr);
32
+
33
+                document.getElementById('result').innerHTML += jsondata.data[0][10];
34
+            }
35
+        };
36
+        ajax.send();
21 37
 
22 38
 
23 39
 </script>