Fix up UI and assorted fixes
parent
90dc19c748
commit
7025e34054
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* projectname is more free software. It is licensed under the WTFPL, which
|
||||
* allows you to do pretty much anything with it, without having to
|
||||
* ask permission. Commercial use is allowed, and no attribution is
|
||||
* required. We do politely request that you share your modifications
|
||||
* to benefit other developers, but you are under no enforced
|
||||
* obligation to do so :)
|
||||
*
|
||||
* Please read the accompanying LICENSE document for the full WTFPL
|
||||
* licensing text.
|
||||
*/
|
||||
|
||||
if(!isset($_APP)) { die("Unauthorized."); }
|
||||
|
||||
$sData = array(
|
||||
"contents" => NewTemplater::Render("static/intro", $locale->strings, array())
|
||||
);
|
@ -0,0 +1,90 @@
|
||||
#main_toolbar, #main_toolbar button
|
||||
{
|
||||
font-family: "Istok Web";
|
||||
}
|
||||
|
||||
#main_toolbar
|
||||
{
|
||||
padding: 36px 24px;
|
||||
}
|
||||
|
||||
form.inline
|
||||
{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#form_search
|
||||
{
|
||||
float: left;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
#form_search input, #form_search button
|
||||
{
|
||||
height: 37px;
|
||||
}
|
||||
|
||||
#form_search input
|
||||
{
|
||||
margin-left: 12px;
|
||||
font-size: 16px;
|
||||
padding: 7px 14px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
width: 290px;
|
||||
}
|
||||
|
||||
#form_search button
|
||||
{
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
|
||||
#main_toolbar a.add
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pure-button
|
||||
{
|
||||
padding: 7px 14px;
|
||||
}
|
||||
|
||||
.pure-button.shadow
|
||||
{
|
||||
text-shadow: 1px 1px 1px #424242;
|
||||
-webkit-text-shadow: 1px 1px 1px #424242;
|
||||
-moz-text-shadow: 1px 1px 2px #424242;
|
||||
-o-text-shadow: 1px 1px 1px #424242;
|
||||
-ms-text-shadow: 1px 1px 1px #424242;
|
||||
}
|
||||
|
||||
.pure-button.add
|
||||
{
|
||||
background-color: #15BA31;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.pure-button.search
|
||||
{
|
||||
background-color: #152DBA;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.pure-button i
|
||||
{
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.element-group
|
||||
{
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.element-group *
|
||||
{
|
||||
float: left;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
function hookSubmitEvent(form, callback, error)
|
||||
{
|
||||
/* Hooks a form to be submitted via AJAX, executing the given
|
||||
* callback if the request succeeds.
|
||||
*
|
||||
* form: a jQuery object containing one or more form elements
|
||||
* callback: the function to run after a successful request
|
||||
* error: optionally, a callback function to run when the
|
||||
* request fails
|
||||
*/
|
||||
|
||||
form.each(function(index){
|
||||
var element = $(this);
|
||||
var method = element.attr("method").toUpperCase();
|
||||
var target = element.attr("action");
|
||||
|
||||
element.submit(function(){
|
||||
var formdata = element.serialize();
|
||||
console.log(formdata);
|
||||
$.ajax({
|
||||
type: method,
|
||||
url: target,
|
||||
data: formdata,
|
||||
success: callback,
|
||||
error: error
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
hookSubmitEvent($("#form_addnode"));
|
||||
|
||||
$("#button_toolbar_addnode").click(function(){
|
||||
new JsdeWindow({
|
||||
width: 320,
|
||||
height: 400,
|
||||
x: 40,
|
||||
y: 40,
|
||||
title: "Create new node",
|
||||
contents: "Loading...",
|
||||
source_url: "/nodes/create"
|
||||
});
|
||||
});
|
||||
|
||||
/* Intro screen */
|
||||
new JsdeWindow({
|
||||
width: 640,
|
||||
height: 480,
|
||||
x: ($(window).width() / 2) - (640 / 2),
|
||||
y: ($(window).height() / 2) - (480 / 2),
|
||||
title: "Welcome!",
|
||||
contents: "Loading...",
|
||||
source_url: "/intro"
|
||||
});
|
||||
});
|
@ -0,0 +1 @@
|
||||
A brief explanation of openNG will be added here.
|
Loading…
Reference in New Issue