Commit 313dc746 authored by Siddhant Sanyam's avatar Siddhant Sanyam

Merge branch 'master' of https://git.erp5.org/repos/ung

parents c196ee0d d5106b72
/*
Document : table
Created on : 16 juin 2011, 15:37:09
Author : floz
Description:
Purpose of the stylesheet follows.
*/
/*
TODO customize this sample style
Syntax recommendation http://www.w3.org/TR/REC-CSS2/
*/
root {
display: block;
}
......@@ -9,6 +9,12 @@ body {
font-weight:normal;
overflow-x: hidden;
}
/* widget fields */
fieldset.widget {
border: 0 none;
}
/* hide legends */
div.field label, span.headline, a.listbox_title, div.actions, div.actions,
legend.group_title, fieldset.left {
......@@ -102,13 +108,25 @@ a#left_message, a#right_message {
/* header */
iframe#svgframe, fieldset.widget {
border: 0 none;
div.header {
height: 3.5em;
width: 100%;
}
div#wrapper_header {
width: 100%;
height: 100%;
display: inline-block;
}
/* left */
div.header-left {
margin-left: 1px;
margin-top: -4px;
min-width: 32em;
width: 40%;
position: absolute;
}
div.header-left h2 {
font-size: 14pt;
}
/* logo UNG */
a#loading_message {
......@@ -120,16 +138,102 @@ div.logo-area {
}
a.ung_docs img {
border:0 none;
left:-7px;
position:relative;
top:9px;
}
/* document title & state */
div#wrapper_header div.field a[name="document_title"] {
color: #060605;
padding-left: 1em;
padding-right: 1em;
text-decoration: none;
}
div#wrapper_header div.field a[name="document_title"], div#wrapper_header div.field a[name="document_state"] {
font-size: 15px;
margin-left: 22px;
}
div#wrapper_header div.field a[name="document_title"]:hover {
background: none repeat scroll 0 0 #FFFFD6;
border: 1px solid #AAAAAA;
}
/* right */
div.header-right{
margin-right: 10em;
position: relative;
float: right;
}
div.header-right fieldset.widget {
padding: 0;
}
/* last modification & author */
div.header-right div.input {
margin-top: 1em;
}
div.header-right div.input div{
float: right;
position: relative;
}
div.header-right div.input a {
color: #A7A2A2;
font-size: 13px;
}
.action_menu {
float:right;
position: absolute;
margin-left: 3em;
z-index: 200;
}
.action_menu ul {
padding: 0;
}
.action_menu ul li {
list-style: none inside none;
}
.action_menu a#change_state {
background-image: url("../images/ung/button_background.png");
border: 1px solid #D1D1D1;
color: #333333;
padding: 2px;
}
.action_menu ul#change_state_list>li:hover {
color: #000000;
text-decoration: none;
cursor:pointer;
margin-right: -3em;
}
.action_menu li:hover ul {
display: block;
}
.action_menu ul li ul {
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #D1D1D1;
display: none;
}
.action_menu ul li ul hover {
display: block;
}
.action_menu ul li ul li:hover {
background: none repeat scroll 0 0 #F3F3F3;
}
.action_menu ul li ul li {
text-align: center;
}
.action_menu ul li ul li h6 {
color: #333333;
font-size: 12px;
font-weight: lighter;
padding: 0.5em;
margin: 0;
}
/* main */
div.main {
height: auto;
margin-top: 0.5em;
}
/***************** UNG main page ********************/
/* left */
div.main-left {
border-right: 4px solid #BBCCFF;
......@@ -415,3 +519,139 @@ div.listbox-content a img, div.main-content a img {
border: 0 none;
}
/**********************************************************
******************* editor page ***********************/
/* content */
div.content {
/*background: none repeat scroll 0 0 #DAE6F6;*/
width:100%;
border-bottom: 4px solid #BBCCFF;
border-top: 4px solid #BBCCFF;
}
fieldset.bottom {
border: 0 none;
width:100%;
list-style: none outside none;
padding: 0;
position: relative;
}
/* SVG-edit */
iframe#svgframe {
width: 100%;
border: 0 none;
overflow: hidden;
}
/**********************************************************
******************* login page ************************/
/* welcome message */
div#advertisement b {
font-size: 12px;
}
div#advertisement img{
position: absolute;
margin-top: 3em;
height: 10em;
}
/* login table */
table#field_table, table#new-account-table, table#create-new-user {
border: 1px solid #C3D9FF;
width: 78%;
}
table#field_table tbody, table#new-account-table tbody, table#create-new-user tbody {
background: none repeat scroll 0 0 #E8EEFA;
}
table#field_table tbody label {
float: right;
font-size: 10pt;
white-space: nowrap;
}
/* new user table */
table#create-new-user {
display: none;
margin-top: -22px;
}
table#new-account-table table td, table#create-new-user td {
font-size: 10pt;
}
td#form-message {
color: #EC1D1D;
display: none;
}
form#create-user table tbody tr:last-child td a{
color: #2200CC;
cursor: pointer;
font-size: 8pt;
text-decoration: underline;
}
/* new account "button" */
td#new-account-form {
color: #0000CC;
cursor: pointer;
font-weight: bold;
text-decoration: underline;
}
/* footer */
div.footer {
font-size: 10pt;
margin-top: 40px;
text-align: center;
}
div.footer a {
margin-left: 0.5em;
margin-right: 0.5em;
}
/**********************************************************
******************* dialog box ************************/
div.ui-dialog {
background: none repeat scroll 0 0 #C1D9FF;
}
fieldset#edit_document {
border: 0 none;
height: 72px;
margin-left: -1em;
margin-top: -0.5em;
width: 379px;
}
div.ui-dialog-titlebar {
background: none repeat scroll 0 0 #E0EDFE;
border: 0 none;
border-radius: 1px 1px 1px 1px;
height: 15px;
}
div.ui-dialog-titlebar {
height: 15px;
}
span#ui-dialog-title-edit_document, span#ui-dialog-title-upload_document, span#ui-dialog-title-gadget-listbox {
color: #222222 !important;
font: bold 12pt Arial,Sans-serif;
margin-left: -8px;
margin-top: -3px;
}
div#edit_document.ui-dialog-content {
background-color: #FFFFFF;
}
div#edit_document {
height: 80px;
overflow: hidden;
width: 368px;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: none !important;
height: 21px;
margin-top: -10px;
width: 104px;
}
.ui-dialog .ui-dialog-buttonpane button {
margin: 0 0.4em 0.5em 0 !important;
}
.ui-button .ui-button-text {
line-height: 1em !important;
}
.ui-button-text-only .ui-button-text {
padding: 0.2em 0.3em !important;
}
span.ui-button-text {
font-size: 12px;
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<script text="javascript"> function reloc(url) {window.location = url;}</script>
<script type="text/javascript"> function reloc(url) {window.location = url;}</script>
</head>
<body onload="reloc('ung.html');">
......
......@@ -38,6 +38,7 @@ var JSONIllustrationDocument = function() {
JSONIllustrationDocument.prototype = new JSONDocument();//inherits methods from JSONDocument
JSONIllustrationDocument.prototype.saveEdition = function(content) {
this.setLastUser(getCurrentUser());
this.setContent(content);
this.setLastModification(currentTime());
this.setAsCurrentDocument();
......@@ -46,7 +47,7 @@ JSONIllustrationDocument.prototype.setAsCurrentDocument = function() {
getCurrentPage().displayDocumentTitle(this);
getCurrentPage().displayDocumentState(this);
getCurrentPage().displayDocumentContent(this);
getCurrentPage().displayAuthorName(this);
getCurrentPage().displayLastUserName(this);
getCurrentPage().displayLastModification(this);
setCurrentDocument(this);
}
......
......@@ -37,6 +37,7 @@ JSONSheetDocument.prototype.load({
//save process
saveEdition: function(content) {
this.setLastUser(getCurrentUser());
this.setContent(content);
this.setLastModification(currentTime());
this.setAsCurrentDocument();
......@@ -47,7 +48,7 @@ JSONSheetDocument.prototype.load({
getCurrentPage().displayDocumentTitle(this);
//getCurrentPage().displayDocumentContent(this);
getCurrentPage().displayDocumentState(this);
getCurrentPage().displayAuthorName(this);
getCurrentPage().displayLastUserName(this);
getCurrentPage().displayLastModification(this);
setCurrentDocument(this);
}
......
......@@ -45,6 +45,7 @@ var JSONTextDocument = function() {
JSONTextDocument.prototype = new JSONDocument();//inherits methods from JSONDocument
JSONTextDocument.prototype.saveEdition = function(content) {
this.setLastUser(getCurrentUser());
this.setContent(content);
this.setLastModification(currentTime());
this.setAsCurrentDocument();
......@@ -53,7 +54,7 @@ JSONTextDocument.prototype.setAsCurrentDocument = function() {
getCurrentPage().displayDocumentTitle(this);
getCurrentPage().displayDocumentState(this);
getCurrentPage().displayDocumentContent(this);
getCurrentPage().displayAuthorName(this);
getCurrentPage().displayLastUserName(this);
getCurrentPage().displayLastModification(this);
setCurrentDocument(this);
}
......
......@@ -61,7 +61,6 @@ Page.prototype = {
case "text-editor":
editor = new Xinha();
doc=new JSONTextDocument();
saveAdresse = "dav/temp.json";
break;
case "table-editor":
editor = new SheetEditor();
......@@ -70,7 +69,6 @@ Page.prototype = {
case "image-editor":
editor = new SVGEditor();
doc=new JSONIllustrationDocument();
saveAdresse = "dav/temp2.json";
break;
default://renvoie à la page d'accueil
window.location = "ung.html";
......@@ -125,7 +123,7 @@ Page.prototype = {
displayUserName: function(user) {$("a#userName").html(user.getName());},
//document information
displayAuthorName: function(doc) {$("a#author").html(doc.getAuthor());},
displayLastUserName: function(doc) {$("a#author").html(doc.getAuthor());},
displayLastModification: function(doc) {$("a#last_update").html(doc.getLastModification());},
displayDocumentTitle: function(doc) {$("a#document_title").html(doc.getTitle());},
displayDocumentContent: function(doc) {this.getEditor().loadContentFromDocument(doc);},
......@@ -144,7 +142,7 @@ setCurrentPage = function(page) {currentPage = page;}
*/
var User = function(details) {
this.name = "unknown";
this.language = "fr";
this.language = "en";
this.storage = "http://www.unhosted-dav.com";
this.identityProvider = "http://www.webfinger.com";
this.displayPreferences = 15;//number of displayed document in the list
......@@ -190,6 +188,7 @@ var JSONDocument = function() {
this.version = null;
this.author=getCurrentUser().getName();
this.lastUser=getCurrentUser().getName();
this.title="Untitled";
this.content="";
this.creation=currentTime();
......@@ -201,6 +200,7 @@ JSONDocument.prototype = new UngObject();//inherits from UngObject
JSONDocument.prototype.load({//add methods thanks to the UngObject.load method
//type
getType: function() {return this.type;},
setType: function(newType) {this.type = newType;},
//version
getVersion: function() {return this.version;},
......@@ -221,6 +221,8 @@ JSONDocument.prototype.load({//add methods thanks to the UngObject.load method
//author
getAuthor:function() {return this.author;},
setAuthor:function(userName) {this.author=userName;},
getLastUser:function() {return this.lastUser;},
setLastUser:function(user) {this.lastUser = user;},
//dates
getCreation:function() {return this.creation;},
......@@ -235,7 +237,10 @@ JSONDocument.prototype.load({//add methods thanks to the UngObject.load method
setCurrentDocument(this);
},
save: function() {}
save: function(instruction) {
var doc = this;
saveFile(getDocumentAddress(this), doc, instruction);
}
});
JSONDocument.prototype.states = {
draft:{"fr":"Brouillon","en":"Draft"},
......@@ -248,21 +253,20 @@ getCurrentDocument = function() {
return doc;
}
setCurrentDocument = function(doc) {localStorage.setItem("currentDocument",JSON.stringify(doc));}
getDocumentList = function() {
var list = new DocumentList();
list.load(JSON.parse(localStorage.getItem("documentList")));
return list;
}
setDocumentList = function(list) {localStorage.setItem("documentList",JSON.stringify(list));}
supportedDocuments = {"text":{editorPage:"text-editor",icon:"images/icons/document.png"},
"illustration":{editorPage:"image-editor",icon:"images/icons/svg.png"},
"table":{editorPage:"table-editor",icon:"images/icons/table.png"},
"other":{editorPage:null,icon:"images/icons/other.gif"},
undefined:{editorPage:null,icon:"images/icons/other.gif"}
}
getDocumentAddress = function(doc) {return "dav/"+doc.getCreation();}
/*
* actions
/*************************************************
****************** actions ******************
*************************************************/
/**
* open a dialog box to edit document information
*/
editDocumentSettings = function() {
loadFile("xml/xmlElements.xml", "html", function(data) {
......@@ -277,6 +281,7 @@ editDocumentSettings = function() {
doc.setTitle($(this).find("#name").attr("value"));
doc.setLanguage($(getCurrentDocument()).find("#language").attr("value"));
doc.setVersion($(getCurrentDocument()).find("#version").attr("value"));
saveCurrentDocument();
doc.setAsCurrentDocument();//diplay modifications
$(this).dialog("close");
},
......@@ -290,11 +295,31 @@ editDocumentSettings = function() {
saveCurrentDocument = function() {
getCurrentPage().getEditor().saveEdition();
saveXHR(saveAdresse);
//saveJIO(); : JIO function
getCurrentDocument().save();
}
changeLanguage = function(language) {
/**
* start an editor to edit the document
* @param doc : the document to edit
*/
var startDocumentEdition = function(doc) {
loadFile(getDocumentAddress(doc),"json",function(data) {
doc.load(data);
setCurrentDocument(doc);
if(supportedDocuments[doc.getType()].editorPage) {window.location = "theme.html";}
else alert("no editor available for this document");
});
}
var stopDocumentEdition = function() {
saveCurrentDocument();
window.location = "ung.html";
}
/**
* change the language of the user and reload the web page
* @param language : the new language
*/
var changeLanguage = function(language) {
var user = getCurrentUser();
user.setLanguage(language);
setCurrentUser(user);
......
......@@ -45,7 +45,12 @@ var List = function(arg) {
List.prototype = new UngObject();
List.prototype.load ({
size: function() {return this.length;},
add: function(element) {this.content[this.size()]=element; this.length++;},
put: function(key,value) {
if(!this.content[key]) {this.length=this.length+1;}
alert(""+this.length+this.content[key]);
this.content[key]=value;
},
add: function(element) {this.put(this.size(),element);},
get: function(i) {return this.content[i];},
concat: function(list) {while(!list.isEmpty()) {this.add(list.pop())}},
remove: function(i) {delete this.content[i];this.length--;},
......@@ -56,9 +61,22 @@ List.prototype.load ({
var element = this.get(this.size()-1);
this.remove(this.size()-1);
return element;
}
},
recursiveCall: function(instruction) {
var list = new List();
list.load(this);
if(list.isEmpty()) {return false;}
var result = instruction(list.pop());
return result ? result : list.recursiveCall(instruction);
},
find: function(object) {
for(var i = 0; i<this.length; i++) {if(this.get(i)===object) {return i;}}
return -1;
},
contains: function(object) { return (find(object)!=-1); }
});
/**
* returns the current date
*/
......@@ -82,35 +100,37 @@ saveXHR = function(address) {
});
};
/**
* load a public file with a basic ajax request
* @param address : the address of the document
* @param type : the type of the document content
* @param instruction : a function to execute when getting the document
*/
loadFile = function(address, type, instruction) {
$.ajax({
url: address,
type: "GET",
dataType: type,
success: instruction
success: instruction,
error: function(type) {t=type;alert("er");}
});
}
// load methode, used for testing
//(Francois)
loadTest = function(address) {
// save
saveFile = function(address, content, instruction) {
$.ajax({
url: address,
type: "GET",
type: "PUT",
dataType: "json",
/*headers: {
Authorization: "Basic "+"nom:test"},
fields: {
withCredentials: "true"
},*/
success: function(data){
var list = getDocumentList();
var doc = new JSONDocument();
doc.load(data);
list.add(doc);
data: JSON.stringify(content),
headers: { Authorization: "Basic "+btoa("smik:asdf")},
fields: { withCredentials: "true" },
success: instruction,
error: function(type) {
if(type.status==201) {instruction();}//ajax thinks that 201 is an error...
}
});
}
};
// load
loadXHR = function(address) {
......@@ -164,8 +184,11 @@ tryUntilSucceed = function(func) {
}
/**
* Resize the right part of ung
* Resize the right part of ung main page
* could be developed to implement more beautiful resizments
*/
var resize = function() {
$("div.main-right").width($(window).width()-$("div.main-left").width());
}
......@@ -2,41 +2,102 @@
* This file provides the javascript used to display the list of user's documents
*/
/* global variable */
/* the last modified document */
getCurrentDocumentID = function() {return localStorage.getItem("currentDocumentID");}
setCurrentDocumentID = function(ID) {return localStorage.setItem("currentDocumentID",ID);}
/**
* class DocumentList
* This class provides methods to manipulate the list of documents of the current user
*/
var DocumentList = function() {List.call(this);}
var DocumentList = function() {
List.call(this);
this.displayedPage = 1;
this.selectionList = new List();
}
DocumentList.prototype = new List();
DocumentList.prototype.load({
/* override : returns the ith document */
get: function(i) {
var doc = new JSONDocument();
doc.load(this.content[i]);
return doc;
},
add: function(doc) {
this.content[this.size()]=doc;
this.length++;
setDocumentList(this)
/* override : put an element at the specified position */
put: function(i, doc) {
this.content[i]=doc;
if(!this.content[i]) {this.length++;}
setDocumentList(this);
},
display: function() {
var n = getDocumentList().size();
getSelectionList: function() {
var list = new List();
list.load(this.selectionList);
return list;
},
resetSelectionList: function() {
this.selectionList = new List();
for(var i=0; i<this.length; i++) {
$("tr td.listbox-table-select-cell input#"+i).attr("checked",false);
}
setDocumentList(this);
},
checkAll: function() {
for(var i=0; i<this.length; i++) {
this.selectionList.put(i,this.get(i));
$("tr td.listbox-table-select-cell input#"+this.get(i).getID()).attr("checked",true);
}
setDocumentList(this);
},
getDisplayedPage: function() {return this.displayedPage;},
setDisplayedPage: function(index) {this.displayedPage = index;},
/* display the list of documents in the web page */
displayContent: function() {
var n = this.size();
for(var i=0;i<n;i++) {
var ligne = new Line(getDocumentList().get(i),0);
var ligne = new Line(this.get(i),i);
ligne.updateHTML();
ligne.display();
}
},
displayListInformation: function() {
if(this.size()>0) {
$("div.listbox-number-of-records").css("display","inline");
var step = getCurrentUser().getDisplayPreferences();
var first = (this.getDisplayedPage()-1)*step + 1;
var last = (this.size()<first+step) ? this.size() : first+step-1;
$("span#page_start_number").html(first);
$("span#page_stop_number").html(last);
$("span#total_row_number a").html(this.size());
$("span#selected_row_number a").html(this.getSelectionList().size());
}
})
/* initialize the list */
//current lines are just for testing
setDocumentList(new List());
loadTest("dav/temp.json");
loadTest("dav/temp2.json");
getDocumentList().add(new JSONDocument());
else {$("div.listbox-number-of-records").css("display","none");}
},
display: function() {
this.displayContent();
this.displayListInformation();
},
/* update the ith document information */
update: function(i) {
var line = this;
var doc = line.get(i);
loadFile(getDocumentAddress(doc),"json",function(data) {
doc.load(data);//todo : replace by data.header
doc.setContent("");//
line.put(i,doc);
});
}
});
getDocumentList = function() {
var list = new DocumentList();
list.load(JSON.parse(localStorage.getItem("documentList")));
return list;
}
setDocumentList = function(list) {localStorage.setItem("documentList",JSON.stringify(list));}
/**
......@@ -56,16 +117,38 @@ Line.prototype = {
getHTML: function() {return this.html;},
setHTML: function(newHTML) {this.html = newHTML;},
isSelected: function() {
return $("tr td.listbox-table-select-cell input#"+this.ID).attr("checked");
return $("tr td.listbox-table-select-cell input#"+this.getID()).attr("checked");
},
addToSelection: function() {
var list = getDocumentList();
list.getSelectionList().put(this.getID(),this);
setDocumentList(list);
},
removeFromSelection: function() {
var list = getDocumentList();
list.getSelectionList().remove(this.getID());
setDocumentList(list);
},
changeState: function() {
this.isSelected() ? this.addToSelection() : this.removeFromSelection();
test = getDocumentList().getSelectionList();
$("span#selected_row_number a").html(getDocumentList().getSelectionList().size());
},
/* load the document information in the html of a default line */
updateHTML: function() {
var line = this;
this.setHTML($(this.getHTML()).attr("class",this.getType())
.find("td.listbox-table-select-cell input").attr("id",this.getID()).end()//ID
.find("td.listbox-table-select-cell input")
.attr("id",this.getID())//ID
.click(function() {line.changeState();})//clic on a checkbox
.end()
.find("td.listbox-table-data-cell")
.click(function() {line.startEdition(line.getDocument())})//clic
.click(function() {//clic on a line
setCurrentDocumentID(line.getID());
startDocumentEdition(line.getDocument())
})
.find("a.listbox-document-icon")
.find("img")
.attr("src",supportedDocuments[this.getType()].icon)//icon
......@@ -77,14 +160,7 @@ Line.prototype = {
.end());
},
/* add the line in the table */
display: function() {$("table.listbox tbody").append($(this.getHTML()));},
/* edit the document if clicked */
startEdition: function(doc) {
setCurrentDocument(doc);
if(supportedDocuments[doc.getType()].editorPage) {window.location = "theme.html";}
else alert("no editor available for this document");
}
display: function() {$("table.listbox tbody").append($(this.getHTML()));}
}
/* load the html code of a default line */
Line.loadHTML = function() {
......@@ -93,3 +169,22 @@ Line.loadHTML = function() {
}
/* return the html code of a default line */
Line.getOriginalHTML = function() {return Line.originalHTML;}
/**
* create a new document and start an editor to edit it
* @param type : the type of the document to create
*/
var createNewDocument = function(type) {
var newDocument = new JSONDocument();
newDocument.setType(type);
newDocument.save(function() {
getDocumentList().add(newDocument);
startDocumentEdition(newDocument);
});
}
var deleteSelectedDocuments = function() {
}
\ No newline at end of file
......@@ -2,7 +2,6 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
......@@ -20,9 +19,9 @@
<!-- jquery -->
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui.js"></script>
<!--<script type="text/javascript" src="js/jquery/jq.js"></script>-->
<link rel="stylesheet" type="text/css" href="css/theme.css" />
<link type="text/css" rel="stylesheet" href="css/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="css/ung.css" />
<script type="text/javascript" src="js/base64.js"></script>
<script type="text/javascript" src="js/tools.js"></script>
......@@ -50,10 +49,6 @@
</head>
<body>
<form id="main_form" class="main_form"
onsubmit="changed=false; return true"
action="javascript:saveCurrentDocument()"
method="post">
<div class="container">
<div class="navigation">
......@@ -72,7 +67,7 @@
<div class="input"><div >
<a class="email" href="ung/mail.html" lang="en">Email</a>
<a class="document" href="#" onclick="javascript:window.location.reload()" lang="en">Documents</a>
<a class="document" href="#" onclick="stopDocumentEdition()" lang="en">Documents</a>
<a class="calendar" href="ung/calendar.html" lang="en">Calendar</a>
</div></div>
......@@ -144,7 +139,7 @@
<label>search_bar</label>
<div class="input"><div >
<a class="ung_docs" href="ung.html">
<a class="ung_docs" href="#" onclick="stopDocumentEdition()">
<img src="images/ung/ung-logo.gif" alt="logo"/>
</a>
......@@ -172,11 +167,11 @@
<a id="last_update">Updated ... by</a>
<a id="author">Unknown</a>
<button type="submit">Save</button>
<button type="button" onclick="javascript:saveCurrentDocument()">Save</button>
<div class="action_menu">
<ul><li>
<ul id="change_state_list"><li>
<a id="change_state">
<span>Change state</span>
<img src="images/ung/arrow.png" alt=">"/>
......@@ -248,6 +243,5 @@
</div>
</div>
</div>
</form>
</body>
</html>
......@@ -32,15 +32,18 @@
<script type="text/javascript">
var initUser = function() {
var user = getCurrentUser();
if(!user) { user = new User();}
user.setAsCurrentUser();
}
var init = function() {
setCurrentPage(new Page());
initUser();
waitBeforeSucceed(
function(){return Line.loadHTML()},getDocumentList().display
setCurrentPage(new Page());//provide methods on the page
initUser();//initialize the user
if(getCurrentDocumentID()) {getDocumentList().update(getCurrentDocumentID());}//update the list of documents
waitBeforeSucceed(//display the list of documents
function(){return Line.loadHTML()},function() {
getDocumentList().resetSelectionList();
getDocumentList().display();}
);
resize();
......@@ -52,13 +55,8 @@
<body>
<form id="main_form" class="main_form"
onsubmit="changed=false; return true"
action="none"
method="post">
<fieldset id="hidden_fieldset" class="hidden_fieldset">
<input type="hidden" name="cancel_url" value="http://10.0.112.141:12001/erp5/web_site_module/ung/view" />
</fieldset>
<div class="container">
<div class="navigation">
......@@ -75,7 +73,7 @@
<div class="input"><div >
<a class="email" href="/ung/mail">Email</a>
<a class="document" href="/web_site_module/ung">Documents</a>
<a class="document" href="#" onclick="window.location.reload()">Documents</a>
<a class="calendar" href="/ung/calendar">Calendar</a>
</div></div>
</div>
......@@ -153,7 +151,7 @@
<div class="input"><div >
<a class="ung_docs" href="#" onclick="javascript:window.location.reload()">
<a class="ung_docs" href="#" onclick="window.location.reload()">
<img src="images/ung/ung-logo.gif"/>
</a>
<a id="loading_message">Loading...</a>
......@@ -199,19 +197,19 @@
</a>
<ul>
<li>
<a href="web_illustration_template">
<a href="#" onclick="createNewDocument('illustration')">
<img src="images/icons/svg.png" alt=""/>
<span>Web Illustration</span>
</a>
</li>
<li>
<a href="web_table_template">
<a href="#" onclick="createNewDocument('table')">
<img src="images/icons/table.png" alt=""/>
<span>Web Table</span>
</a>
</li>
<li>
<a href="web_page_template">
<a href="#" onclick="createNewDocument('text')">
<img src="images/icons/document.png"/>
<span>Web Page</span>
</a>
......@@ -511,17 +509,17 @@
<!-- listbox start - stop number -->
<span id="page_start_number" class="listbox-current-page-start-number">1</span> -
<span id="page_stop_number" class="listbox-current-page-stop-number">6</span>
<span id="page_stop_number" class="listbox-current-page-stop-number">...</span>
<span>of</span>
<!-- listbox total rows number -->
<span id="total_row_number" class="listbox-current-page-total-number your_listbox-current-page-total-number">
6 records
<a>?</a> records
</span>
<!-- listbox selected rows number -->
<span id="selected_row_number" class="your_listbox-current-item-number">
- 0 items selected
- <a>0</a> items selected
</span>
</div>
......@@ -549,6 +547,7 @@
name="your_listbox_checkAll:method"
value="1" alt="Check All"
title="Check All"
onclick="getDocumentList().checkAll()"
src="images/icons/checkall.png" />
&nbsp;
......@@ -557,6 +556,7 @@
name="your_listbox_uncheckAll:method"
value="1" alt="Uncheck All"
title="Uncheck All"
onclick="getDocuementList().resetSelectionList()"
src="images/icons/decheckall.png" />
</th>
......
......@@ -11,6 +11,5 @@
</content>
<dependencies>
<scriptfile>js/image-editor.js</scriptfile>
<stylefile>css/jquery-ui.css</stylefile>
</dependencies>
</root>
<?xml version="1.0" encoding="UTF-8"?>
<root>
<title> Welcome </title>
<content>
<fieldset class="widget">
<p></p>
<h2>Welcome to UNG Web Office</h2>
<div id="main-content">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td valign="top">
<div id="advertisement">
<b>Sign in to edit documents, spreadsheets and drawing and share this document with other users</b>
<br/>
<img src="images/ung/ung-logo.png" alt=""/>
</div>
</td>
<td>
<table id="field_table" style="display: table; width: 78%;">
<tbody>
<tr>
<td align="center">
<table>
<tbody>
<tr>
<td align="center" colspan="2">
<font size="-1">Login in</font>
</td>
</tr>
<tr><td></td></tr>
<tr>
<td align="center">
<label for="name">Name</label>
</td>
<td align="center">
<input id="name" type="text" value="" name="name" />
</td>
</tr>
<tr>
<td align="center">
<label for="id_provider">ID provider</label>
</td>
<td>
<input id="id_provider" type="text" value="" name="id_provider" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input class="submit" onclick="logUser()" type="submit" value="Login" name="logged_in:method" />
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<br/>
</td>
<td>
<table id="create-new-user" style="width: 78%; display: none;">
<tbody>
<tr>
<td>
<form id="create-user" action="javascript:createNewUser()" method="post">
<table width="100%">
<tbody>
<tr>
<td align="center" colspan="2">
<b>Create an account</b>
</td>
</tr>
<tr>
<td id="form-message" align="center" colspan="2"></td>
</tr>
<tr>
<td>First Name</td>
<td>
<input type="text" name="firstname" />
</td>
</tr>
<tr>
<td>Last Name</td>
<td>
<input type="text" name="lastname" />
</td>
</tr>
<tr>
<td>Email</td>
<td>
<input type="text" name="email" />
</td>
</tr>
<tr>
<td>Login name</td>
<td>
<input type="text" name="login_name" />
</td>
</tr>
<tr>
<td>Password</td>
<td>
<input type="password" name="password" />
</td>
</tr>
<tr>
<td>Confirm Password</td>
<td>
<input type="password" name="confirm" />
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input class="submit" type="submit" value="Create Account" name="logged_in:method" />
</td>
</tr>
<tr>
<td id="back-login" align="left" colspan="2">
<a onclick="displayNewAccountForm(false)">&lt;&lt;Back</a>
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr><td></td></tr>
<tr>
<td></td>
<td>
<table id="new-account-table" style="display: table; width: 78%;">
<tbody>
<tr>
<td>
<table width="100%">
<tbody>
<tr>
<td align="center" colspan="2">
<b>Don't have an UNG Account?</b>
</td>
</tr>
<tr>
<td id="new-account-form" align="center" colspan="2" onclick="displayNewAccountForm(true)">Create an account now</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<a href="http://www.freecloudalliance.org/">Free Cloud Alliance</a>
-
<a href="#">Help</a>
</div>
<p></p>
</fieldset>
</content>
<dependencies>
<scriptfile>js/login.js</scriptfile>
</dependencies>
</root>
......@@ -2,13 +2,10 @@
<root>
<rename>
<form action="#">
<fieldset>
<fieldset id="edit_document">
<label for="name">Insert a new name:</label>
<input type="text" class="title" id="name" name="name" value=""/><br/>
<div id="more_property">
<label for="short_title">Short Title:</label>
<input type="text" class="short_title" id="short_title" name="short_title" value=""/><br/>
<label for="version">Version:</label>
<input type="text" class="version" id="version" name="version" value=""/><br/>
<label for="language">Language:</label>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment