projects
/
euphorik.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the weekly troll.
[euphorik.git]
/
js
/
client.js
diff --git
a/js/client.js
b/js/client.js
index
917ae8e
..
0b77e65
100644
(file)
--- a/
js/client.js
+++ b/
js/client.js
@@
-58,6
+58,10
@@
euphorik.Client.statusType = {
disconnected : 2
\r
};
\r
\r
disconnected : 2
\r
};
\r
\r
+/**
\r
+ * Reset all the local personal data. Does not erase the remote data.
\r
+ * This function is used during disconnecting.
\r
+ */
\r
euphorik.Client.prototype.resetPersonalData = function() {
\r
this.id = 0;
\r
this.nick = euphorik.conf.defaultNick;
\r
euphorik.Client.prototype.resetPersonalData = function() {
\r
this.id = 0;
\r
this.nick = euphorik.conf.defaultNick;
\r
@@
-74,14
+78,20
@@
euphorik.Client.prototype.resetPersonalData = function() {
this.mainConversationPage = 1;
\r
this.ekMaster = false;
\r
this.ostentatiousMaster = "light";
\r
this.mainConversationPage = 1;
\r
this.ekMaster = false;
\r
this.ostentatiousMaster = "light";
\r
-
\r
- // les conversations, une conversation est un objet possédant les propriétés suivantes :
\r
- // - root (entier)
\r
- // - page (entier)
\r
- // - reduit (bool)
\r
+
\r
+ // The user opened conversations.
\r
+ // Each conversation object owns theses properties :
\r
+ // - root (integer)
\r
+ // - page (integer)
\r
+ // - isCollapsed (bool)
\r
this.conversations = [];
\r
};
\r
\r
this.conversations = [];
\r
};
\r
\r
+/**
\r
+ * Set the CSS. Dynamically change the href to the CSS in the DOM.
\r
+ * @css The relative path to the CSS file, for example :
\r
+ * "styles/1/euphorik.css".
\r
+ */
\r
euphorik.Client.prototype.setCss = function(css) {
\r
if (this.css === css || !css) {
\r
return;
\r
euphorik.Client.prototype.setCss = function(css) {
\r
if (this.css === css || !css) {
\r
return;
\r
@@
-89,12
+99,17
@@
euphorik.Client.prototype.setCss = function(css) {
\r
this.css = css;
\r
$("link#mainCss").attr("href", this.css);
\r
\r
this.css = css;
\r
$("link#mainCss").attr("href", this.css);
\r
+
\r
if (this.autoflush) {
\r
this.flush(true);
\r
}
\r
};
\r
\r
if (this.autoflush) {
\r
this.flush(true);
\r
}
\r
};
\r
\r
-euphorik.Client.prototype.pageSuivante = function(numConv) {
\r
+/**
\r
+ * Change the current page to the next one for the given conversation.
\r
+ * @numConv The number of the conversation.
\r
+ */
\r
+euphorik.Client.prototype.nextPage = function(numConv) {
\r
if (numConv < 0 && this.mainConversationPage > 1) {
\r
this.mainConversationPage -= 1;
\r
} else if (this.conversations[numConv].page > 1) {
\r
if (numConv < 0 && this.mainConversationPage > 1) {
\r
this.mainConversationPage -= 1;
\r
} else if (this.conversations[numConv].page > 1) {
\r
@@
-102,7
+117,11
@@
euphorik.Client.prototype.pageSuivante = function(numConv) {
}
\r
};
\r
\r
}
\r
};
\r
\r
-euphorik.Client.prototype.pagePrecedente = function(numConv) {
\r
+/**
\r
+ * Change the current page to the previous one for the given conversation.
\r
+ * @numConv The number of the conversation.
\r
+ */
\r
+euphorik.Client.prototype.previousPage = function(numConv) {
\r
if (numConv < 0) {
\r
this.mainConversationPage += 1;
\r
} else {
\r
if (numConv < 0) {
\r
this.mainConversationPage += 1;
\r
} else {
\r
@@
-114,7
+133,7
@@
euphorik.Client.prototype.pagePrecedente = function(numConv) {
* Définit la première page pour la conversation donnée.
\r
* @return true si la page a changé sinon false
\r
*/
\r
* Définit la première page pour la conversation donnée.
\r
* @return true si la page a changé sinon false
\r
*/
\r
-euphorik.Client.prototype.go
Premiere
Page = function(numConv)
\r
+euphorik.Client.prototype.go
First
Page = function(numConv)
\r
{
\r
if (numConv < 0) {
\r
if (this.mainConversationPage === 1) {
\r
{
\r
if (numConv < 0) {
\r
if (this.mainConversationPage === 1) {
\r
@@
-148,7
+167,7
@@
euphorik.Client.prototype.ajouterConversation = function(racine) {
return false;
\r
}
\r
\r
return false;
\r
}
\r
\r
- this.conversations.push({root : racine, page : 1,
reduit
: false});
\r
+ this.conversations.push({root : racine, page : 1,
isCollapsed
: false});
\r
if (this.autoflush) {
\r
this.flush(true);
\r
}
\r
if (this.autoflush) {
\r
this.flush(true);
\r
}
\r
@@
-175,7
+194,7
@@
euphorik.Client.prototype.supprimerConversation = function(num) {
euphorik.Client.prototype.getJSONConversations = function() {
\r
var conversations = [];
\r
this.conversations.each(function(i, conv) {
\r
euphorik.Client.prototype.getJSONConversations = function() {
\r
var conversations = [];
\r
this.conversations.each(function(i, conv) {
\r
- conversations.push({ "root" : conv.root, "minimized" : conv.
reduit
});
\r
+ conversations.push({ "root" : conv.root, "minimized" : conv.
isCollapsed
});
\r
});
\r
return conversations;
\r
};
\r
});
\r
return conversations;
\r
};
\r
@@
-359,7
+378,7
@@
euphorik.Client.prototype.chargerDonnees = function(data) {
// les conversations
\r
this.conversations = data.profile.conversations;
\r
this.conversations.map(function(conv) {
\r
// les conversations
\r
this.conversations = data.profile.conversations;
\r
this.conversations.map(function(conv) {
\r
- return { root : conv.root, page : 1,
reduit
: conv.minimized };
\r
+ return { root : conv.root, page : 1,
isCollapsed
: conv.minimized };
\r
});
\r
\r
this.majBulle();
\r
});
\r
\r
this.majBulle();
\r