summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views/metadataSearch/index.gsp
blob: 5b05a919d7d76343f7c8e98711ad716beb2e5d73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<head>
  <meta name="layout" content="mainNoSidebar" />
<g:javascript library="mydrop/metadata"/>
<g:javascript library="mydrop/metaFiltering"/>
<g:javascript library="mydrop/search" />
<g:javascript library="mydrop/dhtmlxcombo"/>
<g:javascript library="mydrop/tag" />
<g:javascript library="mydrop/home" />

</head>



<ul class="nav nav-tabs" id="searchTabs">
  <li><a href="#metaQueryTab">Query</a></li>
  <li><a href="#resultsTab">Results</a></li>
</ul>

<div class="tab-content">
  <div class="tab-pane active" id="metaQueryTab">
    <div class="row-fluid">
      <div class="span2">
        <div class="nav-header">Help</div>
        <div class="metaHelp">
          <p>
            There'll be help 
            <br><br><br><br><br><br><br><br>
          </p>
        </div>

      </div>
      <div class="span9">
        <g:form id="avuQuery" method="post" controller="metadataSearch"
                action="search" class="">
          <table class="filterMetaTable" id="filterTab1">
            <thead>
              <tr>
                <th colspan="2">

                </th>
                <th colspan="2">
                  <input type="button" class="deleteNodeBtn" id="del" disabled value="X">
                </th>
              </tr>
              <tr>
                <th colspan="2">
                  <input type="radio" value="Every" name="AVUNodes[0].andOr" checked>
                  <label class="labelRadio"> Every condition fulfilled </label>
                </th>
                <th colspan="2">
                  <input type="radio" value="One" name="AVUNodes[0].andOr">
                  <label class="labelRadio"> At least one condition fulfilled</label>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr id="filterRow0">
                <!-- <td colspan="2">
                <!--   <form class="formMeta">
                     <div class="singleFilter"> -->
                <td> <div class="meta-header"> Attribute </div>
                  <div class="dhx_combo_box dhx_skyblue" style="width: 180px;">
                    <input name="attr" class="dhx_combo_input" type="text" autocomplete="off" style="width: 155px;">
                    <input type="hidden" name="" value="">
                    <input type="hidden" name="" value="false">
                    <img class="dhx_combo_img" src="<g:resource dir="imgs" file="combo_select_dhx_skyblue.gif" alt="file icon"/>"/>
                  </div>
                </td>
                <!-- </div>
                 <div class="singleFilter"> -->
                <td>
                  <div class="meta-header"> Operator</div>
                  <select name="op" class="metaOperator"> 
                    <option> = </option> 
                    <option> > </option>
                    <option> < </option>
                    <option> >= </option>
                    <option> <= </option>
                    <option> <> </option>
                    <option> like </option>
                    <option> not like </option>
                  </select> 
                </td>
                <!--</div>
                 <div class="singleFilter"> -->
                <td> <div class="meta-header"> Value </div>
                  <input name="val" type="text" autocomplete="off">
                </td>
                <!--</div>
                 <div class="singleFilter">-->
                <td>
                  <br>
                  <input type='button' class="delConditionBtn"  value='DELETE' disabled>
                </td>
                <!--</div>
               </form>-->
                <!--  </td> -->
              </tr>
            </tbody>
            <tfoot>
              <tr>
                <td colspan ="2">
                  <input type="button" class="addConditionBtn" value="ADD CONDITION">
                </td>
              </tr>
            </tfoot>
          </table>

          <div><input type="button" id="newNodeBtn" value="New conditions node"></div>
         </g:form>
          <div><button id="searchBtn" onclick="processMetadataQuery()">SEARCH</button></div>
       

      </div>
    </div>
  </div>  
  <div class="tab-pane" id="resultsTab">
    <div id="resultsTabInner">Search Results here</div>

  </div>

</div>

<script>
        $(document).ready(function() {

                $.ajaxSetup({
                        cache : false
                });
                $("#topbarSearch").addClass("active");

                $('#searchTabs a').click(function (e) {

                          e.preventDefault();
                          $(this).tab('show');
                          var state = {};
                          var tabId = this.hash
                          state["tab"] = tabId;
                          $.bbq.pushState(state);
                });

                 $(window).bind( 'hashchange', function(e) {
             processTagSearchStateChange( $.bbq.getState());
                });

                  $(window).trigger( 'hashchange' );

			
        });


        //function addAVUTriplet() {
		
		
        //}
	
</script>