aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/templates/app.php2
-rw-r--r--css/styles.css43
-rw-r--r--files/ajax/list.php37
-rw-r--r--files/ajax/newfolder.php29
-rw-r--r--files/css/files.css4
-rw-r--r--files/index.php11
-rw-r--r--files/js/files.js86
-rw-r--r--files/templates/index.php22
-rw-r--r--files/templates/part.breadcrumb.php4
-rw-r--r--files/templates/part.list.php9
-rw-r--r--help/appinfo/app.php2
-rw-r--r--help/css/help.css6
-rw-r--r--help/templates/index.php17
-rw-r--r--img/header-a.pngbin0 -> 2951 bytes
-rw-r--r--img/header-login.png (renamed from img/header_background2.png)bin2402 -> 2402 bytes
-rw-r--r--img/header-settings-a.pngbin0 -> 2885 bytes
-rw-r--r--img/header-settings.pngbin0 -> 2887 bytes
-rw-r--r--img/header.png (renamed from img/header_background.png)bin2953 -> 2953 bytes
-rw-r--r--js/js.js19
-rw-r--r--lib/filestorage.php5
-rw-r--r--lib/filesystem.php6
-rw-r--r--lib/installer.php2
-rw-r--r--lib/ocsclient.php22
-rw-r--r--log/templates/index.php7
-rw-r--r--settings/index.php2
-rw-r--r--templates/installation.php40
-rw-r--r--templates/layout.admin.php3
-rw-r--r--templates/layout.guest.php2
-rw-r--r--templates/layout.user.php2
-rw-r--r--templates/login.php6
30 files changed, 264 insertions, 124 deletions
diff --git a/admin/templates/app.php b/admin/templates/app.php
index 4b5740c2bc4..9a788cf64c4 100644
--- a/admin/templates/app.php
+++ b/admin/templates/app.php
@@ -19,7 +19,7 @@ $app=$_['app'];
<td class="description" valign="top">
<?php echo $app["description"]; ?>
<br />
- <?php echo('<a class="description" href="'.$app["detailpage"].'">read more</a><br />'); ?>
+ <?php echo('<a class="description" target="_blank" href="'.$app["detailpage"].'">read more</a><br />'); ?>
</td>
<td width="1" valign="top" class="install"><a href="">INSTALL</a></td>
</tr>
diff --git a/css/styles.css b/css/styles.css
index 93829b7ef96..434ea739a08 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -1,6 +1,7 @@
* { margin:0; padding:0; border:0; }
-body { background-color:#fefefe; background-image:url('../img/body_background.jpg'); background-repeat:repeat-y; background-position:left top; line-height:1.6em; font:normal 80% "Lucida Grande", Arial, Verdana, sans-serif; color:#000; }
-#header { height:70px; padding:0.5em 1.5em; background-image:url('../img/header_background.png'); background-repeat:repeat-x; background-position:left top; }
+body { background:#fefefe url('../img/body_background.jpg') repeat-y left top; font:normal 80%/1.6em "Lucida Grande", Arial, Verdana, sans-serif; color:#000; }
+#header { position:fixed; top:0; z-index:100; width:100%; height:5.5em; padding:0.5em 1.5em; background:url('../img/header-a.png') repeat-x left top; }
+#body-settings #header { background-image:url('../img/header-settings-a.png'); }
#owncloud { float:left; margin:0 0 0 2em; }
h1 { margin:1em 3em 1em 0; border-bottom:1px solid #666; text-transform:uppercase; font-weight:normal; font-style:italic; color:#666; }
p.center { text-align:center; }
@@ -21,29 +22,43 @@ legend { padding:0 0.5em; font-size:1.2em; }
div.controls { width:91%; margin:1em 1em 1em 2em; padding:0.5em 0; background-color:#f7f7f7; border:1px solid #eee; }
-/* LOG IN SCREEN ------------------------------------------------------------ */
-body.login { background-image:none; background-color:#ddd; }
-body.login p.info { width:16em; margin:4em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
-#login { margin:0 auto 0 auto; padding:2em 0 0 0; background-image:url('../img/header_background2.png'); background-position:left 0; background-repeat:repeat-x; background-color:#eee; text-align:center; }
+/* INSTALLATION ------------------------------------------------------------ */
+legend { font-weight:bold; }
+legend abbr { border-bottom:1px dotted #000; }
+form a { color:#000; text-decoration:none; }
+#login input[type='text'], #login input[type='password'] { display:block; margin:0 auto .5em; }
+#login input[type='radio'] { display:none; }
+#login input[type='radio']+label { margin:1em .1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:2em; color:#666; background-color:#fff; }
+#login input[type='radio']+label:hover, #login input[type='radio']+label:focus { background-color:#ccc; outline:0; }
+.left { display:block; position:relative; top:2.5em; left:-19em; text-align: right; font-weight:bold; }
+
+
+/* LOG IN ------------------------------------------------------------ */
+#body-login { width:100%; background-image:none; background-color:#ddd; }
+#body-login p.info { width:16em; margin:4em auto; padding:1em; background-color:#eee; border:1px solid #ccc; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
+#login { margin:0 auto 0 auto; padding:2em 0 0 0; background:#eee url('../img/header-login.png') repeat-x left 0; text-align:center; }
#login form { margin:2.5em auto 0 auto; padding:0 0 1.5em 0; text-align:center; border-bottom:1px solid #fff; }
#login h1 { margin:0; padding:2.5em 0 0 0; border:0; text-align:center; text-transform:lowercase; font-size:1.5em; }
#login fieldset { background-color:transparent; border:0; }
#login fieldset p { margin:1em 0 0 0; padding:0; text-align:center; }
-#login label { font-size:1.2em; color:#fff; }
+#login label { font-size:1.2em; }
#login input { width:8em; margin:0.1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:2em; color:#666; }
#login input:hover, #login input:focus { outline:0; }
-#login input[type=submit] { width:5em; border:1px solid #ddd; background-color:#fff; font-size:2em; }
-#login input[type=submit]:hover, #login input[type=submit]:focus { background-color:#ccc; outline:0; }
+#login input[type='submit'] { width:5em; background-color:#fff; }
+#login input[type='submit']:hover, #login input[type=submit]:focus { background-color:#ccc; outline:0; }
+
+.prettybutton { margin:0.1em; padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; font-size:2em; color:#666; background-color:#fff; }
+.prettybutton:hover, .prettybutton:focus { background-color:#ccc; outline:0; }
/* META NAVIGATION (Settings, Log out) ---------------------------------------------------------------- */
-#metanav { float:right; position:relative; top:1.5em; list-style:none; margin:0; padding:0; }
+#metanav { float:right; position:relative; top:1.5em; right:2.5em; list-style:none; margin:0; padding:0; }
#metanav li { display:inline; }
#metanav li a { margin:.1em; padding:1em; }
-#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; outline:0; box-shadow:#444 0 1px 0; -moz-box-shadow:#444 0 1px 0; -webkit-box-shadow:#444 0 1px 0; }
+#metanav li a:hover, #metanav li a:focus { background:rgba(0,0,0,.5); -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; outline:0; box-shadow:#555 0 1px 0; -moz-box-shadow:#555 0 1px 0; -webkit-box-shadow:#555 0 1px 0; }
#metanav li a img { vertical-align:middle; }
-/* PLUGINS MENU ------------------------------------------------------------- */
-#plugins { float:left; width:200px; padding:0; }
+/* NAVIGATION ------------------------------------------------------------- */
+#plugins { position:fixed; top:7em; float:left; width:15.7em; padding:0; }
#plugins ul { list-style-type:none; border-top:1px solid #ccc; }
#plugins a { display:block; padding:0.5em 0.5em 0.5em 3em; background-position:1.5em center; background-repeat:no-repeat; border-bottom:1px solid #ddd; border-top:1px solid #fff; text-decoration:none; font-size:1.2em; color:#666; }
#plugins a:hover, #plugins a:focus, #plugins a.selected { background-color:#ccc; border-top:1px solid #ccc; border-bottom:1px solid #ccc; color:#000; outline:0; }
@@ -54,7 +69,7 @@ body.login p.info { width:16em; margin:4em auto; padding:1em; background-color:#
#plugins .music { background-image:url('../img/music.png'); }
/* CONTENT ------------------------------------------------------------------ */
-#content { margin:0 0 0 230px; }
+#content { margin:7em 0 0 16em; }
table { width:90%; margin:1em 5em 2em 3em; }
table tr.mouseOver td { background-color:#eee; }
table th, table td { padding:0; border-bottom:1px solid #ddd; text-align:left; font-style:italic; }
diff --git a/files/ajax/list.php b/files/ajax/list.php
index 4694f842832..ef43e72fcae 100644
--- a/files/ajax/list.php
+++ b/files/ajax/list.php
@@ -2,6 +2,7 @@
// Init owncloud
require_once('../../lib/base.php');
+require_once('../../lib/template.php');
// We send json data
header( "Content-Type: application/jsonrequest" );
@@ -14,23 +15,37 @@ if( !OC_USER::isLoggedIn()){
// Load the files
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+$doBreadcrumb = isset( $_GET['breadcrumb'] ) ? true : false;
+$data = array();
+// Make breadcrumb
+if($doBreadcrumb){
+ $breadcrumb = array();
+ $pathtohere = "/";
+ foreach( explode( "/", $dir ) as $i ){
+ if( $i != "" ){
+ $pathtohere .= "$i/";
+ $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i );
+ }
+ }
+
+ $breadcrumbNav = new OC_TEMPLATE( "files", "part.breadcrumb", "" );
+ $breadcrumbNav->assign( "breadcrumb", $breadcrumb );
+
+ $data['breadcrumb'] = $breadcrumbNav->fetchPage();
+}
+
+// make filelist
$files = array();
foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){
- $i["date"] = date( $CONFIG_DATEFORMAT, $i["mtime"] );
+ $i["date"] = OC_UTIL::formatDate($i["mtime"] );
$files[] = $i;
}
-// Make breadcrumb
-$breadcrumb = array();
-$pathtohere = "/";
-foreach( explode( "/", $dir ) as $i ){
- if( $i != "" ){
- $pathtohere .= "$i/";
- $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i );
- }
-}
+$list = new OC_TEMPLATE( "files", "part.list", "" );
+$list->assign( "files", $files );
+$data = array('files' => $list->fetchPage());
-echo json_encode( array( "status" => "success", "data" => array( "files" => $files, "breadcrumb" => $breadcrumb )));
+echo json_encode( array( "status" => "success", "data" => $data));
?>
diff --git a/files/ajax/newfolder.php b/files/ajax/newfolder.php
new file mode 100644
index 00000000000..988e7f04012
--- /dev/null
+++ b/files/ajax/newfolder.php
@@ -0,0 +1,29 @@
+<?php
+
+// Init owncloud
+require_once('../../lib/base.php');
+
+// We send json data
+header( "Content-Type: application/jsonrequest" );
+
+// Check if we are a user
+if( !OC_USER::isLoggedIn()){
+ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" )));
+ exit();
+}
+
+// Get the params
+$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
+$foldername = isset( $_GET['foldername'] ) ? $_GET['foldername'] : '';
+
+if($foldername == '') {
+ echo json_encode( array( "status" => "error", "data" => array( "message" => "Empty Foldername" )));
+ exit();
+}
+error_log('try to create ' . $foldername . ' in ' . $dir);
+if(OC_FILES::newFile($dir, $foldername, 'dir')) {
+ echo json_encode( array( "status" => "success", "data" => array()));
+ exit();
+}
+
+echo json_encode( array( "status" => "error", "data" => array( "message" => "Error when creating the folder" ))); \ No newline at end of file
diff --git a/files/css/files.css b/files/css/files.css
index 160c9307409..4c5bd0427b6 100644
--- a/files/css/files.css
+++ b/files/css/files.css
@@ -23,6 +23,10 @@
display: none;
}
+#file_newfolder_form {
+ display: none;
+}
+
#file_upload_target {
display: none;
}
diff --git a/files/index.php b/files/index.php
index e07e80aabb5..28743f77fca 100644
--- a/files/index.php
+++ b/files/index.php
@@ -55,10 +55,15 @@ foreach( explode( "/", $dir ) as $i ){
}
}
-// return template
+// make breadcrumb und filelist markup
+$list = new OC_TEMPLATE( "files", "part.list", "" );
+$list->assign( "files", $files );
+$breadcrumbNav = new OC_TEMPLATE( "files", "part.breadcrumb", "" );
+$breadcrumbNav->assign( "breadcrumb", $breadcrumb );
+
$tmpl = new OC_TEMPLATE( "files", "index", "user" );
-$tmpl->assign( "files", $files );
-$tmpl->assign( "breadcrumb", $breadcrumb );
+$tmpl->assign( "fileList", $list->fetchPage() );
+$tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() );
$tmpl->assign( 'dir', $dir);
$tmpl->assign( 'uploadMaxFilesize', OC_HELPER::computerFileSize(ini_get('upload_max_filesize')));
$tmpl->printPage();
diff --git a/files/js/files.js b/files/js/files.js
index 9eeeb7f6bfd..313727cedbc 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -1,4 +1,6 @@
$(document).ready(function() {
+ $('#file_action_panel').attr('activeAction', false);
+
// Sets browser table behaviour :
$('.browser tr').hover(
function() {
@@ -37,16 +39,43 @@ $(document).ready(function() {
$('.browser input:checkbox').attr('checked', false);
});
- // Shows and hides file upload form
- $('#file_upload_button').toggle(function() {
- $('#file_upload_form').css({"display":"block"});
- }, function() {
- $('#file_upload_form').css({"display":"none"});
- });
-
$('#file_upload_start').click(function() {
$('#file_upload_target').load(uploadFinished);
});
+
+ $('#file_new_dir_submit').click(function() {
+ $.ajax({
+ url: 'ajax/newfolder.php',
+ data: "dir="+$('#dir').val()+"&foldername="+$('#file_new_dir_name').val(),
+ complete: boolOpFinished
+ });
+ });
+
+ $('.upload').click(function(){
+ if($('#file_action_panel').attr('activeAction') != 'upload') {
+ $('#file_action_panel').attr('activeAction', 'upload');
+ $('#fileSelector').replaceWith('<input type="file" name="file" id="fileSelector">');
+ $('#file_action_panel form').css({"display":"none"});
+ $('#file_upload_form').css({"display":"block"});
+ } else {
+ $('#file_action_panel').attr('activeAction', 'false');
+ $('#file_upload_form').css({"display":"none"})
+ }
+ return false;
+ });
+
+ $('.new-dir').click(function(){
+ if($('#file_action_panel').attr('activeAction') != 'new-dir') {
+ $('#file_action_panel').attr('activeAction', 'new-dir');
+ $('#file_new_dir_name').val('');
+ $('#file_action_panel form').css({"display":"none"});
+ $('#file_newfolder_form').css({"display":"block"})
+ } else {
+ $('#file_newfolder_form').css({"display":"none"})
+ $('#file_action_panel').attr('activeAction', false);
+ }
+ return false;
+ });
});
function uploadFinished() {
@@ -55,6 +84,47 @@ function uploadFinished() {
if(result.status == "error") {
alert('An error occcured, upload failed.\nError code: ' + result.data.error);
} else {
- location.href = 'index.php?dir=' + $('#dir').val();
+ dir = $('#dir').val();
+ $.ajax({
+ url: 'ajax/list.php',
+ data: "dir="+dir,
+ complete: refreshContents
+ });
+ }
+}
+
+function resetFileActionPanel() {
+ $('#file_action_panel form').css({"display":"none"});
+ $('#file_action_panel').attr('activeAction', false);
+}
+
+function boolOpFinished(data) {
+ result = eval("("+data.responseText+");");
+ if(result.status == 'success'){
+ $.ajax({
+ url: 'ajax/list.php',
+ data: "dir="+$('#dir').val(),
+ complete: refreshContents
+ });
+ } else {
+ alert(result.data.message);
}
}
+
+function refreshContents(data) {
+ result = eval("("+data.responseText+");");
+ if(typeof(result.data.breadcrumb) != 'undefined'){
+ updateBreadcrumb(result.data.breadcrumb);
+ }
+ updateFileList(result.data.files);
+ $('#file_upload_button').click();
+ resetFileActionPanel();
+}
+
+function updateBreadcrumb(breadcrumbHtml) {
+ $('p.nav').empty().html(breadcrumbHtml);
+}
+
+function updateFileList(fileListHtml) {
+ $('#fileList').empty().html(fileListHtml);
+}
diff --git a/files/templates/index.php b/files/templates/index.php
index 40113c9fe0c..c6dc123cee0 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -5,22 +5,20 @@ href="" title="" class="new-dir">New folder</a><a href="" title=""
class="download">Download</a><a href="" title="" class="share">Share</a><a
href="" title="" class="delete">Delete</a>
</p>
- <div id="file_upload_form">
- <form action="ajax/upload.php"
+ <div id="file_action_panel">
+ <form id="file_upload_form" action="ajax/upload.php"
method="post" enctype="multipart/form-data" target="file_upload_target"><input
type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_["uploadMaxFilesize"] ?>" id="max_upload"><input
type="hidden" name="dir" value="<?php echo $_["dir"] ?>" id="dir"><input
type="file" name="file" id="fileSelector"><input type="submit"
id="file_upload_start" value="Upload" /><iframe id="file_upload_target"
name="file_upload_target" src=""></iframe></form>
+ <form id="file_newfolder_form"><input type="text" name="file_new_dir_name" id="file_new_dir_name" />&nbsp;<input type="button" id="file_new_dir_submit" name="file_new_dir_submit" value="OK" /></form>
</div>
</div>
<p class="nav">
- <a href="<?php echo link_to("files", "index.php?dir=/"); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a>
- <?php foreach($_["breadcrumb"] as $crumb): ?>
- <a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo $crumb["name"]; ?></a>
- <?php endforeach; ?>
+ <?php echo($_['breadcrumb']); ?>
</p>
<table cellspacing="0">
@@ -33,16 +31,8 @@ name="file_upload_target" src=""></iframe></form>
<th></th>
</tr>
</thead>
- <tbody>
- <?php foreach($_["files"] as $file): ?>
- <tr>
- <td class="selection"><input type="checkbox" /></td>
- <td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo $file["name"]; ?></a></td>
- <td class="filesize"><?php echo human_file_size($file["size"]); ?></td>
- <td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td>
- <td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
- </tr>
- <?php endforeach; ?>
+ <tbody id="fileList">
+ <?php echo($_['fileList']); ?>
</tbody>
</table>
diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php
new file mode 100644
index 00000000000..4d11edb984a
--- /dev/null
+++ b/files/templates/part.breadcrumb.php
@@ -0,0 +1,4 @@
+ <a href="<?php echo link_to("files", "index.php?dir=/"); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a>
+ <?php foreach($_["breadcrumb"] as $crumb): ?>
+ <a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo $crumb["name"]; ?></a>
+ <?php endforeach; ?> \ No newline at end of file
diff --git a/files/templates/part.list.php b/files/templates/part.list.php
new file mode 100644
index 00000000000..76d938326b6
--- /dev/null
+++ b/files/templates/part.list.php
@@ -0,0 +1,9 @@
+ <?php foreach($_["files"] as $file): ?>
+ <tr>
+ <td class="selection"><input type="checkbox" /></td>
+ <td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo $file["name"]; ?></a></td>
+ <td class="filesize"><?php echo human_file_size($file["size"]); ?></td>
+ <td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td>
+ <td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
+ </tr>
+ <?php endforeach; ?> \ No newline at end of file
diff --git a/help/appinfo/app.php b/help/appinfo/app.php
index c4e9eb5717c..12ae59b94c2 100644
--- a/help/appinfo/app.php
+++ b/help/appinfo/app.php
@@ -1,6 +1,6 @@
<?php
OC_APP::register( array( "order" => 1, "id" => "help", "name" => "Help" ));
-OC_APP::addSettingsPage( array( "order" => 2, "href" => OC_HELPER::linkTo( "help", "index.php" ), "name" => "Help", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" )));
+OC_APP::addSettingsPage( array( "order" => 2, "href" => OC_HELPER::linkTo( "help", "index.php" ), "name" => "Help", "icon" => OC_HELPER::imagePath( "settings", "information.png" )));
?>
diff --git a/help/css/help.css b/help/css/help.css
index 02bcade3cc2..9e64c28afb4 100644
--- a/help/css/help.css
+++ b/help/css/help.css
@@ -49,16 +49,16 @@ table td.name a
}
-.install a {
+.button a {
padding:0.2em 0.5em;
border:1px solid #ddd;
-moz-border-radius:15px;
-webkit-border-radius:15px;
border-radius:15px;
text-decoration: none;
- font-size:1.5em; color:#666666;
+ font-size:1.3em; color:#666666;
background-color:#F0F0F0;
}
-.install a:hover {
+.button a:hover {
background-color:#DDDDDD;
}
diff --git a/help/templates/index.php b/help/templates/index.php
index 5ff414eb4a7..776d7c00a9e 100644
--- a/help/templates/index.php
+++ b/help/templates/index.php
@@ -1,17 +1,18 @@
-<?php
-/*
- * Template for settings page
- */
-?>
-<h1>Help</h1>
+
+<h1>Questions and Answers</h1>
<table cellspacing="0">
<tbody>
<?php foreach($_["kbe"] as $kb): ?>
<tr>
- <td width="1"><?php if($kb["preview1"] <> "") { echo('<a href="'.OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id'].'"><img class="preview" border="0" src="'.$kb["preview1"].'" /></a>'); } ?> </a></td>
- <td class="name"><a href="<?php echo(OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id']); ?>" title=""><?php echo $kb["name"]; ?></a><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?></td>
+ <td width="1"><?php if($kb["preview1"] <> "") { echo('<img class="preview" border="0" src="'.$kb["preview1"].'" />'); } ?> </a></td>
+ <td class="name"><?php echo $kb["name"]; ?><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?><br />
+ <?php if($kb['answer']<>'') echo('<br /><span class="type"><b>Answer:</b></span><br /><span class="type">'.$kb['answer'].'</span>');?>
+ </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
+<span class="button"><a target="_blank" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new">ASK A QUESTION</a></span>
+
+
diff --git a/img/header-a.png b/img/header-a.png
new file mode 100644
index 00000000000..46fb0977ee2
--- /dev/null
+++ b/img/header-a.png
Binary files differ
diff --git a/img/header_background2.png b/img/header-login.png
index b0160e02d1f..b0160e02d1f 100644
--- a/img/header_background2.png
+++ b/img/header-login.png
Binary files differ
diff --git a/img/header-settings-a.png b/img/header-settings-a.png
new file mode 100644
index 00000000000..a72271be6a4
--- /dev/null
+++ b/img/header-settings-a.png
Binary files differ
diff --git a/img/header-settings.png b/img/header-settings.png
new file mode 100644
index 00000000000..7e6b70b5903
--- /dev/null
+++ b/img/header-settings.png
Binary files differ
diff --git a/img/header_background.png b/img/header.png
index d377f65186d..d377f65186d 100644
--- a/img/header_background.png
+++ b/img/header.png
Binary files differ
diff --git a/js/js.js b/js/js.js
index 86f5885ce62..2fb67f0ec06 100644
--- a/js/js.js
+++ b/js/js.js
@@ -1,18 +1,9 @@
-$(document).ready(function() {
-
- // Hides the user_menu div :
- $('#user_menu').hide();
-
- // Sets user_menu link behaviour :
- $('#user_menu_link').click(function() {
- $('#user').toggleClass('userLinkOn');
- $('#user_menu').slideToggle(250);
- return false;
- });
-
+$(document).ready(function() {
//hide the advanced config
$('#advanced_options').hide();
$('#use_mysql').hide();
+ $('label.sqlite').css('background-color', '#ddd');
+ $('label.mysql').css('background-color', '#fff');
// Sets advanced_options link behaviour :
$('#advanced_options_link').click(function() {
@@ -23,8 +14,12 @@ $(document).ready(function() {
$('#mysql').click(function() {
$('#use_mysql').slideDown(250);
+ $('label.sqlite').css('background-color', '#fff');
+ $('label.mysql').css('background-color', '#ddd');
});
$('#sqlite').click(function() {
$('#use_mysql').slideUp(250);
+ $('label.sqlite').css('background-color', '#ddd');
+ $('label.mysql').css('background-color', '#fff');
});
});
diff --git a/lib/filestorage.php b/lib/filestorage.php
index 66b91fc19aa..5161e7f0e57 100644
--- a/lib/filestorage.php
+++ b/lib/filestorage.php
@@ -75,6 +75,7 @@ class OC_FILESTORAGE{
public function find($path){}
public function getTree($path){}
public function hash($type,$path,$raw){}
+ public function free_space($path){}
}
@@ -466,6 +467,10 @@ class OC_FILESTORAGE_LOCAL extends OC_FILESTORAGE{
}
return $return;
}
+
+ public function free_space($path){
+ return disk_free_space($this->datadir.$path);
+ }
/**
* @brief get the size of folder and it's content
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 54b2ad9ce77..033f50e2aba 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -386,5 +386,11 @@ class OC_FILESYSTEM{
return $storage->hash($type,self::getInternalPath($path),$raw);
}
}
+
+ static public function free_space($path='/'){
+ if(self::canRead($path) and $storage=self::getStorage($path)){
+ return $storage->free_space($path);
+ }
+ }
}
?>
diff --git a/lib/installer.php b/lib/installer.php
index 14e2be6600f..965642e8476 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -68,7 +68,7 @@ class OC_INSTALLER{
self::createDBUser($username,$password,$connection);
//use the admin login data for the new database user
OC_CONFIG::setValue('dbuser',$username);
- OC_CONFIG::setValue('dbpass',$password);
+ OC_CONFIG::setValue('dbpassword',$password);
//create the database
self::createDatabase($dbname,$username,$connection);
diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index 71a0b1279ab..a3c4659c6e4 100644
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -35,16 +35,22 @@ class OC_OCSCLIENT{
* This function returns a list of all the application categories on the OCS server
*/
public static function getCategories(){
- $url='http://api.opendesktop.org/v1/content/categories';
+ $url='http://api.apps.owncloud.com/v1/content/categories';
$xml=file_get_contents($url);
$data=simplexml_load_string($xml);
- $tmp=$data->data->category;
+ $tmp=$data->data;
$cats=array();
- for($i = 0; $i < count($tmp); $i++) {
- $cats[$i]=$tmp[$i]->name;
+
+ foreach($tmp->category as $key=>$value) {
+
+ $id= (int) $value->id;
+ $name= (string) $value->name;
+ $cats[$id]=$name;
+
}
+
return $cats;
}
@@ -60,8 +66,7 @@ class OC_OCSCLIENT{
}else{
$categoriesstring=$categories;
}
- $url='http://api.opendesktop.org/v1/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page=0&pagesize=10';
-
+ $url='http://api.apps.owncloud.com/v1/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page=0&pagesize=10';
$apps=array();
$xml=file_get_contents($url);
$data=simplexml_load_string($xml);
@@ -92,7 +97,7 @@ class OC_OCSCLIENT{
* This function returns an applications from the OCS server
*/
public static function getApplication($id){
- $url='http://api.opendesktop.org/v1/content/data/'.urlencode($id);
+ $url='http://api.apps.owncloud.com/v1/content/data/'.urlencode($id);
$xml=file_get_contents($url);
$data=simplexml_load_string($xml);
@@ -121,7 +126,7 @@ class OC_OCSCLIENT{
* This function returns a list of all the knowledgebase entries from the OCS server
*/
public static function getKnownledgebaseEntries(){
- $url='http://api.opendesktop.org/v1/knowledgebase/data?page=0&pagesize=10';
+ $url='http://api.apps.owncloud.com/v1/knowledgebase/data?type=150&page=0&pagesize=10';
$kbe=array();
$xml=file_get_contents($url);
@@ -133,6 +138,7 @@ class OC_OCSCLIENT{
$kb['id']=$tmp[$i]->id;
$kb['name']=$tmp[$i]->name;
$kb['description']=$tmp[$i]->description;
+ $kb['answer']=$tmp[$i]->answer;
$kb['preview1']=$tmp[$i]->smallpreviewpic1;
$kbe[]=$kb;
}
diff --git a/log/templates/index.php b/log/templates/index.php
index 02fea0f87b0..e8a259cbaba 100644
--- a/log/templates/index.php
+++ b/log/templates/index.php
@@ -1,10 +1,3 @@
-<?php
-/*
- * Template for admin pages
- */
-?>
-<h1>Logs</h1>
-
<div class="controls">
<form id="logs_options">
<p>
diff --git a/settings/index.php b/settings/index.php
index 521f2ade9da..0e3b3f28550 100644
--- a/settings/index.php
+++ b/settings/index.php
@@ -10,7 +10,7 @@ if( !OC_USER::isLoggedIn()){
$tmpl = new OC_TEMPLATE( "settings", "index", "admin");
$used=OC_FILESYSTEM::filesize('/');
-$free=disk_free_space(OC_CONFIG::getValue('datadirectory'));
+$free=OC_FILESYSTEM::free_space();
$total=$free+$used;
$relative=round(($used/$total)*100);
$tmpl->assign('usage',OC_HELPER::humanFileSize($used));
diff --git a/templates/installation.php b/templates/installation.php
index be4693288b2..73b9a67743f 100644
--- a/templates/installation.php
+++ b/templates/installation.php
@@ -1,36 +1,30 @@
-<?php
-/*
- * Template for installation page
- */
-?>
<div id="login">
<img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
- <form action="" method="post">
+ <form action="#" method="post">
<input type='hidden' name='install' value='true'/>
<fieldset>
- <p><input type="text" name="login" value="username" /></p>
- <p><input type="password" name="pass" value="password" /></p>
+ <input type="text" name="login" value="your email" />
+ <input type="password" name="pass" value="password" />
</fieldset>
<fieldset>
<?php if(!$_['hasSQLite']): ?>
<legend><abbr title="to use SQLite instead, install it on your server">MySQL</abbr> Database</legend>
- <p><input type="text" name="dbuser" value="admin / username" /></p>
- <p><input type="password" name="dbpass" value="password" /></p>
- <p><input type="text" name="dbname" value="database name" /></p>
+ <input type="text" name="dbuser" value="MySQL user" />
+ <input type="password" name="dbpass" value="password" />
+ <input type="text" name="dbname" value="database name" />
<?php endif;?>
</fieldset>
<fieldset id="advanced">
<legend><a id="advanced_options_link" href="">Advanced ▾</a></legend>
<div id="advanced_options">
- <p><label class="left">Data directory</label></p><p><input type="text" name="directory" value="<?php echo($_['datadir']);?>" /></p>
+ <label class="left">Data directory</label><input type="text" name="directory" value="<?php echo($_['datadir']);?>" />
<?php if($_['hasMySQL'] and $_['hasSQLite']): ?>
- <p><label class="left">Database</label></p>
- <p><input type="radio" name="dbtype" value='sqlite' id="sqlite" checked="checked" /><label for="sqlite">SQLite</label>
- <input type="radio" name="dbtype" value='mysql' id="mysql"><label for="mysql">MySQL</label></p>
+ <input type="radio" name="dbtype" value='sqlite' id="sqlite" checked="checked" /><label class="sqlite" for="sqlite">SQLite</label>
+ <input type="radio" name="dbtype" value='mysql' id="mysql"><label class="mysql" for="mysql">MySQL</label>
<div id="use_mysql">
- <p><input type="text" name="dbuser" value="admin / username" /></p>
- <p><input type="password" name="dbpass" value="password" /></p>
- <p><input type="text" name="dbname" value="database name" /></p>
+ <input type="text" name="dbuser" value="MySQL user" />
+ <input type="password" name="dbpass" value="password" />
+ <input type="text" name="dbname" value="database name" />
<?php endif;?>
<?php if($_['hasMySQL'] and !$_['hasSQLite']): ?>
<input type='hidden' name='dbtype' value='mysql'/>
@@ -39,13 +33,13 @@
<input type='hidden' name='dbtype' value='sqlite'/>
<?php endif;?>
<?php if($_['hasMySQL'] and $_['hasSQLite']): ?>
- <p><label class="left">Host</label></p><p><input type="text" name="dbhost" value="localhost" /></p>
- <p><label class="left">Table prefix</label></p><p><input type="text" name="dbtableprefix" value="oc_" /></p>
+ <label class="left">Database host</label><input type="text" name="dbhost" value="localhost" />
+ <label class="left">Table prefix</label><input type="text" name="dbtableprefix" value="oc_" />
</div>
<?php endif;?>
<?php if($_['hasMySQL'] and !$_['hasSQLite']): ?>
- <p><label class="left">Host</label></p><p><input type="text" name="dbhost" value="localhost" /></p>
- <p><label class="left">Table prefix</label></p><p><input type="text" name="dbtableprefix" value="oc_" /></p>
+ <label class="left">Host</label><input type="text" name="dbhost" value="localhost" />
+ <label class="left">Table prefix</label><input type="text" name="dbtableprefix" value="oc_" />
<?php endif;?>
</div>
</fieldset>
@@ -53,4 +47,4 @@
<p class="submit"><input type="submit" value="Create" /></p>
</fieldset>
</form>
-</div> \ No newline at end of file
+</div>
diff --git a/templates/layout.admin.php b/templates/layout.admin.php
index 6f8b4302d3a..6b1e73fd3a4 100644
--- a/templates/layout.admin.php
+++ b/templates/layout.admin.php
@@ -12,13 +12,12 @@
<?php endforeach; ?>
</head>
- <body>
+ <body id="body-settings">
<div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
<ul id="metanav">
<li><a href="<?php echo link_to('', 'index.php'); ?>" title="Back to files"><img src="<?php echo image_path('', 'layout/back.png'); ?>"></a></li>
- <li><a href="<?php echo link_to('settings', 'index.php'); ?>" title="Settings"><img src="<?php echo image_path('', 'layout/settings.png'); ?>"></a></li>
<li><a href="<?php echo link_to('', 'index.php?logout=true'); ?>" title="Log out"><img src="<?php echo image_path('', 'layout/logout.png'); ?>"></a></li>
</ul>
</div>
diff --git a/templates/layout.guest.php b/templates/layout.guest.php
index dc16a1183c9..c9575530820 100644
--- a/templates/layout.guest.php
+++ b/templates/layout.guest.php
@@ -12,7 +12,7 @@
<?php endforeach; ?>
</head>
- <body class="login">
+ <body id="body-login">
<?php echo $_['content']; ?>
<p class="info"><a href="http://owncloud.org/">ownCloud</a> is a personal cloud which runs on your own server.</p>
</body>
diff --git a/templates/layout.user.php b/templates/layout.user.php
index b03fca93082..4e9190d91ff 100644
--- a/templates/layout.user.php
+++ b/templates/layout.user.php
@@ -12,7 +12,7 @@
<?php endforeach; ?>
</head>
- <body>
+ <body id="body-user">
<div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img src="<?php echo image_path('', 'owncloud-logo-small-white.png'); ?>" alt="ownCloud" /></a>
diff --git a/templates/login.php b/templates/login.php
index 517fb0e0929..02ba70be52c 100644
--- a/templates/login.php
+++ b/templates/login.php
@@ -6,9 +6,9 @@
<?php if($_["error"]): ?>
Login failed!
<?php endif; ?>
- <p><input type="text" name="user" value="" /></p>
- <p><input type="password" name="password" /></p>
- <p><input type="submit" value="Log in" /></p>
+ <input type="text" name="user" value="" />
+ <input type="password" name="password" />
+ <input type="submit" value="Log in" />
</fieldset>
</form>
</div>