Commit 98fb4f0f authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files
parents b3189510 100cde3f
......@@ -39,10 +39,6 @@ $javascript = <<<JAVASCRIPT
var copyrightnotice = '{$copyright}';
var browser = new FileBrowser('filelist', '{$wwwroot}artefact/file/myfiles.json.php', {'adminfiles':true});
browser.createfolderscript = '{$wwwroot}artefact/file/createfolder.json.php';
browser.deletescript = '{$wwwroot}artefact/file/delete.json.php';
browser.updatemetadatascript = '{$wwwroot}artefact/file/updatemetadata.json.php';
browser.downloadscript = '{$wwwroot}artefact/file/download.php';
var uploader = new FileUploader('uploader', '{$wwwroot}artefact/file/upload.php', {'adminfiles':true},
null, null, browser.refresh, browser.fileexists);
browser.changedircallback = uploader.updatedestination;
......
......@@ -15,6 +15,7 @@
<div id='uploader'></div>
<table id='filebrowser' style='display: none;'>
<thead><tr>
<th></th>
<th>{str section=artefact.file tag=name}</th>
<th>{str section=artefact.file tag=description}</th>
<th>{str section=artefact.file tag=size}</th>
......
......@@ -18,10 +18,10 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
this.actionname = actionname;
this.canmodify = !actionname;
this.filenames = {};
this.deletescript = 'delete.json.php';
this.createfolderscript = 'createfolder.json.php';
this.updatemetadatascript = 'updatemetadata.json.php';
this.downloadscript = 'download.php';
this.deletescript = config.wwwroot+'artefact/file/delete.json.php';
this.createfolderscript = config.wwwroot+'artefact/file/createfolder.json.php';
this.updatemetadatascript = config.wwwroot+'artefact/file/updatemetadata.json.php';
this.downloadscript = config.wwwroot+'artefact/file/download.php';
if (this.actionname) {
this.lastcolumnfunc = function(r) {
......@@ -73,6 +73,7 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
self.element,
self.source,
[
function (r) { return TD(null, self.icon(r.artefacttype)); },
self.formatname,
'description',
function (r) { return TD(null, (r.artefacttype != 'folder') ? self.showsize(r.size) : null); },
......@@ -202,7 +203,7 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
this.showsize = function(bytes) {
if (bytes < 1024) {
return bytes + 'b';
return bytes + (bytes > 0 ? 'b' : '');
}
if (bytes < 1048576) {
return Math.floor((bytes / 1024) * 10 + 0.5) / 10 + 'k';
......@@ -210,6 +211,10 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
return Math.floor((bytes / 1048576) * 10 + 0.5) / 10 + 'M';
}
this.icon = function (type) {
return IMG({'src':config.themeurl+type+'.gif'});
}
this.formatname = function(r) {
self.filenames[r.title] = true;
if (r.artefacttype == 'folder') {
......
......@@ -10,6 +10,7 @@
<div id="uploader"></div>
<table id="filelist" class="tablerenderer">
<thead><tr>
<th></th>
<th>{str tag=name section=artefact.file}</th>
<th>{str tag=description section=artefact.file}</th>
<th>{str tag=size section=artefact.file}</th>
......
......@@ -44,16 +44,10 @@ h5, h6 {
font-size: 18px;
margin: 0;
}
acronym {
color: #474220;
border-bottom: 1px dotted #d4d1c0;
cursor: help;
}
form {
margin: 0;
}
<<<<<<< master
input {
border: 1px solid #d4d1c0;
......@@ -65,15 +59,6 @@ select {
}
input[type="radio"] {
border: none;
=======
/** Note: tables layed out with the 'maharatable' renderer now have class="maharatable",
* so they can be styled differently */
/*form .maharatable th {
padding-top: 10px;
}*/
input, select, textarea {
border: 1px solid #b0bf64;
>>>>>>> origin
}
/*input[type="submit"], input[type="button"] {
......@@ -184,29 +169,6 @@ label {
.required td {
color: #000000;
}
fieldset {
border: 1px solid #b0bf64;
}
fieldset.collapsed legend, fieldset.collapsed legend * {
display: inline;
}
fieldset.collapsed {
border-color: #b0bf64 transparent transparent;
}
fieldset.collapsed * {
display: none;
}
legend a:focus {
outline: none
}
.resizable-textarea .grippie {
background: #eee url(../images/grippie.png) no-repeat scroll 100%;
border: 1px solid #ddd;
border-top-width: 0;
cursor: s-resize;
height: 14px;
}
.center {
text-align: center;
......@@ -232,13 +194,6 @@ legend a:focus {
#header {
background: #FFFFFF url(../images/header_corner_topleft.gif) no-repeat top left;
}
<<<<<<< master
=======
#logo {
padding: 10px;
}
>>>>>>> origin
#topwrapper ul,
#topwrapper li {
padding: 0;
......@@ -294,15 +249,14 @@ legend a:focus {
}
/* GLOBAL NAVIGATION TABS END */
<<<<<<< master
#logo {
padding: 10px;
}
/* search box in header */
=======
>>>>>>> origin
.searchbox {
font-size: 11px;
font-weight: bold;
color: #497424;
margin: 18px 5px 0 0;
text-align: right;
......@@ -315,18 +269,15 @@ legend a:focus {
text-align: right;
vertical-align: middle;
}
<<<<<<< master
#searchform_query_container, #searchform_submit_container {
vertical-align: middle;
}
=======
>>>>>>> origin
#searchform_query_container input {
border: 1px solid #b0bf64;
padding: 4px;
color: #777777;
width: 183px;
}
<<<<<<< master
.searchbox .advancedsearch {
font-size: 9px;
padding: 0 148px 0 0;
......@@ -336,9 +287,6 @@ legend a:focus {
/* logged in message in header */
#loggedinstring {
text-align: right;
=======
.searchbox .advancedsearch {
>>>>>>> origin
font-size: 9px;
padding: 15px 0 0 0px;
color: #474220;
......@@ -362,11 +310,7 @@ legend a:focus {
/* MAIN NAVIGATION BEGIN */
#mainnav {
<<<<<<< master
padding: 8px 0 0 5px;
=======
padding: 8px 0 0;
>>>>>>> origin
margin: 0;
background: url(../images/navbg_left.gif) repeat-x;
height: 32px;
......@@ -406,11 +350,7 @@ legend a:focus {
/* SUB NAVIGATION BEGINS */
#subnav {
<<<<<<< master
padding: 6px 0 0 20px;
=======
padding: 6px 0 0;
>>>>>>> origin
margin: 0;
font-size: 11px;
font-weight: bold;
......@@ -419,7 +359,6 @@ legend a:focus {
height: 25px;
text-transform: capitalize;
}
<<<<<<< master
.subnavright {
float: right;
margin: -6px 0 0 0;
......@@ -431,10 +370,6 @@ legend a:focus {
#subnav li a:link,
#subnav li a:visited,
#subnav li a:active {
=======
#subnav li a {
>>>>>>> origin
color: #FFF;
}
#subnav li a:hover {
......@@ -472,29 +407,7 @@ div.sidebar {
color: #FFF;
font-weight: bold;
}
<<<<<<< master
=======
.sidebarforgotpassword {
padding: 10px 5px 5px 10px;
background: #FFFFFF url(../images/sidebox_topwhite.gif) no-repeat top;
}
.sidebarforgotpassword a {
background: url(../images/icon_question.gif) no-repeat left;
padding-left: 17px;
color: #547c22;
text-decoration: none;
font-weight: bold;
}
.sidebarforgotpassword a:hover {
color: #819f18;
text-decoration: underline;
}
#column-right .sidebarforgotpassword-botcorners {
margin-bottom: 7px;
}
>>>>>>> origin
/* SITE MENU BEGINS */
#sitemenu {
margin: 20px 0 0 -10px;
......@@ -570,15 +483,10 @@ div.sidebar {
padding: 2px;
width: 200px;
}
<<<<<<< master
#column-right #login a,
#column-right #login a:link,
#column-right #login a:active,
#column-right #login a:visited {
=======
#column-right #login a {
>>>>>>> origin
color: #547c22;
font-size: 9px;
text-decoration: none;
......@@ -633,7 +541,6 @@ div.sidebar {
float: left;
}
<<<<<<< master
.content textarea {
width: 450px;
}
......@@ -643,70 +550,25 @@ div.sidebar {
/* system messages between nav and main content */
=======
>>>>>>> origin
#messages {
margin: 0 3px 3px 3px;
}
#messages .ok {
color: #547c22;
<<<<<<< master
background: #d2e29b url(../images/icon_goodtogo.gif) no-repeat left;
padding: 3px 3px 3px 17px;
=======
background: #d2e29b url(../images/icon_goodtogo.gif) no-repeat 1px;
padding: 3px 3px 3px 19px;
border: 1px solid #a2e26b;
>>>>>>> origin
}
#messages .error {
color: #dd0221;
<<<<<<< master
background: #ffd3d9 url(../images/icon_problem.gif) no-repeat left;
padding: 3px 3px 3px 17px;
=======
background: #ffd3d9 url(../images/icon_problem.gif) no-repeat 1px;
padding: 3px 3px 3px 19px;
border: 1px solid #ffa3a9;
>>>>>>> origin
}
#messages .info {
color: #1666a9;
<<<<<<< master
background: #b8c9cf url(../images/icon_question.gif) no-repeat left;
padding: 3px 3px 3px 17px;
=======
background: #b8c9cf url(../images/icon_question.gif) no-repeat 1px;
padding: 3px 3px 3px 19px;
border: 1px solid #8899cf;
>>>>>>> origin
}
<<<<<<< master
=======
/* NOTE: these next two rules should be merged */
.addicon {
background: url(../images/icon_add.gif) no-repeat top left;
padding: 0 3px 3px 19px;
border: none;
margin: 5px 0;
}
.content a {
color: #547c22;
text-decoration: none;
border-bottom: 1px dotted #547c22;
}
.content a:hover {
color: #819f18;
text-decoration: none;
border-bottom: 1px solid #819f18;
}
.content .mceEditor a {
border-bottom: none;
}
>>>>>>> origin
/* inner white corners around main content begin */
.box-cnrs {
......@@ -784,7 +646,6 @@ p {
padding: 0;
}
<<<<<<< master
.maincontent table {
width: 100%;
margin: 5px 0 5px 0;
......@@ -837,14 +698,8 @@ p {
}
.maincontent td {
padding: 3px 5px;
=======
tbody {
color: #000;
padding: 2px 4px;
>>>>>>> origin
margin: 0;
}
<<<<<<< master
/* No need padding td */
.maincontent #profileform td,
.maincontent #editpost td,
......@@ -854,26 +709,10 @@ tbody {
.maincontent #editgroup td,
.maincontent #createview1 td,
.maincontent #accountprefs td {
=======
td {
>>>>>>> origin
padding: 0;
margin: 0;
}
<<<<<<< master
=======
th {
text-align: left;
color: #3a5813;
vertical-align: top;
margin: 0;
padding: 2px 4px;
}
thead th {
background-color: #e5e8da;
}
>>>>>>> origin
/* Within table Navigation Styles Begin */
.maincontent thead tr td,
......@@ -900,15 +739,11 @@ thead th {
}
/* Within Table Navigation Styles End */
<<<<<<< master
acronym {
color: #474220;
border-bottom: 1px dotted #d4d1c0;
cursor: help;
}
=======
>>>>>>> origin
.help {
font-size: 9px;
vertical-align: super;
......@@ -921,7 +756,7 @@ acronym {
padding-bottom: 5px;
}
.error {
border-color: #ff6666;
color: #cf0000;
}
.errmsg {
color: #cf0000;
......@@ -942,9 +777,6 @@ table#installer {
#msgscol {
width: 50%;
}
.msgscol pre {
overflow: auto;
}
#accountprefs table #accountprefs_password2 {
margin: 0 0 20px 0;
......@@ -954,36 +786,9 @@ table#installer {
padding: 0;
}
<<<<<<< master
/* Register styles */
#register_tandc_container label {
font-weight: normal;
=======
/*
*
* Just about every rule below this point needs to be audited properly
* A lot of them can be removed with generic form styling (widths, margins and padding, colours)
*
*
*
*
*
*
*/
/** This needs to be done better. Namely, all tablerenderer tables should get a class */
#activitylist,
#adminstitutionslist,
#menuitemlist table,
/*#bloglist,*/
/*#postlist,*/
/*#filelist,*/
.tablerenderer {
margin: 10px 0 0 0;
width: 100%;
>>>>>>> origin
}
.tablerenderer tbody td {
padding: 0 5px;
}
......@@ -1015,7 +820,6 @@ table#installer {
font-size: 9px;
}
<<<<<<< master
/* My Blogs styles */
#myblogs .newblog,
#myblogs .newpost {
......@@ -1047,15 +851,6 @@ table#installer {
padding: 4px 34px 7px 36px;
}
.maincontent #editblog table {
=======
/** Ditto here */
#contactus th,
#staffusers th,
#adminusers th,
/*#siteoptions th,*/
#editsitepage th/*,*/
/*#editgroup th */{
>>>>>>> origin
padding: 10px 0 0 0;
border-top: 1px solid #d4d1c0;
}
......@@ -1067,7 +862,6 @@ table#installer {
color: #000000;
}
<<<<<<< master
/* My Groups styles */
.maincontent #mygroups #addnewgroupdiv {
......@@ -1085,26 +879,10 @@ table#installer {
color: #eef7d4;
font-weight: bold;
padding: 4px 43px 7px 43px;
=======
/*
#siteoptions th {
margin: 10px 0 0 0;
padding: 12px 0 3px 0;
>>>>>>> origin
}
<<<<<<< master
}
.maincontent #creategroup #creategroup_description_header th,
.maincontent #creategroup #creategroup_members_header th {
padding: 15px 0 0 0;
=======
*/
#typeheader {
color: #819f18;
font-size: 14px;
padding: 10px 0 0 0;
margin: 0;
>>>>>>> origin
}
.maincontent #creategroup table tr td table,
.maincontent #editgroup table tr td table {
......@@ -1112,7 +890,6 @@ table#installer {
padding: 0;
background: #e5e8da;
}
<<<<<<< master
.maincontent #creategroup table tr td table td,
.maincontent #editgroup table tr td table td {
padding: 0 5px 5px 5px;
......@@ -1129,19 +906,7 @@ table#installer {
.maincontent .addcommunitylink {
margin: 10px 0 10px 0;
text-align: right;
=======
/*#grouplist {
margin: 10px 0 0 0;
padding: 0;
width: 100%;
}*/
#activityprefs th {
padding: 5px 5px 5px 5px;
>>>>>>> origin
}
<<<<<<< master
.maincontent .addcommunitylink a,
.maincontent .addcommunitylink a:link,
.maincontent .addcommunitylink a:active,
......@@ -1157,52 +922,11 @@ table#installer {
.maincontent #memberlist tbody td,
.maincontent #communitylist tbody td {
padding: 2px 5px;
=======
/*#grouplist tbody td,*/
#adminstitutionslist tbody td,
#menuitemlist tbody td
/*#bloglist tbody td*/{
padding: 0 5px 0 5px;
}
/** These ones seem to push some pages down and right just a little bit.
* I think these should disappear. If the pages really need to be pushed
* down and left, put a style on the maincontent div to make it uniform */
#activityprefs,
#institution,
#search,
#results #searchresults,
#register,
#forgotpass,
#staffusers,
#adminusers,
/*#createview1,*/
#uploadcsv,
#newpost,
/*#newblog,*/
/*#mygroups,*/
/*#myfiles,*/
#mywatchlist,
#recentactivity,
/*#myblogs,*/
#editmenus,
/*#editgroup,*/
/*#createview2*/ {
margin: 10px 0 0 15px;
>>>>>>> origin
}
<<<<<<< master
#userview #userview_profile th {
background-color: #e5e8da;
padding: 2px 5px;
=======
#institution th {
padding: 10px 0 0 0;
>>>>>>> origin
}
<<<<<<< master
#userview #userview_profile td {
background-color: #f5f7ee;
padding: 2px 5px;
......@@ -1235,24 +959,6 @@ table#installer {