Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Lots and lots of changes... Stability and features improve.
- pre-commit before I write the 'Pimp' object for javascript goodness


git-svn-id: https://semicomplete.googlecode.com/svn/pimp@205 66067f73-fe4c-0410-82e9-b9c6d0c95a22
  • Loading branch information
jordansissel committed Dec 21, 2005
1 parent 6a821d6 commit 445c64c
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 24 deletions.
1 change: 0 additions & 1 deletion modules/ConnectionHandler.py
Expand Up @@ -12,7 +12,6 @@
from GenerateContentPlug import GenerateContentPlug
from JSONRPCPlug import JSONRPCPlug


from MusicDB import MusicDB

class ConnectionHandler(Thread):
Expand Down
1 change: 1 addition & 0 deletions modules/Plug.py
Expand Up @@ -6,6 +6,7 @@ class Plug:
content_type = {
"css": "text/css",
"html": "application/xhtml+xml",
#"html": "text/html",
"js": "text/javascript",
"jpg": "image/jpeg",
"png": "image/png",
Expand Down
7 changes: 2 additions & 5 deletions static/ajam.js
Expand Up @@ -45,13 +45,10 @@ function callrpc(method, args, callback, url) {
}
var hash = rpcparam2hash(doc.childNodes[0]);
xmlrpc.mycallback(hash)
} else if (type = "text/json") {
} else if (type == "text/plain") {
debug("JSON processing")
var params;
eval("params = " + xmlrpc.responseText);
eval("var params = " + xmlrpc.responseText);
xmlrpc.mycallback(params)
} else if (type = "text/plain") {
xmlrpc.mycallback(xmlrpc.responseText)
} else {
debug("UNEXPECTED NON XML/HTML/PLAIN RESPONSE FROM SERVER");
}
Expand Down
42 changes: 31 additions & 11 deletions static/newpimp.js
Expand Up @@ -218,7 +218,10 @@ function stream_drilldown() {
debug("Drilling into " + this.id.substr(7));

/* Ask pimp to generate us a stream entry page */
callrpc("load_stream", {"stream":this.id}, loadstream);
var pane = document.getElementById("streamlist_pane");
callrpc("loadstream", {"stream":this.id.substr(7)}, loadstream_callback);
Effect.Fade(pane, 1000);

}

function populate_stream_pane(streamname) {
Expand Down Expand Up @@ -427,18 +430,35 @@ function enqueue_callback() {
debug("Enqueue callback success?");
}

function loadstream() {
/* Ask the server about the stream */
callrpc("loadstream", {'stream': pimp["currentstream"]}, loadstream_callback)
}

function loadstream_callback(params) {
debug("LOADSTREAM")
Object.dpDump(params)
}
var streamdoc;

streamdoc = mkelement("div");
streamdoc.id = "streaminfo_pane";

var titlebar = mkelement("div");
var titlename = mkelement("div");
titlename.appendChild(mktext(params["name"] + " (/stream/blah)"));
var clientnum = mkelement("span");
clientnum.appendChild(mktext("[" + params["clients"] + " clients]"));
clientnum.style.fontSize = "small";
clientnum.style.float = "right";

titlebar.appendChild(titlename);
titlebar.appendChild(clientnum);

titlebar.style.borderLeft = "1em solid #8899DD";
titlebar.style.borderBottom = "3px solid #8899DD";
titlebar.style.paddingLeft = "3px";
titlebar.style.fontWeight = "bold";

streamdoc.appendChild(titlebar);
streamdoc.appendChild(mktext("this is a test... hurray"));

streamdoc.style.opacity = 0;
document.getElementById("container").appendChild(streamdoc);

function pageload() {
loader()
setTimeout(function() { Effect.Appear(streamdoc, 1000); }, 1);
}

window.onload = loadfunc;
File renamed without changes.
44 changes: 38 additions & 6 deletions static/style.css
Expand Up @@ -8,30 +8,36 @@ html,body {
.titlebar {
background-color: #DDEEFF;
border-bottom: 1px solid black;
padding-top: 1em;
padding-left: 1em;
padding-right: 1em;
font-weight: bold;
font-variant: small-caps;
}

.titlebar h4 {
margin: 0px;
padding: 0px;
margin-right: 3em;
font-size: 36pt;
display: inline;
}

.content {
margin: 1em;
margin-top: 2em;
}

input[type="text"] {
border: 1px inset black;
background-color: lightyellow;
}

input[type="submit"], input[type="button"] {
border: 1px solid grey;
background-color: #DDDDEE;
}

input[type="submit"]:hover, input[type="button"]:hover {
background-color: #EEEEDD;
}

#streamlist table tr th {
text-align: left;
font-variant: small-caps;
Expand Down Expand Up @@ -83,7 +89,6 @@ input[type="text"] {
}

.pane > * {
margin: 1em;
border: 1px solid black;
}

Expand Down Expand Up @@ -178,6 +183,33 @@ input[type="text"] {
text-align: center;
}

/* Menu bar */
#menubar {
/*display: none;*/
height: 1em;
}

#searchbar {
display: none;
padding-top: 2px;
float: right;
}

#tabs {
float: left;
}

.tab {
background-color: #EAF3F8;
padding-left: .5em;
padding-right: .5em;
font-weight: bold;
font-variant: small-caps;
font-size: 1.2em;
}


/* Stream View */
#streamview_pane {
background-color: #EEEEFF;
}

7 changes: 6 additions & 1 deletion templates/layout.html
Expand Up @@ -3,8 +3,13 @@
<head>
<title>Happy control!</title>
<link rel="stylesheet" type="text/css" href="/static/style.css" />
<script src="/static/DP_Debug.js" type="text/javascript" />

<script src="/static/ajam.js" type="text/javascript" />
<script src="/static/effects.js" type="text/javascript" />
<script src="/static/js/behaviour.js" type="text/javascript" />
<script src="/static/js/accelimation.js" type="text/javascript" />
<script src="/static/DP_Debug.js" type="text/javascript" />

<script src="/static/newpimp.js" type="text/javascript" />
</head>
<body>
Expand Down

0 comments on commit 445c64c

Please sign in to comment.