Commit 15d6eafd authored by François Billioud's avatar François Billioud

implement multiple selections and delete

parent 214d845b
...@@ -21,7 +21,6 @@ var Page = function(page) { ...@@ -21,7 +21,6 @@ var Page = function(page) {
this.html = window.document; this.html = window.document;
this.xml = null; this.xml = null;
this.editor = null; this.editor = null;
//define as current page //define as current page
currentPage = this; currentPage = this;
if(page!=undefined) {this.loadXML("xml/"+page+".xml");} if(page!=undefined) {this.loadXML("xml/"+page+".xml");}
...@@ -139,13 +138,17 @@ setCurrentPage = function(page) {currentPage = page;} ...@@ -139,13 +138,17 @@ setCurrentPage = function(page) {currentPage = page;}
/* /*
* User Class * User Class
* stores useful information about a user and provides methods to manipulate them * stores useful information about a user and provides methods to manipulate them
* @param arg : a json User object to load
*/ */
var User = function(details) { var User = function(arg) {
this.name = "unknown"; if(arg) {this.load(arg);}
this.language = "en"; else {
this.storage = "http://www.unhosted-dav.com"; this.name = "unknown";
this.identityProvider = "http://www.webfinger.com"; this.language = "en";
this.displayPreferences = 15;//number of displayed document in the list this.storage = "http://www.unhosted-dav.com";
this.identityProvider = "http://www.webfinger.com";
this.displayPreferences = 15;//number of displayed document in the list
}
} }
User.prototype = new UngObject();//inherits from UngObject User.prototype = new UngObject();//inherits from UngObject
User.prototype.load({//add methods thanks to the UngObject.load method User.prototype.load({//add methods thanks to the UngObject.load method
...@@ -168,9 +171,7 @@ User.prototype.load({//add methods thanks to the UngObject.load method ...@@ -168,9 +171,7 @@ User.prototype.load({//add methods thanks to the UngObject.load method
}); });
getCurrentUser = function() { getCurrentUser = function() {
var user = new User(); return new User(JSON.parse(localStorage.getItem("currentUser")));
user.load(JSON.parse(localStorage.getItem("currentUser")));
return user;
} }
setCurrentUser = function(user) {localStorage.setItem("currentUser", JSON.stringify(user));} setCurrentUser = function(user) {localStorage.setItem("currentUser", JSON.stringify(user));}
...@@ -182,18 +183,24 @@ setCurrentUser = function(user) {localStorage.setItem("currentUser", JSON.string ...@@ -182,18 +183,24 @@ setCurrentUser = function(user) {localStorage.setItem("currentUser", JSON.string
* to manipulate these elements. * to manipulate these elements.
*/ */
/* JSON document */ /**
var JSONDocument = function() { * JSON document
this.language = getCurrentUser().getLanguage(); * @param arg : a json JSONDocument object to load
this.version = null; */
var JSONDocument = function(arg) {
this.author=getCurrentUser().getName(); if(arg) {this.load(arg);}
this.lastUser=getCurrentUser().getName(); else {
this.title="Untitled"; this.language = getCurrentUser().getLanguage();
this.content=""; this.version = null;
this.creation=currentTime();
this.lastModification=currentTime(); this.author=getCurrentUser().getName();
this.state=this.states.draft; this.lastUser=getCurrentUser().getName();
this.title="Untitled";
this.content="";
this.creation=currentTime();
this.lastModification=currentTime();
this.state=JSONDocument.prototype.states.draft;
}
} }
JSONDocument.prototype = new UngObject();//inherits from UngObject JSONDocument.prototype = new UngObject();//inherits from UngObject
...@@ -240,7 +247,8 @@ JSONDocument.prototype.load({//add methods thanks to the UngObject.load method ...@@ -240,7 +247,8 @@ JSONDocument.prototype.load({//add methods thanks to the UngObject.load method
save: function(instruction) { save: function(instruction) {
var doc = this; var doc = this;
saveFile(getDocumentAddress(this), doc, instruction); saveFile(getDocumentAddress(this), doc, instruction);
} },
remove: function(instruction) {deleteFile(getDocumentAddress(this), instruction);}
}); });
JSONDocument.prototype.states = { JSONDocument.prototype.states = {
draft:{"fr":"Brouillon","en":"Draft"}, draft:{"fr":"Brouillon","en":"Draft"},
...@@ -248,9 +256,7 @@ JSONDocument.prototype.states = { ...@@ -248,9 +256,7 @@ JSONDocument.prototype.states = {
deleted:{"fr":"Supprimé","en":"Deleted"} deleted:{"fr":"Supprimé","en":"Deleted"}
} }
getCurrentDocument = function() { getCurrentDocument = function() {
var doc = new JSONDocument(); return new JSONDocument(JSON.parse(localStorage.getItem("currentDocument")));
doc.load(JSON.parse(localStorage.getItem("currentDocument")));
return doc;
} }
setCurrentDocument = function(doc) {localStorage.setItem("currentDocument",JSON.stringify(doc));} setCurrentDocument = function(doc) {localStorage.setItem("currentDocument",JSON.stringify(doc));}
...@@ -269,28 +275,29 @@ getDocumentAddress = function(doc) {return "dav/"+doc.getCreation();} ...@@ -269,28 +275,29 @@ getDocumentAddress = function(doc) {return "dav/"+doc.getCreation();}
* open a dialog box to edit document information * open a dialog box to edit document information
*/ */
editDocumentSettings = function() { editDocumentSettings = function() {
loadFile("xml/xmlElements.xml", "html", function(data) { saveCurrentDocument();
$("rename", data).dialog({ loadFile("xml/xmlElements.xml", "html", function(data) {
autoOpen: true, $("rename", data).dialog({
height: 131, autoOpen: true,
width: 389, height: 131,
modal: true, width: 389,
buttons: { modal: true,
"Save": function(){ buttons: {
var doc = getCurrentDocument(); "Save": function(){
doc.setTitle($(this).find("#name").attr("value")); var doc = getCurrentDocument();
doc.setLanguage($(getCurrentDocument()).find("#language").attr("value")); doc.setTitle($(this).find("#name").attr("value"));
doc.setVersion($(getCurrentDocument()).find("#version").attr("value")); doc.setLanguage($(getCurrentDocument()).find("#language").attr("value"));
saveCurrentDocument(); doc.setVersion($(getCurrentDocument()).find("#version").attr("value"));
doc.setAsCurrentDocument();//diplay modifications saveCurrentDocument();
$(this).dialog("close"); doc.setAsCurrentDocument();//diplay modifications
}, $(this).dialog("close");
Cancel: function() { },
$(this).dialog("close"); Cancel: function() {
} $(this).dialog("close");
} }
}); }
} });
}
)} )}
saveCurrentDocument = function() { saveCurrentDocument = function() {
......
...@@ -33,51 +33,132 @@ UngObject.prototype.inherits = function(superClass) { ...@@ -33,51 +33,132 @@ UngObject.prototype.inherits = function(superClass) {
this.prototype.load(superClass.prototype); this.prototype.load(superClass.prototype);
} }
/* return true only if two objects are equals */
UngObject.prototype.equals = function(object) {
for (var property in object) {
if (this.hasOwnProperty(property)) {
var isEquals = this[property]&&typeof(this[property])=="object" ? UngObject.prototype.equals.call(this[property],object[property]) : this[property]===object[property];
if (!isEquals) {return false}
}
}
return true;
}
/** /**
* Class List * Class List
* this class provides usual API to manipulate list structure * this class provides usual API to manipulate list structure
* @param arg : a json list object * @param arg : a json list object
* @param contentType : the type of the elements of the list
*/ */
var List = function(arg) { var List = function(arg, contentType) {
if(arg) {this.load(arg);} if(arg && arg.headElement) {
if(contentType) {
this.headElement=new contentType(arg.headElement);
} else {
this.headElement = arg.headElement;
}
this.length = arg.length;
this.previous = new List(arg.previous, contentType);
}
else { else {
this.content = new Array(); this.nullElement();
this.length = this.content.length;
} }
} }
List.prototype = new UngObject(); List.prototype = new UngObject();
List.prototype.load ({ List.prototype.load({
nullElement: function() {
this.headElement = null;
this.previous = undefined;
this.length = 0;
},
size: function() {return this.length;}, size: function() {return this.length;},
put: function(key,value) { head: function() {return this.headElement;},
if(!this.content[key]) {this.length++;} tail: function() {return this.previous;},
this.content[key]=value; isEmpty: function() {return this.head()===null;},
equals: function(list) {
return this.head().equals(list.head()) && this.tail().equals(list.tail());
}, },
add: function(element) {this.put(this.size(),element);}, add: function(value) {
get: function(i) {return this.content[i];}, var t = new List();
concat: function(list) {while(!list.isEmpty()) {this.add(list.pop())}}, t.load(this);
remove: function(i) {delete this.content[i];this.length--;}, this.headElement = value;
isEmpty: function() {return this.size()==0;}, this.previous = t;
head: function() {return this.isEmpty() ? null : this.get(this.size()-1);}, this.length = t.size()+1;
pop: function() { },
if(this.isEmpty()) {return null;} get: function(i) {
var element = this.get(this.size()-1); if(i>=this.size()) {return null;}
this.remove(this.size()-1); if(i==0) {return this.head();}
return element; return this.tail().get(i-1);
}, },
recursiveCall: function(instruction) { set: function(i,element) {
var list = new List(); if(i>=this.size()) {error("set out of bounds, "+i+" : "+this.size(),this);return}
list.load(this); if(i==0) {
if(list.isEmpty()) {return false;} this.headElement=element;
var result = instruction(list.pop()); } else {
return result ? result : list.recursiveCall(instruction); this.tail().set(i-1,element);
}
},
remove: function(i) {
if(i>=this.size()) {error("remove out of bounds, "+i+" : "+this.size(),this);return}//particular case
if(i==0) {this.pop();return}//particular case
if(i==1) {//init
this.previous = this.tail().tail();
} else {//recursion
this.tail().remove(i-1);
}
this.length--;
},
pop: function() {
if(this.isEmpty()) {error("pop on empty list",this);return null;}
var h = this.head();
this.load(this.tail())
return h;
}, },
find: function(object) { find: function(object) {
for(var i = 0; i<this.length; i++) {if(this.get(i)===object) {return i;}} if(this.isEmpty()) {return -1}//init-false
return -1; var elt = this.head();
if(object.equals) {//init-true
if(object.equals(this.head())) {return 0;}//with an adapted comparator
} else {
if(object===this.head()) {return 0;}//with usual comparator
}
var recursiveResult = this.tail().find(object);//recursion
return recursiveResult>=0 ? this.tail().find(object)+1 : recursiveResult;
}, },
contains: function(object) { return (find(object)!=-1); } contains: function(object) {if(this.isEmpty()) {return false} else {return object===this.head() ? true : this.tail().contains(object)}},
insert: function(element,i) {
if(i>this.size()) {error("insert out of bounds, "+i+" : "+this.size(),this);return}//particular case
if(i==0) {//init
this.add(element);
} else {//recursion
this.tail().insert(element,i-1);
this.length++;
}
},
replace: function(oldElement,newElement) {
if(this.isEmpty()) {error("<<element not found>> when trying to replace",this);return}//init-false
if(oldElement===this.head()) {
this.set(0,newElement);//init-true
} else {
this.tail().replace(oldElement,newElement);//recursion
}
},
removeElement: function(element) {//remove each occurence of the element in this list
if(this.isEmpty()) {return}
this.tail().removeElement(element);
if(element.equals) {//init-true
if(element.equals(this.head())) {this.pop();}//with an adapted comparator
} else {
if(element===this.head()) {this.pop();}//with usual comparator
}
}
}); });
error: function(message,object) {
errorObject = object;
console.log(message);
}
/** /**
* returns the current date * returns the current date
...@@ -89,17 +170,17 @@ currentTime = function() {return (new Date()).toUTCString();} ...@@ -89,17 +170,17 @@ currentTime = function() {return (new Date()).toUTCString();}
// save // save
saveXHR = function(address) { saveXHR = function(address) {
$.ajax({ $.ajax({
url: address, url: address,
type: "PUT", type: "PUT",
headers: { headers: {
Authorization: "Basic "+btoa("smik:asdf")}, Authorization: "Basic "+btoa("smik:asdf")},
fields: { fields: {
withCredentials: "true" withCredentials: "true"
}, },
data: JSON.stringify(getCurrentDocument()), data: JSON.stringify(getCurrentDocument()),
success: function(){alert("saved");}, success: function(){alert("saved");},
error: function(xhr) { alert("error while saving");} error: function(xhr) { alert("error while saving");}
}); });
}; };
/** /**
...@@ -110,11 +191,11 @@ saveXHR = function(address) { ...@@ -110,11 +191,11 @@ saveXHR = function(address) {
*/ */
loadFile = function(address, type, instruction) { loadFile = function(address, type, instruction) {
$.ajax({ $.ajax({
url: address, url: address,
type: "GET", type: "GET",
dataType: type, dataType: type,
success: instruction, success: instruction,
error: function(type) {t=type;alert("er");} error: function(type) {alert("Error "+type.status+" : fail while trying to load "+address);}
}); });
} }
...@@ -129,28 +210,41 @@ saveFile = function(address, content, instruction) { ...@@ -129,28 +210,41 @@ saveFile = function(address, content, instruction) {
fields: { withCredentials: "true" }, fields: { withCredentials: "true" },
success: instruction, success: instruction,
error: function(type) { error: function(type) {
if(type.status==201) {instruction();}//ajax thinks that 201 is an error... if(type.status==201 || type.status==204) {instruction();}//ajax thinks that 201 is an error...
} }
}); });
}; }
deleteFile = function(address, instruction) {
$.ajax({
url: address,
type: "DELETE",
headers: { Authorization: "Basic "+btoa("smik:asdf")},
fields: { withCredentials: "true" },
success: instruction,
error: function(type) {
alert(type.status);//ajax thinks that 201 is an error...
}
});
}
// load // load
loadXHR = function(address) { loadXHR = function(address) {
$.ajax({ $.ajax({
url: address, url: address,
type: "GET", type: "GET",
dataType: "json", dataType: "json",
cache:false, cache:false,
headers: { headers: {
Authorization: "Basic "+btoa("smik:asdf")}, Authorization: "Basic "+btoa("smik:asdf")},
fields: { fields: {
withCredentials: "true" withCredentials: "true"
}, },
success: function(data){ success: function(data){
var cDoc = getCurrentDocument(); var cDoc = getCurrentDocument();
cDoc.load(data); cDoc.load(data);
cDoc.setAsCurrentDocument(); cDoc.setAsCurrentDocument();
} }
}); });
} }
......
...@@ -15,13 +15,11 @@ setCurrentDocumentID = function(ID) {return localStorage.setItem("currentDocumen ...@@ -15,13 +15,11 @@ setCurrentDocumentID = function(ID) {return localStorage.setItem("currentDocumen
* @param arg : a documentList json object to load * @param arg : a documentList json object to load
*/ */
var DocumentList = function(arg) { var DocumentList = function(arg) {
List.call(this,arg); //List.call(this);
if(arg) { if(arg) {
this.load(arg); this.load(arg);
for(var i=0; i<this.size(); i++) { this.load(new List(arg,JSONDocument));
this.content[i]=new JSONDocument(this.get(i));//load methods of documents this.selectionList = new List(arg.selectionList,JSONDocument);//load methods of selectionList
}
this.selectionList = new List(arg.selectionList);//load methods of selectionList
} }
else { else {
this.displayedPage = 1; this.displayedPage = 1;
...@@ -30,27 +28,44 @@ var DocumentList = function(arg) { ...@@ -30,27 +28,44 @@ var DocumentList = function(arg) {
} }
DocumentList.prototype = new List(); DocumentList.prototype = new List();
DocumentList.prototype.load({ DocumentList.prototype.load({
/* override : put an element at the specified position */ addDocument: function(doc) {
put: function(i, doc) { this.add(doc);
this.content[i]=doc; setDocumentList(this);
if(!this.content[i]) {this.length++;} this.display();
},
removeDocument: function(doc) {
var i = this.find(doc);
this.get(i).remove()//delete the file
this.remove(i);//remove from the list
setDocumentList(this); setDocumentList(this);
this.display();
}, },
getSelectionList: function() { return this.selectionList; }, getSelectionList: function() { return this.selectionList; },
resetSelectionList: function() { resetSelectionList: function() {
this.selectionList = new List(); this.selectionList = new List();
for(var i=0; i<this.length; i++) { for(var i=0; i<this.size(); i++) {
$("tr td.listbox-table-select-cell input#"+i).attr("checked",false); $("tr td.listbox-table-select-cell input#"+i).attr("checked",false);//uncheck
} }
setDocumentList(this); setDocumentList(this);
$("span#selected_row_number a").html(0);//display the selected row number
}, },
checkAll: function() { checkAll: function() {
for(var i=0; i<this.length; i++) { this.selectionList = new List();
this.getSelectionList().put(i,this.get(i)); for(var i=0; i<this.size(); i++) {
this.getSelectionList().add(this.get(i));
$("tr td.listbox-table-select-cell input#"+i).attr("checked",true); $("tr td.listbox-table-select-cell input#"+i).attr("checked",true);
} }
setDocumentList(this); setDocumentList(this);
$("span#selected_row_number a").html(this.size());//display the selected row number
},
deleteSelectedDocuments: function() {
var selection = this.getSelectionList();
while(!selection.isEmpty()) {
var doc = selection.pop();
this.removeDocument(doc);
}
}, },
getDisplayedPage: function() {return this.displayedPage;}, getDisplayedPage: function() {return this.displayedPage;},
...@@ -58,6 +73,7 @@ DocumentList.prototype.load({ ...@@ -58,6 +73,7 @@ DocumentList.prototype.load({
/* display the list of documents in the web page */ /* display the list of documents in the web page */
displayContent: function() { displayContent: function() {
$("table.listbox tbody").html("");//empty the previous displayed list
var n = this.size(); var n = this.size();
for(var i=0;i<n;i++) { for(var i=0;i<n;i++) {
var ligne = new Line(this.get(i),i); var ligne = new Line(this.get(i),i);
...@@ -90,14 +106,17 @@ DocumentList.prototype.load({ ...@@ -90,14 +106,17 @@ DocumentList.prototype.load({
loadFile(getDocumentAddress(doc),"json",function(data) { loadFile(getDocumentAddress(doc),"json",function(data) {
doc.load(data);//todo : replace by data.header doc.load(data);//todo : replace by data.header
doc.setContent("");// doc.setContent("");//
list.put(i,doc); list.set(i,doc);
setDocumentList(list);
}); });
} }
}); });
getDocumentList = function() { getDocumentList = function() {
return new DocumentList(JSON.parse(localStorage.getItem("documentList"))); return new DocumentList(JSON.parse(localStorage.getItem("documentList")));
} }
setDocumentList = function(list) {localStorage.setItem("documentList",JSON.stringify(list));} setDocumentList = function(list) {
localStorage.setItem("documentList",JSON.stringify(list));
}
/** /**
...@@ -122,20 +141,20 @@ Line.prototype = { ...@@ -122,20 +141,20 @@ Line.prototype = {
/* add the document of this line to the list of selected documents */ /* add the document of this line to the list of selected documents */
addToSelection: function() { addToSelection: function() {
list = getDocumentList(); var list = getDocumentList();
list.getSelectionList().put(this.getID(),this); list.getSelectionList().add(this.getDocument());
setDocumentList(list); setDocumentList(list);
}, },
/* remove the document of this line from the list of selected documents */ /* remove the document of this line from the list of selected documents */
removeFromSelection: function() { removeFromSelection: function() {
var list = getDocumentList(); var list = getDocumentList();
list.getSelectionList().remove(this.getID()); list.getSelectionList().removeElement(this.getDocument());
setDocumentList(list); setDocumentList(list);
}, },
/* check or uncheck the line */ /* check or uncheck the line */
changeState: function() { changeState: function() {
this.isSelected() ? this.addToSelection() : this.removeFromSelection(); this.isSelected() ? this.addToSelection() : this.removeFromSelection();
$("span#selected_row_number a").html(getDocumentList().getSelectionList().size()); $("span#selected_row_number a").html(getDocumentList().getSelectionList().size());//display the selected row number
}, },
/* load the document information in the html of a default line */ /* load the document information in the html of a default line */
...@@ -182,11 +201,7 @@ var createNewDocument = function(type) { ...@@ -182,11 +201,7 @@ var createNewDocument = function(type) {
newDocument.setType(type); newDocument.setType(type);
newDocument.save(function() { newDocument.save(function() {
getDocumentList().add(newDocument); getDocumentList().addDocument(newDocument);
startDocumentEdition(newDocument); startDocumentEdition(newDocument);
}); });
} }
var deleteSelectedDocuments = function() {
}
\ No newline at end of file
...@@ -36,10 +36,16 @@ ...@@ -36,10 +36,16 @@
} }
var init = function() { var init = function() {
//delete localStorage.documentList;//delete the list for tests
setCurrentPage(new Page());//provide methods on the page setCurrentPage(new Page());//provide methods on the page
initUser();//initialize the user initUser();//initialize the user
if(getCurrentDocumentID()) {getDocumentList().update(getCurrentDocumentID());}//update the list of documents if(getCurrentDocumentID()&&getDocumentList().get(getCurrentDocumentID())) {
/* update the list with the modifications of the last edited document
* (this method has to been rewritten if using multi users) */
getDocumentList().update(getCurrentDocumentID());
delete localStorage.currentDocumentID;
}
waitBeforeSucceed(//display the list of documents waitBeforeSucceed(//display the list of documents
function(){return Line.loadHTML()},function() { function(){return Line.loadHTML()},function() {
getDocumentList().resetSelectionList(); getDocumentList().resetSelectionList();
...@@ -53,582 +59,580 @@ ...@@ -53,582 +59,580 @@
</script> </script>
</head> </head>
<body> <body>
<div> <div class="container">
<div class="container"> <div class="navigation">
<div class="navigation">
<!-- Each aggregate of groups is a div wrapper --> <!-- Each aggregate of groups is a div wrapper -->
<div class="wrapper" id="wrapper_navigation"> <div class="wrapper" id="wrapper_navigation">
<div class=" navigation-left"> <div class=" navigation-left">
<fieldset class="widget"> <fieldset class="widget">
<legend class="group_title"></legend> <legend class="group_title"></legend>
<div class="field" title=""> <div class="field" title="">
<label> navigation_box </label> <label> navigation_box </label>
<div class="input"><div > <div class="input"><div >
<a class="email" href="/ung/mail">Email</a> <a class="email" href="/ung/mail">Email</a>
<a class="document" href="#" onclick="window.location.reload()">Documents</a> <a class="document" href="#" onclick="window.location.reload()">Documents</a>
<a class="calendar" href="/ung/calendar">Calendar</a> <a class="calendar" href="/ung/calendar">Calendar</a>
</div></div> </div></div>
</div> </div>
<div class="field date_field" title="The Date"> <div class="field date_field" title="The Date">
<label> Modification Date </label> <label> Modification Date </label>
<div class="input"></div> <div class="input"></div>
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div class=" navigation-right"> <div class=" navigation-right">
<fieldset class="widget"> <fieldset class="widget">
<legend class="group_title"></legend> <legend class="group_title"></legend>
<div class="field" title=""> <div class="field" title="">
<label> your_language </label> <label> your_language </label>
<div class="input"><div > <div class="input"><div >
<div id="select_language"> <div id="select_language">
<ul><li> <ul><li>
<span id="current_language">en</span> <span id="current_language">en</span>
<img src="images/ung/arrow_20C.png"/> <img src="images/ung/arrow_20C.png"/>
<ul id="available_languages"> <ul id="available_languages">
<li></li> <li></li>
</ul> </ul>
</li></ul> </li></ul>
</div> </div>
</div></div> </div></div>
</div> </div>
<div class="field" title=""> <div class="field" title="">
<label> user_login_box </label> <label> user_login_box </label>
<div class="input"><div > <div class="input"><div >
<a id="right_message">Not Implemented yet</a> <a id="right_message">Not Implemented yet</a>
<div id="preference_dialog" title="UNG Preferences"></div> <div id="preference_dialog" title="UNG Preferences"></div>
<a id="userName">Unknown</a> <a id="userName">Unknown</a>
| <a id="settings" href="#">Settings</a> | <a id="settings" href="#">Settings</a>
| <a id="help" href="#">Help</a> | <a id="help" href="#">Help</a>
| <a href="..WebSite_logout">Sign out</a> | <a href="..WebSite_logout">Sign out</a>
</div></div> </div></div>
</div> </div>
</fieldset> </fieldset>
</div>
</div> </div>
</div> </div>
</div>
<div class="header"> <div class="header">
<!-- Each aggregate of groups is a div wrapper --> <!-- Each aggregate of groups is a div wrapper -->
<div class="wrapper" id="wrapper_header"> <div class="wrapper" id="wrapper_header">
<div class=" header-left"> <div class=" header-left">
<fieldset class="widget"> <fieldset class="widget">
<legend class="group_title"></legend> <legend class="group_title"></legend>
<div class="field" title=""> <div class="field" title="">
<label> search_bar </label> <label> search_bar </label>
<div class="input"><div > <div class="input"><div >
<a class="ung_docs" href="#" onclick="window.location.reload()"> <a class="ung_docs" href="#" onclick="window.location.reload()">
<img src="images/ung/ung-logo.gif"/> <img src="images/ung/ung-logo.gif"/>
</a> </a>
<a id="loading_message">Loading...</a> <a id="loading_message">Loading...</a>
<form> <form>
<input type="text" name="field_your_search_text" class="field" onkeyup="submitFormOnEnter(event, this.form, 'WebSection_viewSearchResultList')" /> <input type="text" name="field_your_search_text" class="field" onkeyup="submitFormOnEnter(event, this.form, 'WebSection_viewSearchResultList')" />
<input type="submit" value="Search Docs" name="WebSection_viewSearchResultList:method" /> <input type="submit" value="Search Docs" name="WebSection_viewSearchResultList:method" />
</form> </form>
</div></div> </div></div>
</div>
</fieldset>
</div>
</div>
</fieldset>
</div> </div>
</div> </div>
</div>
<div class="main">
<!-- Each aggregate of groups is a div wrapper --
<table class="wrapper" id="wrapper_main"><tr>-->
<div class="wrapper" id="wrapper_main">
<!--<td class=" main-left">-->
<div class=" main-left">
<fieldset class="widget">
<legend class="group_title"></legend>
<div class="field" title="">
<label> user_menu_box </label>
<div class="input"><div >
<div class="gadget-column">
<div class="gadget-action">
<div class="menu_create_object">
<ul><li>
<a id="current">
<span>Create New</span>
<img src="images/ung/arrow.png"/>
</a>
<ul>
<li>
<a href="#" onclick="createNewDocument('illustration')">
<img src="images/icons/svg.png" alt=""/>
<span>Web Illustration</span>
</a>
</li>
<li>
<a href="#" onclick="createNewDocument('table')">
<img src="images/icons/table.png" alt=""/>
<span>Web Table</span>
</a>
</li>
<li>
<a href="#" onclick="createNewDocument('text')">
<img src="images/icons/document.png"/>
<span>Web Page</span>
</a>
</li>
</ul>
</li></ul>
</div>
<div class="main"> <input type="submit" id="upload" name="Upload" value="Upload" />
<!-- Each aggregate of groups is a div wrapper -- <div class="file-selection">
<table class="wrapper" id="wrapper_main"><tr>--> <div class="file-quick-search">
<div class="wrapper" id="wrapper_main"> <div class="listbox-tree">
<!--<td class=" main-left">-->
<div class=" main-left"> <!-- Domain Report Tree mode -->
<fieldset class="widget"> <div class="listbox-domain-tree-container">
<legend class="group_title"></legend> <!-- Select domain node -->
<select name="domain_root_url" onchange="submitAction(this.form, '/ung/setDomainRoot')">
<div class="field" title=""> <option value="ung_domain" selected="selected">UNG Documents</option>
</select>
<label> user_menu_box </label>
<div class="input"><div >
<div class="gadget-column">
<div class="gadget-action">
<div class="menu_create_object">
<ul><li>
<a id="current">
<span>Create New</span>
<img src="images/ung/arrow.png"/>
</a>
<ul>
<li>
<a href="#" onclick="createNewDocument('illustration')">
<img src="images/icons/svg.png" alt=""/>
<span>Web Illustration</span>
</a>
</li>
<li>
<a href="#" onclick="createNewDocument('table')">
<img src="images/icons/table.png" alt=""/>
<span>Web Table</span>
</a>
</li>
<li>
<a href="#" onclick="createNewDocument('text')">
<img src="images/icons/document.png"/>
<span>Web Page</span>
</a>
</li>
</ul>
</li></ul>
</div>
<input type="submit" id="upload" name="Upload" value="Upload" /> <!-- Domain node contents -->
<table cellpadding="0"
<div class="file-selection"> summary="This table contains the domain tree"
<div class="file-quick-search"> class="your_listbox-table-domain-tree">
<div class="listbox-tree">
<tr>
<!-- Domain Report Tree mode --> <td colspan="1" class="listbox-table-domain-tree-cell">
<div class="listbox-domain-tree-container"> <button type="submit"
name="unfoldDomain:method"
<!-- Select domain node --> class="tree-closed"
<select name="domain_root_url" onchange="submitAction(this.form, '/ung/setDomainRoot')"> value="ung_domain/all_documents.0">All Documents</button>
<option value="ung_domain" selected="selected">UNG Documents</option> </td>
</select> </tr>
<!-- Domain node contents --> <tr>
<table cellpadding="0" <td colspan="1" class="listbox-table-domain-tree-cell">
summary="This table contains the domain tree" <button type="submit"
class="your_listbox-table-domain-tree"> name="unfoldDomain:method"
class="tree-closed"
<tr> value="ung_domain/by_subject.0">By Subject</button>
<td colspan="1" class="listbox-table-domain-tree-cell"> </td>
<button type="submit" </tr>
name="unfoldDomain:method"
class="tree-closed" <tr>
value="ung_domain/all_documents.0">All Documents</button> <td colspan="1" class="listbox-table-domain-tree-cell">
</td> <button type="submit"
</tr>
<tr>
<td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit"
name="unfoldDomain:method" name="unfoldDomain:method"
class="tree-closed" class="tree-closed"
value="ung_domain/by_subject.0">By Subject</button> value="ung_domain/hidden.0">Hidden</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="1" class="listbox-table-domain-tree-cell"> <td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit" <button type="submit"
name="unfoldDomain:method" name="unfoldDomain:method"
class="tree-closed" class="tree-closed"
value="ung_domain/hidden.0">Hidden</button> value="ung_domain/owner.0">Owner</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="1" class="listbox-table-domain-tree-cell"> <td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit" <button type="submit"
name="unfoldDomain:method" name="unfoldDomain:method"
class="tree-closed" class="tree-closed"
value="ung_domain/owner.0">Owner</button> value="ung_domain/recent.0">Recent</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="1" class="listbox-table-domain-tree-cell"> <td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit" <button type="submit"
name="unfoldDomain:method" name="unfoldDomain:method"
class="tree-closed" class="tree-closed"
value="ung_domain/recent.0">Recent</button> value="ung_domain/shared.0">Shared by me</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="1" class="listbox-table-domain-tree-cell"> <td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit" <button type="submit"
name="unfoldDomain:method" name="unfoldDomain:method"
class="tree-closed" class="tree-closed"
value="ung_domain/shared.0">Shared by me</button> value="ung_domain/starred.0">Starred</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="1" class="listbox-table-domain-tree-cell"> <td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit" <button type="submit"
name="unfoldDomain:method" name="unfoldDomain:method"
class="tree-closed" class="tree-closed"
value="ung_domain/starred.0">Starred</button> value="ung_domain/trash.0">Trash</button>
</td> </td>
</tr> </tr>
<tr> </table>
<td colspan="1" class="listbox-table-domain-tree-cell">
<button type="submit"
name="unfoldDomain:method"
class="tree-closed"
value="ung_domain/trash.0">Trash</button>
</td>
</tr>
</table>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="gadget-listbox" id="gadget-listbox" title="Add Gadgets"> <div class="gadget-listbox" id="gadget-listbox" title="Add Gadgets">
<table id="gadget-table"></table> <table id="gadget-table"></table>
</div> </div>
<div class="front_pad"> <div class="front_pad">
<!-- XXX - Use WebSection_viewKnowledgePadColumn to display one column only --> <!-- XXX - Use WebSection_viewKnowledgePadColumn to display one column only -->
<div class="draggable_wrapper"> <div class="draggable_wrapper">
<div id="gadget_area_wrapper"> <div id="gadget_area_wrapper">
<div id="pad-navigation-wrapper"> <div id="pad-navigation-wrapper">
<div class="tab" id="tabs_switcher"> <div class="tab" id="tabs_switcher">
<span id="tab_switcher_hidden" style="display:none">Show tabs</span> <span id="tab_switcher_hidden" style="display:none">Show tabs</span>
<span id="tab_switcher_visible">Hide tabs</span> <span id="tab_switcher_visible">Hide tabs</span>
</div> </div>
<div id="tabs" style="display: block">
<ul>
<li id="knowledge_pad_module_1" class="tab tab_selected"> <div id="tabs" style="display: block">
<ul>
<span id="knowledge_pad_module_1_title" onclick="loadPadFromServer('knowledge_pad_module/1', 'knowledge_pad_module_1', 'web_front')">Onglet 1</span> <li id="knowledge_pad_module_1" class="tab tab_selected">
<div class="pad-actions" style="display:block"> <span id="knowledge_pad_module_1_title" onclick="loadPadFromServer('knowledge_pad_module/1', 'knowledge_pad_module_1', 'web_front')">Onglet 1</span>
<span title="Settings"
class="clickable_image rename_tab_dialog_image"
onclick="showRenamePadPopup('knowledge_pad_module/1',
'knowledge_pad_module_1_title')"></span>
<span title="Remove"
class="clickable_image remove_tab_dialog_image"
onclick=" removeKnowledgePadFromServer(
'knowledge_pad_module/1', 'web_front')" />
</div>
</li> <div class="pad-actions" style="display:block">
<span title="Settings"
class="clickable_image rename_tab_dialog_image"
onclick="showRenamePadPopup('knowledge_pad_module/1',
'knowledge_pad_module_1_title')"></span>
<span title="Remove"
class="clickable_image remove_tab_dialog_image"
onclick=" removeKnowledgePadFromServer(
'knowledge_pad_module/1', 'web_front')" />
</div>
<li class="tab" onclick="showAddNewPadPopup();" </li>
title="Add new tab"
id="add_new_tab_dialog_link">Add tab</li>
</ul> <li class="tab" onclick="showAddNewPadPopup();"
</div> title="Add new tab"
id="add_new_tab_dialog_link">Add tab</li>
<div id="add_new_gadget_link"> </ul>
<a title="Add gadgets" id="add-gadgets" href="..."><span>Add gadgets</span></a> </div>
</div>
</div> <div id="add_new_gadget_link">
<a title="Add gadgets" id="add-gadgets" href="..."><span>Add gadgets</span></a>
</div>
<div id="loading-wrapper" style="display:none;"> </div>
<img src="ajax-loader.gif" title="Loading" alt="Loading" />
<p> Please wait while your changes are being applied. </p>
</div>
<!-- Render active Knowledge pad --> <div id="loading-wrapper" style="display:none;">
<div id="pad-body-wrapper"> <img src="ajax-loader.gif" title="Loading" alt="Loading" />
<div id="page_wrapper"> <p> Please wait while your changes are being applied. </p>
</div>
<!-- No gadgets message --> <!-- Render active Knowledge pad -->
<div> <div id="pad-body-wrapper">
<h3> Your tab is empty. </h3> <div id="page_wrapper">
<h4> Please use link (<b>Add gadgets</b>) to prepare it yourself. </h4>
</div>
<!-- Render pad columns --> <!-- No gadgets message -->
<div class="portal-column" id="portal-column-0"></div> <div>
<h3> Your tab is empty. </h3>
<h4> Please use link (<b>Add gadgets</b>) to prepare it yourself. </h4>
</div> </div>
</div>
<!-- Hidden dialogs --> <!-- Render pad columns -->
<div id="add_new_tab_dialog" class="toggable_dialog"> <div class="portal-column" id="portal-column-0"></div>
</div>
</div>
<h3> Add new tab </h3> <!-- Hidden dialogs -->
<span>Tab name</span>: <div id="add_new_tab_dialog" class="toggable_dialog">
<input type="text" value="" name="pad_title"
id="new_pad_title"
onkeypress=" return addPadOnServerOnEnter(event, 'web_front', 'view')" />
<br />
<br />
<button type="button" onclick="$('#add_new_tab_dialog').toggle();">Cancel</button> <h3> Add new tab </h3>
<button type="button" <span>Tab name</span>:
id="add_new_tab_dialog_add_button" <input type="text" value="" name="pad_title"
onclick="addPadOnServer('web_front', 'view')">Add</button> id="new_pad_title"
onkeypress=" return addPadOnServerOnEnter(event, 'web_front', 'view')" />
<br />
<br />
</div> <button type="button" onclick="$('#add_new_tab_dialog').toggle();">Cancel</button>
<button type="button"
id="add_new_tab_dialog_add_button"
onclick="addPadOnServer('web_front', 'view')">Add</button>
<div id="rename_tab_dialog" class="toggable_dialog"> </div>
<h3> Rename tab </h3> <div id="rename_tab_dialog" class="toggable_dialog">
<span>Tab name</span>:
<input type="text" id="new_knowledge_pad_title"
name="knowledge_pad_title"
onkeypress="return renameKnowledgePadToServerOnEnter(event);"
value="Onglet 1" />
<br />
<br />
<button type="button" onclick="$('#rename_tab_dialog').toggle();">Cancel</button> <h3> Rename tab </h3>
<button type="button" <span>Tab name</span>:
id="rename_tab_dialog_rename_button" <input type="text" id="new_knowledge_pad_title"
onclick="renameKnowledgePadToServer();"> Rename </button> name="knowledge_pad_title"
onkeypress="return renameKnowledgePadToServerOnEnter(event);"
value="Onglet 1" />
<br />
<br />
</div> <button type="button" onclick="$('#rename_tab_dialog').toggle();">Cancel</button>
<button type="button"
id="rename_tab_dialog_rename_button"
onclick="renameKnowledgePadToServer();"> Rename </button>
<!-- Show message that default pad is being prepared. -->
<!-- Create (asynch) default pad. -->
</div> </div>
<!-- Show message that default pad is being prepared. -->
<!-- Create (asynch) default pad. -->
</div> </div>
</div> </div>
</div> </div>
</div></div>
</div>
</fieldset>
</div>
<div class=" main-right">
<fieldset class="widget"> </div>
</div></div>
</div>
</fieldset>
</div>
<div class=" main-right">
<fieldset class="widget">
<legend class="group_title"></legend> <legend class="group_title"></legend>
<div class="field" title=""> <div class="field" title="">
<label> favorite_box </label> <label> favorite_box </label>
<div class="input"><div > <div class="input"><div >
<div class="favorite"> <div class="favorite">
<a class="domain_selected"></a> <a class="domain_selected"></a>
<a href="#" onclick="javascript:window.location.reload()">Refresh</a> <a href="#" onclick="javascript:window.location.reload()">Refresh</a>
</div> </div>
</div></div> </div></div>
</div> </div>
<div class="field" title=""> <div class="field" title="">
<label> Toolbar </label> <label> Toolbar </label>
<div class="input"><div > <div class="input"><div >
<div class="toolbar"> <div class="toolbar">
<button name="WebSection_deleteObjectList:method" <button class="delete"
type="submit" onclick="getDocumentList().deleteSelectedDocuments()">Delete
class="delete">Delete</button> </button>
<button name="#" type="submit" class="change_state">Change State</button> <button name="#" class="change_state">Change State</button>
</div> </div>
</div></div> </div></div>
</div> </div>
<div class="field" title=""> <div class="field" title="">
<label> Document List </label> <label> Document List </label>
<div class="input"> <div class="input">
<div class="listbox-container"> <div class="listbox-container">
<div class="listbox-content listbox-content-fixed-width"> <div class="listbox-content listbox-content-fixed-width">
<div class="listbox-head"> <div class="listbox-head">
<div class="listbox-head-spacer"></div> <div class="listbox-head-spacer"></div>
<div class="listbox-head-content"> <div class="listbox-head-content">
<!-- Listbox head (in left) --> <!-- Listbox head (in left) -->
<div class="listbox-head-title"> <div class="listbox-head-title">
<!-- List tree mode choice --> <!-- List tree mode choice -->
<!-- Listbox title --> <!-- Listbox title -->
<div class="listbox-header-box"> <div class="listbox-header-box">
<div class="listbox-title"> <div class="listbox-title">
<a href="..." class="your_listbox_title"> <a href="..." class="your_listbox_title">
<span>Document List</span></a> <span>Document List</span></a>
</div>
</div> </div>
</div>
<!-- Number of rows in ERP5 mode --> <!-- Number of rows in ERP5 mode -->
<!-- List style display mode --> <!-- List style display mode -->
</div> </div>
<!-- Listbox nagivation (in right) --> <!-- Listbox nagivation (in right) -->
<div class="listbox-head-navigation"> <div class="listbox-head-navigation">
<!--Show search result in web mode--> <!--Show search result in web mode-->
<div class="listbox-header-box"> <div class="listbox-header-box">
<div class="listbox-number-of-records"> <div class="listbox-number-of-records">
<!-- listbox start - stop number --> <!-- listbox start - stop number -->
<span id="page_start_number" class="listbox-current-page-start-number">1</span> - <span id="page_start_number" class="listbox-current-page-start-number">1</span> -
<span id="page_stop_number" class="listbox-current-page-stop-number">...</span> <span id="page_stop_number" class="listbox-current-page-stop-number">...</span>
<span>of</span> <span>of</span>
<!-- listbox total rows number --> <!-- listbox total rows number -->
<span id="total_row_number" class="listbox-current-page-total-number your_listbox-current-page-total-number"> <span id="total_row_number" class="listbox-current-page-total-number your_listbox-current-page-total-number">
<a>?</a> records <a>?</a> records
</span> </span>
<!-- listbox selected rows number --> <!-- listbox selected rows number -->
<span id="selected_row_number" class="your_listbox-current-item-number"> <span id="selected_row_number" class="your_listbox-current-item-number">
- <a>0</a> items selected - <a>0</a> items selected
</span> </span>
</div>
</div> </div>
<!--Page navigation -->
</div> </div>
</div>
<!--Page navigation -->
</div>
</div> </div>
<div class="listbox-body"> </div>
<table class="listbox your_listbox your_listbox-table">
<thead>
<!--Column title -->
<tr class="listbox-label-line">
<!--Report tree-->
<!-- Anchor cell -->
<!-- Select cell -->
<th class="listbox-table-select-cell">
<input class="listbox-check-all" type="image"
name="your_listbox_checkAll:method"
value="1" alt="Check All"
title="Check All"
onclick="getDocumentList().checkAll()"
src="images/icons/checkall.png" />
&nbsp;
<input class="listbox-uncheck-all"
type="image"
name="your_listbox_uncheckAll:method"
value="1" alt="Uncheck All"
title="Uncheck All"
onclick="getDocumentList().resetSelectionList()"
src="images/icons/decheckall.png" />
</th>
<!-- Label column row -->
<th class="listbox-table-header-cell"></th>
<th class="listbox-table-header-cell">
<!-- Button in normal view -->
<!-- Button in gadget mode -->
<button type="button" class="sort-button"
onclick=""
title="Title">
<span>Title</span>
</button>
<!-- Icon showing sort order -->
<img src="images/ung/transparent-image.gif"
alt="Sort" class="sort-button"
title="Sort" />
</th>
<th class="listbox-table-header-cell">
<!-- Button in normal view -->
<!-- Button in gadget mode -->
<button type="button"
class="sort-button"
onclick=""
title="Sharing">
<span>Sharing</span>
</button>
<!-- Icon showing sort order -->
<img src="images/ung/transparent-image.gif"
alt="Sort" class="sort-button"
title="Sort" />
</th>
<th class="listbox-table-header-cell">
<!-- Button in normal view -->
<!-- Button in gadget mode -->
<button type="button"
class="sort-button"
onclick=""
title="Date">
<span>Date</span>
</button>
<!-- Icon showing sort order -->
<img src="images/ung/transparent-image.gif"
alt="Sort" class="sort-button"
title="Sort" />
</th>
</tr>
<!--Search column input -->
</thead>
<!-- Stats -->
<tbody></tbody>
</table>
</div>
<div class="listbox-body">
<table class="listbox your_listbox your_listbox-table">
<thead>
<!--Column title -->
<tr class="listbox-label-line">
<!--Report tree-->
<!-- Anchor cell -->
<!-- Select cell -->
<th class="listbox-table-select-cell">
<input class="listbox-check-all" type="image"
name="your_listbox_checkAll:method"
value="1" alt="Check All"
title="Check All"
onclick="getDocumentList().checkAll()"
src="images/icons/checkall.png" />
&nbsp;
<input class="listbox-uncheck-all"
type="image"
name="your_listbox_uncheckAll:method"
value="1" alt="Uncheck All"
title="Uncheck All"
onclick="getDocumentList().resetSelectionList()"
src="images/icons/decheckall.png" />
</th>
<!-- Label column row -->
<th class="listbox-table-header-cell"></th>
<th class="listbox-table-header-cell">
<!-- Button in normal view -->
<!-- Button in gadget mode -->
<button type="button" class="sort-button"
onclick=""
title="Title">
<span>Title</span>
</button>
<!-- Icon showing sort order -->
<img src="images/ung/transparent-image.gif"
alt="Sort" class="sort-button"
title="Sort" />
</th>
<th class="listbox-table-header-cell">
<!-- Button in normal view -->
<!-- Button in gadget mode -->
<button type="button"
class="sort-button"
onclick=""
title="Sharing">
<span>Sharing</span>
</button>
<!-- Icon showing sort order -->
<img src="images/ung/transparent-image.gif"
alt="Sort" class="sort-button"
title="Sort" />
</th>
<th class="listbox-table-header-cell">
<!-- Button in normal view -->
<!-- Button in gadget mode -->
<button type="button"
class="sort-button"
onclick=""
title="Date">
<span>Date</span>
</button>
<!-- Icon showing sort order -->
<img src="images/ung/transparent-image.gif"
alt="Sort" class="sort-button"
title="Sort" />
</th>
</tr>
<!--Search column input -->
</thead>
<!-- Stats -->
<tbody></tbody>
</table>
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
</div>
</fieldset> </fieldset>
</div>
</div> </div>
</div></div> </div>
</div> </div></div>
</body> </body>
</html> </html>
\ No newline at end of file
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