Преглед на файлове

Complete server querying.

Add:
    static/js/index.js
        -Complete `queryServer()`.

    static/sass/(index, _mixins).sass
        -Add `opaque()` mixin.
tags/v1.0^2
Severyn Kozak преди 10 години
родител
ревизия
21067ef5fd
променени са 3 файла, в които са добавени 23 реда и са изтрити 18 реда
  1. +9
    -11
      static/js/index.js
  2. +5
    -0
      static/sass/_mixins.sass
  3. +9
    -7
      static/sass/index.sass

+ 9
- 11
static/js/index.js Целия файл

@@ -104,7 +104,6 @@ var searchResultsPage = 1;
$(window).keypress(function(key){
for(var hotkey in hotkeyActions){
var keyChar = String.fromCharCode(key.keyCode);
console.log(keyChar);
if(keyChar == hotkey)
hotkeyActions[keyChar]();
}
@@ -377,17 +376,16 @@ function queryServer(){
"q" : searchBar.value,
"p" : searchResultsPage++
});
console.log(queryUrl);
var result = $.getJSON(queryUrl, function(result){
$.each(result, function(key, value){
if(key == "error")
errorMessage(value);
else
console.log("Success.");
});
});
// return [];

var resultDivs = [];
$.getJSON(queryUrl, function(result){
if("error" in result)
errorMessage(result["error"]);
else
for(var codelet = 0; codelet < result["results"].length; codelet++)
resultDivs.push(result["results"][codelet]);
});

for(var result = 0; result < 20; result++){
var newDiv = createResult(testCodelet);
resultDivs.push(newDiv)


+ 5
- 0
static/sass/_mixins.sass Целия файл

@@ -10,6 +10,11 @@
-o-#{$property}: $value
#{$property}: $value

// Add portable opacity style.
@mixin opaque($opacity)
@include vendor(opacity, $opacity)
filter: alpha(opacity=$opacity)

.t1
@include vendor(transition, all 0.1s ease-out)



+ 9
- 7
static/sass/index.sass Целия файл

@@ -297,26 +297,28 @@ div#results
color: orange

div.result
@extend .t3

width: $resultWidth
height: 200px
margin-bottom: 100%

@include vendor(transition, opacity 0.2s ease-in-out)
@include vendor(opacity, 0.7)

table
border-collapse: collapse
height: inherit

tr
@extend .t3
@include opaque(0.8)

height: inherit

&.cascade
@extend .t1
margin-bottom: 15%

&.display-all
@include vendor(opacity, 1.0)
&.display-all table tr
@include opaque(1.0)

div#display-info
font-size: 1.3em
@@ -330,13 +332,13 @@ div#display-info
text-transform: capitalize

td#code
@include vendor(transition, width 0.2s ease-in-out)

width: $codeWidth
height: inherit
padding: 0px
border: 1px solid #bbb

@include vendor(transition, width 0.2s ease-in-out)

#tablecontainer
overflow: hidden
width: 100%


Зареждане…
Отказ
Запис