Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
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
nexedi
converse.js
Commits
35a4f9bd
Commit
35a4f9bd
authored
Oct 31, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the JS to better render the chatroom config form.
Other small tweaks as well.
parent
4a8b5da1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
81 deletions
+89
-81
converse.js
converse.js
+10
-7
css/converse.css
css/converse.css
+34
-33
mockup/chatroom.html
mockup/chatroom.html
+2
-1
sass/_chatrooms.scss
sass/_chatrooms.scss
+37
-37
sass/_core.scss
sass/_core.scss
+2
-1
src/templates/chatroom_form.html
src/templates/chatroom_form.html
+4
-2
No files found.
converse.js
View file @
35a4f9bd
...
...
@@ -3186,22 +3186,25 @@
renderConfigurationForm
:
function
(
stanza
)
{
var
$form
=
this
.
$el
.
find
(
'
form.chatroom-form
'
),
$fieldset
=
$form
.
children
(
'
fieldset:first
'
),
$stanza
=
$
(
stanza
),
$fields
=
$stanza
.
find
(
'
field
'
),
title
=
$stanza
.
find
(
'
title
'
).
text
(),
instructions
=
$stanza
.
find
(
'
instructions
'
).
text
();
$f
orm
.
find
(
'
span.spinner
'
).
remove
();
$f
orm
.
append
(
$
(
'
<legend>
'
).
text
(
title
));
$f
ieldset
.
find
(
'
span.spinner
'
).
remove
();
$f
ieldset
.
append
(
$
(
'
<legend>
'
).
text
(
title
));
if
(
instructions
&&
instructions
!==
title
)
{
$f
orm
.
append
(
$
(
'
<p class="instructions">
'
).
text
(
instructions
));
$f
ieldset
.
append
(
$
(
'
<p class="instructions">
'
).
text
(
instructions
));
}
_
.
each
(
$fields
,
function
(
field
)
{
$f
orm
.
append
(
utils
.
xForm2webForm
(
$
(
field
),
$stanza
));
$f
ieldset
.
append
(
utils
.
xForm2webForm
(
$
(
field
),
$stanza
));
});
$form
.
append
(
'
<input type="submit" class="pure-button button-primary" value="
'
+
__
(
'
Save
'
)
+
'
"/>
'
);
$form
.
append
(
'
<input type="button" class="pure-button button-cancel" value="
'
+
__
(
'
Cancel
'
)
+
'
"/>
'
);
$form
.
append
(
'
<fieldset></fieldset>
'
);
$fieldset
=
$form
.
children
(
'
fieldset:last
'
);
$fieldset
.
append
(
'
<input type="submit" class="pure-button button-primary" value="
'
+
__
(
'
Save
'
)
+
'
"/>
'
);
$fieldset
.
append
(
'
<input type="button" class="pure-button button-cancel" value="
'
+
__
(
'
Cancel
'
)
+
'
"/>
'
);
$fieldset
.
find
(
'
input[type=button]
'
).
on
(
'
click
'
,
this
.
cancelConfiguration
.
bind
(
this
));
$form
.
on
(
'
submit
'
,
this
.
saveConfiguration
.
bind
(
this
));
$form
.
find
(
'
input[type=button]
'
).
on
(
'
click
'
,
this
.
cancelConfiguration
.
bind
(
this
));
},
sendConfiguration
:
function
(
config
,
onSuccess
,
onError
)
{
...
...
css/converse.css
View file @
35a4f9bd
...
...
@@ -1183,14 +1183,15 @@
#conversejs
form
.pure-form.converse-form
input
[
type
=
button
],
#conversejs
form
.pure-form.converse-form
input
[
type
=
submit
]
{
padding-left
:
1em
;
padding-right
:
1em
;
}
padding-right
:
1em
;
margin-right
:
1em
;
}
#conversejs
form
.pure-form.converse-form
input
.error
{
border
:
1px
solid
red
;
color
:
#818479
;
}
#conversejs
form
.pure-form.converse-form
.form-help
{
color
:
gray
;
font-size
:
85%
;
padding-top
:
5px
;
}
padding-top
:
0.5em
;
}
#conversejs
form
.pure-form.converse-form
.form-help
:hover
{
color
:
#818479
;
}
#conversejs
.chat-textarea-chatbox-selected
{
...
...
@@ -1922,37 +1923,37 @@
position
:
absolute
;
}
#conversejs
.chatroom
.chat-textarea
{
border-bottom-right-radius
:
0
;
}
#conversejs
.chatroom
.
invited-contact
{
margin
:
-1px
0
0
-1px
;
width
:
100px
;
border
:
1px
solid
#999
;
}
#conversejs
.chatroom
.invited-contact.tt-input
{
margin
:
1px
;
width
:
97px
;
width
:
calc
(
100%
-
2px
)
;
background
:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gkBCjE0uzKkOgAAAidJREFUKM+N0k+IEnEUB/D3cyscdagkWpHV0WGWREXm0AgOGkSJ07kh2UXYU5cOewm6Bp0KXG/tpSCv6hyEFQIhMEaE3yERYfwTOoqKGLQxDAbqYadLgu7J7/XxeY/3ez8EACDLsgljfMfj8ZxUKhXXYDAAnueBoqgyAMipVOovXAuSZdnUaDQeDofDs16vFyUIAjRNUwmCoG02G1AUdZ5IJN7GYrHfm3AvEAjcnUwmX0ajUdRqtV74fL6sruufKYoa6bp+fzabPUMI7ZfL5eImNHk8npNerxc1m80XHMe98fv9H3K5XDkSibxjWfb1arWaYoyPMMbCFqxUKi6CIODw8LDmdDq7oigaAACiKK5omv7KcdylpmlIkiTHFlRVFTRNUxVFqa/ROqIoGoqi5A3DgFartfU4Jp7ngSAI2uVyPZIk6dZmUZKk2w6H4xghBPF4HK7vWLbZbDCdTp+rqvpUkiS0RvV6/bTf7x8wDHMViURqm/AGAMgURZ232+1X1Wr102KxuEwmk3lZlo/7/f7BcrkkSZKs2e12tHXH/x/gHsY4jTE+0jQNGYYBCCFgGOaKJMkfjUaDZximGQ6HXzSbzZ+ZTMbY6oIxFgqFgqPT6YAgCMBxXM1ut6N0Op0fj8chi8XyjWXZ98Fg8DuCHZLNZh+USqWP8/n8idvt/hUKhV7u7QK9Xu8fmqanAJBQVXUfAGY7TQQAKBaLN8fjsdDtdh/run72Dzhf7XLe2UevAAAAAElFTkSuQmCC)
no-repeat
right
3px
center
;
}
#conversejs
.chatroom
.invited-contact.tt-input
:focus
{
border-color
:
#E76F51
;
}
#conversejs
.chatroom
.invited-contact.tt-hint
{
color
:
transparent
;
}
#conversejs
.chatroom
.tt-dropdown-menu
{
margin
:
0
1px
0
1px
;
width
:
96px
;
max-height
:
250px
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
text-overflow
:
ellipsis
;
background
:
#E76F51
;
border-bottom-right-radius
:
4px
;
border-bottom-left-radius
:
4px
;
}
#conversejs
.chatroom
.tt-dropdown-menu
.tt-suggestion
p
{
color
:
white
;
cursor
:
pointer
;
font-size
:
11px
;
}
#conversejs
.chatroom
.tt-dropdown-menu
.tt-suggestion
.tt-highlight
{
background-color
:
#D24E2B
;
}
#conversejs
.chatroom
.tt-dropdown-menu
.tt-suggestion
p
:hover
{
background-color
:
#FF977C
;
}
#conversejs
.chatroom
.
room-invite
{
margin
:
0.3em
;
}
#conversejs
.chatroom
.room-invite
.invited-contact
{
margin
:
-1px
0
0
-1px
;
width
:
100px
;
border
:
1px
solid
#999
;
}
#conversejs
.chatroom
.room-invite
.invited-contact.tt-input
{
width
:
100%
;
background
:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gkBCjE0uzKkOgAAAidJREFUKM+N0k+IEnEUB/D3cyscdagkWpHV0WGWREXm0AgOGkSJ07kh2UXYU5cOewm6Bp0KXG/tpSCv6hyEFQIhMEaE3yERYfwTOoqKGLQxDAbqYadLgu7J7/XxeY/3ez8EACDLsgljfMfj8ZxUKhXXYDAAnueBoqgyAMipVOovXAuSZdnUaDQeDofDs16vFyUIAjRNUwmCoG02G1AUdZ5IJN7GYrHfm3AvEAjcnUwmX0ajUdRqtV74fL6sruufKYoa6bp+fzabPUMI7ZfL5eImNHk8npNerxc1m80XHMe98fv9H3K5XDkSibxjWfb1arWaYoyPMMbCFqxUKi6CIODw8LDmdDq7oigaAACiKK5omv7KcdylpmlIkiTHFlRVFTRNUxVFqa/ROqIoGoqi5A3DgFartfU4Jp7ngSAI2uVyPZIk6dZmUZKk2w6H4xghBPF4HK7vWLbZbDCdTp+rqvpUkiS0RvV6/bTf7x8wDHMViURqm/AGAMgURZ232+1X1Wr102KxuEwmk3lZlo/7/f7BcrkkSZKs2e12tHXH/x/gHsY4jTE+0jQNGYYBCCFgGOaKJMkfjUaDZximGQ6HXzSbzZ+ZTMbY6oIxFgqFgqPT6YAgCMBxXM1ut6N0Op0fj8chi8XyjWXZ98Fg8DuCHZLNZh+USqWP8/n8idvt/hUKhV7u7QK9Xu8fmqanAJBQVXUfAGY7TQQAKBaLN8fjsdDtdh/run72Dzhf7XLe2UevAAAAAElFTkSuQmCC)
no-repeat
right
3px
center
;
}
#conversejs
.chatroom
.room-invite
.invited-contact.tt-input
:focus
{
border-color
:
#E76F51
;
}
#conversejs
.chatroom
.room-invite
.invited-contact.tt-hint
{
color
:
transparent
;
background-color
:
white
;
}
#conversejs
.chatroom
.room-invite
.tt-dropdown-menu
{
width
:
96%
;
max-height
:
250px
;
background
:
#E76F51
;
border-bottom-right-radius
:
4px
;
border-bottom-left-radius
:
4px
;
overflow-y
:
auto
;
}
#conversejs
.chatroom
.room-invite
.tt-dropdown-menu
.tt-suggestion
p
{
color
:
white
;
cursor
:
pointer
;
font-size
:
11px
;
text-overflow
:
ellipsis
;
overflow-x
:
hidden
;
}
#conversejs
.chatroom
.room-invite
.tt-dropdown-menu
.tt-suggestion
p
:hover
{
background-color
:
#FF977C
;
}
#conversejs
.chatroom
.room-invite
.tt-dropdown-menu
.tt-suggestion
.tt-highlight
{
background-color
:
#D24E2B
;
}
#conversejs
#minimized-chats
{
border-top-left-radius
:
4px
;
...
...
mockup/chatroom.html
View file @
35a4f9bd
...
...
@@ -84,8 +84,9 @@
</fieldset>
<fieldset>
<input
type=
"submit"
class=
"pure-button button-primary"
value=
"Save"
>
<input
type=
"button"
class=
"pure-button button-cancel"
value=
"Cancel"
>
</form>
<input
type=
"button"
class=
"pure-button button-cancel"
value=
"Cancel"
>
</fieldset>
</form>
</div>
</div>
</div>
...
...
sass/_chatrooms.scss
View file @
35a4f9bd
...
...
@@ -96,45 +96,45 @@
border-bottom-right-radius
:
0
;
}
.invited-contact
{
margin
:
-1px
0
0
-1px
;
width
:
100px
;
border
:
1px
solid
#999
;
&
.tt-input
{
margin
:
1px
;
width
:
97px
;
width
:
calc
(
100%
-
2px
);
background
:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gkBCjE0uzKkOgAAAidJREFUKM+N0k+IEnEUB/D3cyscdagkWpHV0WGWREXm0AgOGkSJ07kh2UXYU5cOewm6Bp0KXG/tpSCv6hyEFQIhMEaE3yERYfwTOoqKGLQxDAbqYadLgu7J7/XxeY/3ez8EACDLsgljfMfj8ZxUKhXXYDAAnueBoqgyAMipVOovXAuSZdnUaDQeDofDs16vFyUIAjRNUwmCoG02G1AUdZ5IJN7GYrHfm3AvEAjcnUwmX0ajUdRqtV74fL6sruufKYoa6bp+fzabPUMI7ZfL5eImNHk8npNerxc1m80XHMe98fv9H3K5XDkSibxjWfb1arWaYoyPMMbCFqxUKi6CIODw8LDmdDq7oigaAACiKK5omv7KcdylpmlIkiTHFlRVFTRNUxVFqa/ROqIoGoqi5A3DgFartfU4Jp7ngSAI2uVyPZIk6dZmUZKk2w6H4xghBPF4HK7vWLbZbDCdTp+rqvpUkiS0RvV6/bTf7x8wDHMViURqm/AGAMgURZ232+1X1Wr102KxuEwmk3lZlo/7/f7BcrkkSZKs2e12tHXH/x/gHsY4jTE+0jQNGYYBCCFgGOaKJMkfjUaDZximGQ6HXzSbzZ+ZTMbY6oIxFgqFgqPT6YAgCMBxXM1ut6N0Op0fj8chi8XyjWXZ98Fg8DuCHZLNZh+USqWP8/n8idvt/hUKhV7u7QK9Xu8fmqanAJBQVXUfAGY7TQQAKBaLN8fjsdDtdh/run72Dzhf7XLe2UevAAAAAElFTkSuQmCC )
no-repeat
right
3px
center
;
&
:focus
{
border-color
:
$chatroom-head-color
;
}
}
&
.tt-hint
{
color
:
transparent
;
}
}
.tt-dropdown-menu
{
margin
:
0
1px
0
1px
;
width
:
96px
;
max-height
:
250px
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
text-overflow
:
ellipsis
;
background
:
$chatroom-head-color
;
border-bottom-right-radius
:
$chatbox-border-radius
;
border-bottom-left-radius
:
$chatbox-border-radius
;
.tt-suggestion
{
p
{
color
:
white
;
cursor
:
pointer
;
font-size
:
11px
;
.room-invite
{
margin
:
0
.3em
;
.invited-contact
{
margin
:
-1px
0
0
-1px
;
width
:
100px
;
border
:
1px
solid
#999
;
&
.tt-input
{
width
:
100%
;
background
:
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gkBCjE0uzKkOgAAAidJREFUKM+N0k+IEnEUB/D3cyscdagkWpHV0WGWREXm0AgOGkSJ07kh2UXYU5cOewm6Bp0KXG/tpSCv6hyEFQIhMEaE3yERYfwTOoqKGLQxDAbqYadLgu7J7/XxeY/3ez8EACDLsgljfMfj8ZxUKhXXYDAAnueBoqgyAMipVOovXAuSZdnUaDQeDofDs16vFyUIAjRNUwmCoG02G1AUdZ5IJN7GYrHfm3AvEAjcnUwmX0ajUdRqtV74fL6sruufKYoa6bp+fzabPUMI7ZfL5eImNHk8npNerxc1m80XHMe98fv9H3K5XDkSibxjWfb1arWaYoyPMMbCFqxUKi6CIODw8LDmdDq7oigaAACiKK5omv7KcdylpmlIkiTHFlRVFTRNUxVFqa/ROqIoGoqi5A3DgFartfU4Jp7ngSAI2uVyPZIk6dZmUZKk2w6H4xghBPF4HK7vWLbZbDCdTp+rqvpUkiS0RvV6/bTf7x8wDHMViURqm/AGAMgURZ232+1X1Wr102KxuEwmk3lZlo/7/f7BcrkkSZKs2e12tHXH/x/gHsY4jTE+0jQNGYYBCCFgGOaKJMkfjUaDZximGQ6HXzSbzZ+ZTMbY6oIxFgqFgqPT6YAgCMBxXM1ut6N0Op0fj8chi8XyjWXZ98Fg8DuCHZLNZh+USqWP8/n8idvt/hUKhV7u7QK9Xu8fmqanAJBQVXUfAGY7TQQAKBaLN8fjsdDtdh/run72Dzhf7XLe2UevAAAAAElFTkSuQmCC )
no-repeat
right
3px
center
;
&
:focus
{
border-color
:
$chatroom-head-color
;
}
}
.tt-highlight
{
background-color
:
#D24E2B
;
&
.tt-hint
{
color
:
transparent
;
background-color
:
white
;
}
p
:hover
{
background-color
:
#FF977C
;
}
.tt-dropdown-menu
{
width
:
96%
;
max-height
:
250px
;
background
:
$chatroom-head-color
;
border-bottom-right-radius
:
$chatbox-border-radius
;
border-bottom-left-radius
:
$chatbox-border-radius
;
overflow-y
:
auto
;
.tt-suggestion
{
p
{
color
:
white
;
cursor
:
pointer
;
font-size
:
11px
;
text-overflow
:
ellipsis
;
overflow-x
:
hidden
;
&
:hover
{
background-color
:
#FF977C
;
}
}
.tt-highlight
{
background-color
:
#D24E2B
;
}
}
}
}
...
...
sass/_core.scss
View file @
35a4f9bd
...
...
@@ -164,6 +164,7 @@
input
[
type
=
submit
]
{
padding-left
:
1em
;
padding-right
:
1em
;
margin-right
:
1em
;
}
input
.error
{
border
:
1px
solid
red
;
...
...
@@ -172,7 +173,7 @@
.form-help
{
color
:
gray
;
font-size
:
85%
;
padding-top
:
5px
;
padding-top
:
0
.5em
;
&
:hover
{
color
:
$text-color
;
}
...
...
src/templates/chatroom_form.html
View file @
35a4f9bd
<div
class=
"chatroom-form-container"
>
<form
class=
"pure-form converse-form chatroom-form"
>
<span
class=
"spinner centered"
/>
<form
class=
"pure-form pure-form-stacked converse-form chatroom-form"
>
<fieldset>
<span
class=
"spinner centered"
/>
</fieldset>
</form>
</div>
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