mongo3 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -272,4 +272,115 @@ span.what {
272
272
  }
273
273
  .level_3 {
274
274
  color: #5273ff;
275
- }
275
+ }
276
+
277
+ /* Pagination collections */
278
+ div.cltn {
279
+ font-size: 0.4em;
280
+ }
281
+
282
+ div#fields {
283
+ margin: 20px 10px;
284
+ padding: 10px 10px;
285
+ overflow: hidden;
286
+ -moz-border-radius-bottomleft: 7px;
287
+ -moz-border-radius-topleft: 7px;
288
+ -moz-border-radius-bottomright: 7px;
289
+ -moz-border-radius-topright: 7px;
290
+ border: 1px #92b948 solid;
291
+ }
292
+ div.title {
293
+ text-align: center;
294
+ font-size: 2em;
295
+ }
296
+
297
+ a.back {
298
+ font-size: 1.2em;
299
+ }
300
+
301
+ fieldset {
302
+ border: none;
303
+ }
304
+ fieldset.check {
305
+ float: left;
306
+ width: 20%;
307
+ }
308
+
309
+ div.table {
310
+ padding: 10px;
311
+ -moz-border-radius-bottomleft: 7px;
312
+ -moz-border-radius-topleft: 7px;
313
+ -moz-border-radius-bottomright: 7px;
314
+ -moz-border-radius-topright: 7px;
315
+ border: 1px #92b948 solid;
316
+ }
317
+
318
+ table.cltn {
319
+ color: #a1a1a1;
320
+ width: 100%;
321
+ border-collapse: collapse;
322
+ text-align: left;
323
+ }
324
+
325
+ table.cltn thead {
326
+ font-weight: bold;
327
+ border-bottom: 1px #c1c1c1 solid;
328
+ color: #c1c1c1;
329
+ }
330
+
331
+ div.cltn div#summary {
332
+ font-size: .8em;
333
+ text-align: right;
334
+ margin: 10px 10px;
335
+ }
336
+
337
+ div.cltn div#links {
338
+ margin: 10px 0px;
339
+ text-align: center;
340
+ }
341
+
342
+ input.search {
343
+ background: #fff url(/images/search.png) no-repeat 2px 6px;
344
+ width: 80%;
345
+ border: 2px #434343 solid;
346
+ -moz-border-radius-bottomleft: 5px;
347
+ -moz-border-radius-bottomright: 5px;
348
+ -moz-border-radius-topleft: 5px;
349
+ -moz-border-radius-topright: 5px;
350
+ height: 25px;
351
+ font-size: 1.2em;
352
+ color: #434343;
353
+ padding: 5px 0px 0px 20px;
354
+ }
355
+
356
+ button {
357
+ -moz-border-radius-bottomleft: 14px;
358
+ -moz-border-radius-bottomright: 14px;
359
+ -moz-border-radius-topleft: 14px;
360
+ -moz-border-radius-topright: 14px;
361
+ -moz-box-shadow: 2px 2px 6px #232323;
362
+ background: transparent url(/images/button.png) repeat-x center bottom;
363
+ height: 20px;
364
+ width: 100px;
365
+ margin-right: 10px;
366
+ color: #c1c1c1;
367
+ }
368
+
369
+ button.show:hover {
370
+ background-color: #ad1ecb;
371
+ }
372
+
373
+ button.search:hover {
374
+ background-color: #92b948;
375
+ }
376
+
377
+ #tooltip {
378
+ display: none;
379
+ background: transparent url(/images/tooltip/black_arrow.png);
380
+ font-size: 1em;
381
+ height: 70px;
382
+ width: 160px;
383
+ padding: 25px;
384
+ color: #fff;
385
+ }
386
+
@@ -0,0 +1,25 @@
1
+ <div id="summary" style="clear:both">
2
+ <%= page_entries_info @cltn, :entry_name => 'item' %>
3
+ </div>
4
+
5
+ <table id="cltn" class="cltn" border="0" cellpadding="10" cellspacing="20">
6
+ <thead>
7
+ <% @selected_cols.each do |col| %>
8
+ <th><%=col%></th>
9
+ <% end %>
10
+ </thead>
11
+ <tbody>
12
+ <% @cltn.each do |cltn| %>
13
+ <tr valign="top">
14
+ <% @selected_cols.each do |k| %>
15
+ <td><%= cltn[k] %></td>
16
+ <% end %>
17
+ </tr>
18
+ <% end %>
19
+ </tbody>
20
+ </table>
21
+
22
+ <div id="links">
23
+ <%= will_paginate @cltn, :params => { :url => '/cltn' } %>
24
+ </div>
25
+
@@ -0,0 +1,27 @@
1
+ <form id="cols" onsubmit="fields_submit();return false;" action="/cltn_refresh" method="post">
2
+ <div style="width:85%;overflow:hidden;float:left">
3
+ <% @cols.each do |col|%>
4
+ <fieldset class="check">
5
+ <input id="<%=col%>" type="checkbox" name="cols[<%=col%>]" value="1" <%=@selected_cols.include?(col) ? "checked" : ""%>/>
6
+ <label for='<%=col%>'><%=col%></label>
7
+ </fieldset>
8
+ <% end %>
9
+ </div>
10
+ <fieldset style="float:right;">
11
+ <button type="submit" id="submit_button" class="button show">
12
+ <span style="font-size:1em">show</span>
13
+ </button>
14
+ </fieldset>
15
+ </form>
16
+
17
+ <script>
18
+ function fields_submit()
19
+ {
20
+ $.ajax({
21
+ data: $.param( $("form#cols").serializeArray() ),
22
+ dataType: 'script',
23
+ type: 'post',
24
+ url: '/cltn_refresh/<%=@page%>'
25
+ });
26
+ }
27
+ </script>
data/lib/views/_info.erb CHANGED
@@ -1,4 +1,11 @@
1
- <h1 style="text-align:center">Details</h1>
1
+ <h1 style="text-align:center">Details for <em><%=@info.delete( :title ) %></em></h1>
2
+
3
+ <% if @info.has_key? :edit %>
4
+ <div style="text-align:right;">
5
+ <a href='<%=@info.delete(:edit)%>'>manage</a>
6
+ </div>
7
+ <% end %>
8
+
2
9
  <table border="0" cellpadding="10" cellspacing="20" style="width:100%;border-collapse:collapse;;font-size:0.7em;text-align:left">
3
10
  <thead style="font-weight:bold;font-size:1em;border-bottom:1px #c1c1c1 solid;color:#c1c1c1">
4
11
  <th width="20%">Name</th>
@@ -0,0 +1,30 @@
1
+ <div id="tooltip">&nbsp;</div>
2
+
3
+ <% tip = "Enter query|sort<br/>{<b>'fred'</b>:20} | [[<b>'count'</b>:-1]]" %>
4
+
5
+ <form id="search" onsubmit="search_submit();return false;" action="/cltn_search" method="post" style="text-align:center;margin:10px">
6
+ <fieldset>
7
+ <input id="search" type="text" name="search" class="search" title="<%=tip%>" value="<%=@query%>"/>
8
+ <button type="submit" id="submit_button" class="button search" style="display:none">search</button>
9
+ </fieldset>
10
+ <fieldset style="">
11
+ </fieldset>
12
+ </form>
13
+
14
+ <script>
15
+ $( function() {
16
+ $( 'form#search input[title]').tooltip( {
17
+ tip: '#tooltip',
18
+ events: { input: "mouseover,mouseout" } } );
19
+ });
20
+
21
+ function search_submit()
22
+ {
23
+ $.ajax({
24
+ data: $.param( $("form#search").serializeArray() ),
25
+ dataType: 'script',
26
+ type: 'post',
27
+ url: '/cltn_search'
28
+ });
29
+ }
30
+ </script>
@@ -0,0 +1,16 @@
1
+ <div class="cltn">
2
+ <div class="title"><%=@title%></div>
3
+ <a class="back" href="<%=@back_url%>">&laquo;&nbsp;back</a>
4
+ <% unless @cltn.empty? %>
5
+ <div id="fields">
6
+ <%= partial :fields_form %>
7
+ </div>
8
+ <%= partial :search_form %>
9
+
10
+ <div class="table">
11
+ <%= partial :cltn %>
12
+ </div>
13
+ <% else %>
14
+ <span>No items found!</span>
15
+ <% end %>
16
+ <div>
@@ -0,0 +1 @@
1
+ $('div.table').html( "<%=escape_javascript(partial(:cltn))%>" );
@@ -0,0 +1,30 @@
1
+ <div class="cltn">
2
+ <div class="title"><%=@title%></div>
3
+ <a class="back" href="<%=@back_url%>">&laquo;&nbsp;back</a>
4
+
5
+ <div id="summary">
6
+ <%= page_entries_info @cltns, :entry_name => 'item' %>
7
+ </div>
8
+
9
+ <table class="cltn" border="0" cellpadding="10" cellspacing="20">
10
+ <thead>
11
+ <% cols = @cltns.first.keys %>
12
+ <% cols.each do |col| %>
13
+ <th><%=col%></th>
14
+ <% end %>
15
+ </thead>
16
+ <tbody>
17
+ <% @cltns.each do |cltn| %>
18
+ <tr valign="top">
19
+ <% cltn.each_pair do |k, v| %>
20
+ <td><%= v %></td>
21
+ <% end %>
22
+ </tr>
23
+ <% end %>
24
+ </tbody>
25
+ </table>
26
+
27
+ <div id="links">
28
+ <%= will_paginate @cltns, :params => { :url => "/db" } %>
29
+ </div>
30
+ <div>