Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
e7e4f662
Commit
e7e4f662
authored
Jul 01, 2015
by
Vivek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jabberclient: made offline contacts visible. added password reset. updated error handling.
parent
c18d9b9e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
285 additions
and
87 deletions
+285
-87
bt5/erp5_web_jabber_client/PathTemplateItem/web_page_module/jabber_gadget_jabberclient_html.xml
...eItem/web_page_module/jabber_gadget_jabberclient_html.xml
+49
-10
bt5/erp5_web_jabber_client/PathTemplateItem/web_page_module/jabber_gadget_jabberclient_js.xml
...ateItem/web_page_module/jabber_gadget_jabberclient_js.xml
+170
-35
bt5/erp5_web_jabber_client/PathTemplateItem/web_page_module/jabber_gadget_jabberconnection_js.xml
...tem/web_page_module/jabber_gadget_jabberconnection_js.xml
+66
-42
No files found.
bt5/erp5_web_jabber_client/PathTemplateItem/web_page_module/jabber_gadget_jabberclient_html.xml
View file @
e7e4f662
...
...
@@ -135,14 +135,26 @@
<ul
data-role=
"listview"
data-inset=
"true"
>
\n
{{#each contact}}\n
<li>
\n
{{#if url}}\n
<a
href=
"{{url}}"
>
\n
{{#if new_message}}\n
<span
class=
"ui-li-count"
>
!
</span>
\n
{{#if status}}\n
{{#if url}}\n
<a
href=
"{{url}}"
class=
"ui-btn ui-btn-icon-left ui-icon-check"
>
\n
{{#if new_message}}\n
<span
class=
"ui-li-count"
>
!
</span>
\n
{{/if}}\n
{{jid}}
</a>
\n
{{else}}\n
{{jid}}\n
{{/if}}\n
{{jid}}
</a>
\n
{{else}}\n
{{jid}}\n
{{#if url}}\n
<a
href=
"{{url}}"
class=
"ui-btn ui-btn-icon-left ui-icon-forbidden"
>
\n
{{#if new_message}}\n
<span
class=
"ui-li-count"
>
!
</span>
\n
{{/if}}\n
{{jid}}
</a>
\n
{{else}}\n
{{jid}}\n
{{/if}}\n
{{/if}}\n
</li>
\n
{{/each}}\n
...
...
@@ -207,10 +219,37 @@
</div>
\n
</script>
\n
\n
<script
class=
"reset-password-template"
type=
"text/x-handlebars-template"
>
\n
<div
class=
"ui-grid-b ui-responsive"
>
\n
<div
class=
"ui-block-a"
></div>
\n
<div
class=
"ui-block-b"
>
\n
<h2>
Reset Password
</h2>
\n
<form
class=
"reset-password-form"
>
\n
<div
class=
"ui-field-contain"
>
\n
<label>
Server URL
</label>
\n
<input
type=
"text"
name=
"server"
placeholder=
"Server URL"
value=
"tiolive.com"
required
>
\n
</div>
\n
<div
class=
"ui-field-contain"
>
\n
<label>
New Password
</label>
\n
<input
type=
"password"
name=
"new_passwd"
placeholder=
"New Password"
value=
""
required
>
\n
</div>
\n
<div
class=
"ui-field-contain"
>
\n
<label>
Repeat Password
</label>
\n
<input
type=
"password"
name=
"repeat_passwd"
placeholder=
"Repeat Password"
value=
""
required
>
\n
</div>
\n
<input
data-inline=
"true"
type=
"submit"
value=
"Submit"
data-theme=
"b"
>
\n
</form>
\n
<pre
style=
"white-space: pre-wrap;"
>
{{message}}
</pre>
\n
</div>
\n
<div
class=
"ui-block-c"
>
\n
</div>
\n
</div>
\n
</script>
\n
<script
class=
"message-template"
type=
"text/x-handlebars-template"
><li
data-theme=
"{{theme}}"
style=
"{{style}}"
><pre
style=
"white-space: pre-wrap;"
>
{{text}}
</pre></li></script>
\n
\n
<script
class=
"history-template"
type=
"text/x-handlebars-template"
><pre
style=
"white-space: pre-wrap;"
>
{{text}}
</pre></script>
\n
\n
<script
class=
"error-template"
type=
"text/x-handlebars-template"
><pre
style=
"white-space: pre-wrap;"
>
{{error_message}}
</pre></script>
\n
<script
class=
"header-template"
type=
"text/x-handlebars-template"
>
\n
{{#if left_url}}\n
<a
href=
"{{left_url}}"
class=
"ui-btn-left ui-btn ui-btn-inline ui-mini ui-corner-all"
>
{{left_title}}
</a>
\n
...
...
@@ -368,7 +407,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
klaus.woelfel
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -382,7 +421,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
94
2.15924.54448.8823
</string>
</value>
<value>
<string>
94
4.5553.6477.32460
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -400,8 +439,8 @@
</tuple>
<state>
<tuple>
<float>
14
28669417.76
</float>
<string>
UTC
</string>
<float>
14
35739472.1
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_web_jabber_client/PathTemplateItem/web_page_module/jabber_gadget_jabberclient_js.xml
View file @
e7e4f662
This diff is collapsed.
Click to expand it.
bt5/erp5_web_jabber_client/PathTemplateItem/web_page_module/jabber_gadget_jabberconnection_js.xml
View file @
e7e4f662
...
...
@@ -347,45 +347,69 @@
deferServerConnection(this);\n
})\n
\n
// .declareMethod(\'fetchRoster\', function () {\n
// var defer = RSVP.defer();\n
// \n
// function jsonifyResponse(domElt) {\n
// try {\n
// var result = [],\n
// elt,\n
// json_elt,\n
// len,\n
// i,\n
// len2,\n
// j,\n
// item_list = domElt.querySelectorAll("item");\n
// len = item_list.length;\n
// for (i = 0; i
< len
;
i
+=
1)
{\n
//
elt =
item_list[i];\n
//
len2 =
elt.attributes.length;\n
//
json_elt =
{};\n
//
for
(
j =
0;
j
<
len2;
j
+=
1)
{\n
//
json_elt[elt.attributes[j].name]
=
elt.attributes[j].value;\n
//
}\n
//
result.push(json_elt);\n
//
}\n
//
defer.resolve(result);\n
//
}
catch
(error)
{\n
//
defer.reject(error);\n
//
}\n
//
}\n
//
\n
//
this.props.connection.sendIQ(\n
//
$iq({type:
"get"}).c("query",
{xmlns:
Strophe.NS.ROSTER}),\n
//
jsonifyResponse,\n
//
defer.reject\n
//
);\n
//
\n
//
return
defer.promise;\n
//
\n
//
})\n
\n
.declareMethod(\'fetchRoster\', function () {\n
var defer = RSVP.defer();\n
function jsonifyResponse(domElt) {\n
try {\n
var result = [],\n
elt,\n
json_elt,\n
len,\n
i,\n
len2,\n
j,\n
item_list = domElt.querySelectorAll("item");\n
len = item_list.length;\n
for (i = 0; i
< len
;
i
+=
1)
{\n
elt =
item_list[i];\n
len2 =
elt.attributes.length;\n
json_elt =
{};\n
for
(
j =
0;
j
<
len2;
j
+=
1)
{\n
json_elt[elt.attributes[j].name]
=
elt.attributes[j].value;\n
}\n
result.push(json_elt);\n
}\n
defer.resolve(result);\n
}
catch
(error)
{\n
defer.reject(error);\n
}\n
}\n
this.props.connection.sendIQ(\n
$iq({type:
"get"}).c("query",
{xmlns:
Strophe.NS.ROSTER}),\n
jsonifyResponse,\n
defer.reject\n
);\n
return
defer.promise;\n
})\n
\n
.declareMethod(\'resetPassword\',
function
(server,
new_passwd)
{\n
var
defer =
RSVP.defer();\n
function
jsonifyResponse(domElt)
{\n
try
{\n
var
result =
[],\n
type =
domElt.getAttribute(\'type\');\n
if(
type =
==
"result")
{\n
result.push("Password
Reset
Success.");\n
}\n
else
{\n
throw
new
Error("Password
Reset
Failure.");\n
}\n
defer.resolve(result);\n
}
catch
(error)
{\n
defer.reject(error);\n
}\n
}\n
var
uid =
this.props.jid.split(\'@\')[0];\n
this.props.connection.sendIQ(\n
$iq({to:
server,
type:
"set"})\n
.c("query",
{xmlns:
"jabber:iq:register"})\n
.c("username").t(uid).up()\n
.c("password").t(new_passwd).up(),\n
jsonifyResponse,\n
defer.reject\n
);\n
return
defer.promise;\n
})\n
.declareMethod(\'sendPresence\',
function
()
{\n
this.props.connection.send(\n
$pres().tree()\n
...
...
@@ -545,7 +569,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -559,7 +583,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
39.33961.3512.52974
</string>
</value>
<value>
<string>
9
44.5651.30805.18688
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -577,7 +601,7 @@
</tuple>
<state>
<tuple>
<float>
14
18214516.59
</float>
<float>
14
35744650.8
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment