Node creation window

feature/core
Sven Slootweg 11 years ago
parent 7025e34054
commit 430c3a1627

@ -0,0 +1,27 @@
<?php
/*
* openNG 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."); }
if($router->uMethod == "get")
{
/* Display form */
$sData = array(
"contents" => NewTemplater::Render("nodes/create", $locale->strings, array())
);
}
elseif($router->uMethod == "post")
{
/* Process form */
}

@ -23,12 +23,16 @@ $router->allow_slash = true;
$router->routes = array(
0 => array(
"^/$" => "modules/index.php",
"^/editor$" => "modules/editor.php",
"^/intro$" => array(
'target' => "modules/intro.php",
'_json' => true
),
"^/$" => "modules/index.php",
"^/editor$" => "modules/editor.php",
"^/intro$" => array(
'target' => "modules/intro.php",
'_json' => true
),
"^/nodes/create$" => array(
'target' => "modules/nodes/create.php",
'_json' => true
),
)
);

@ -40,6 +40,18 @@ form.inline
border-bottom-left-radius: 0px;
}
.group-first, .group-middle
{
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
.group-middle, .group-last
{
border-top-left-radius: 0px !important;
border-bottom-left-radius: 0px !important;
}
#main_toolbar a.add
{
float: left;
@ -88,3 +100,10 @@ form.inline
{
float: left;
}
h1.form
{
font-size: 16px;
margin-top: 7px;
margin-bottom: 4px;
}

@ -31,7 +31,7 @@ function hookSubmitEvent(form, callback, error)
}
$(function(){
hookSubmitEvent($("#form_addnode"));
hookSubmitEvent($("#form_search"));
$("#button_toolbar_addnode").click(function(){
new JsdeWindow({

@ -0,0 +1,24 @@
<form class="pure-form pure-form-aligned form_createnode">
<h1 class="form">Node</h1>
<div class="pure-control-group">
<label for="input_createnode_name">Name</label>
<input type="text" name="name" id="input_createnode_name">
</div>
<div class="pure-control-group">
<label for="input_createnode_notes">Notes</label>
<textarea name="notes" id="input_createnode_notes"></textarea>
</div>
<div class="pure-g form_createnode_properties">
<div class="pure-u-1">
<h1 class="form">Properties</h1>
</div>
<div class="property">
<input type="text" class="pure-input-1-2 group-first" name="property_name[]" placeholder="Name">
<input type="text" class="pure-input-1-2 group-last" name="property_value[]" placeholder="Value">
</div>
</div>
</form>
Loading…
Cancel
Save