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
7e62546d
Commit
7e62546d
authored
Jun 15, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inverse: move brand heading into template
parent
3181956b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
67 deletions
+69
-67
css/inverse.css
css/inverse.css
+19
-19
sass/inverse/_controlbox.scss
sass/inverse/_controlbox.scss
+1
-0
sass/inverse/_core.scss
sass/inverse/_core.scss
+25
-24
src/converse-inverse.js
src/converse-inverse.js
+23
-24
src/templates/brand_heading.html
src/templates/brand_heading.html
+1
-0
No files found.
css/inverse.css
View file @
7e62546d
...
...
@@ -1482,25 +1482,24 @@ body {
font-family
:
"Lora"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#ffffff
;
background-color
:
#578EA9
;
}
div
.content
{
height
:
100vh
;
width
:
100vw
;
position
:
fixed
;
background-color
:
#578EA9
;
}
div
.content
.inner-content
{
text-align
:
center
;
padding
:
7%
;
padding-left
:
-webkit-calc
(
5%
+
250px
);
padding-left
:
calc
(
5%
+
250px
);
}
div
.content
.inner-content
.brand-heading
{
font-size
:
600%
;
margin-left
:
-10%
;
}
div
.content
.inner-content
.brand-heading
.icon-conversejs
{
font-size
:
88%
;
}
div
.content
.inner-content
p
.no-chats
{
padding-right
:
10%
;
font-size
:
120%
;
}
body
.brand-heading
{
font-size
:
600%
;
margin-left
:
-10%
;
}
body
.brand-heading
.icon-conversejs
{
font-size
:
88%
;
}
body
div
.content
{
height
:
100vh
;
width
:
100vw
;
position
:
fixed
;
background-color
:
#578EA9
;
}
body
div
.content
.inner-content
{
text-align
:
center
;
padding
:
7%
;
padding-left
:
-webkit-calc
(
5%
+
250px
);
padding-left
:
calc
(
5%
+
250px
);
}
body
div
.content
.inner-content
p
.no-chats
{
padding-right
:
10%
;
font-size
:
120%
;
}
#conversejs
{
width
:
100vw
;
...
...
@@ -2327,6 +2326,7 @@ div.content {
float
:
left
;
margin
:
0
;
}
#conversejs
#controlbox
#login-dialog
.brand-heading
,
#conversejs
#controlbox
#register
.brand-heading
{
font-size
:
600%
;
margin
:
10%
0
0
0
;
color
:
#387592
;
}
#conversejs
#controlbox
#login-dialog
.converse-form
,
#conversejs
#controlbox
#register
.converse-form
{
...
...
sass/inverse/_controlbox.scss
View file @
7e62546d
...
...
@@ -7,6 +7,7 @@
#login-dialog
,
#register
{
.brand-heading
{
font-size
:
600%
;
margin
:
10%
0
0
0
;
color
:
$blue
;
}
...
...
sass/inverse/_core.scss
View file @
7e62546d
body
{
width
:
100%
;
height
:
100%
;
font-family
:
"Lora"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#ffffff
;
background-color
:
$global-background-color
;
}
div
.content
{
height
:
100vh
;
width
:
100vw
;
position
:
fixed
;
width
:
100%
;
height
:
100%
;
font-family
:
"Lora"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#ffffff
;
background-color
:
$global-background-color
;
.inner-content
{
text-align
:
center
;
padding
:
7%
;
@include
calc
(
padding-left
,
'5% +
#{
$controlbox-width
}
'
);
.brand-heading
{
font-size
:
600%
;
margin-left
:
-10%
;
.icon-conversejs
{
font-size
:
88%
;
}
}
div
.content
{
height
:
100vh
;
width
:
100vw
;
position
:
fixed
;
background-color
:
$global-background-color
;
.brand-heading
{
font-size
:
600%
;
margin-left
:
-10%
;
.icon-conversejs
{
font-size
:
88%
;
.inner-content
{
text-align
:
center
;
padding
:
7%
;
@include
calc
(
padding-left
,
'5% +
#{
$controlbox-width
}
'
);
p
.no-chats
{
padding-right
:
10%
;
font-size
:
120%
;
}
}
p
.no-chats
{
padding-right
:
10%
;
font-size
:
120%
;
}
}
}
...
...
src/converse-inverse.js
View file @
7e62546d
...
...
@@ -4,21 +4,39 @@
// Copyright (c) 2012-2016, Jan-Carel Brand <jc@opkode.com>
// Licensed under the Mozilla Public License (MPLv2)
//
/*global
Backbone, define, window
*/
/*global
define
*/
(
function
(
root
,
factory
)
{
define
([
"
converse-core
"
,
"
tpl!brand_heading
"
,
"
converse-chatview
"
,
"
converse-controlbox
"
,
"
converse-muc
"
,
"
converse-singleton
"
],
factory
);
}(
this
,
function
(
converse
)
{
}(
this
,
function
(
converse
,
tpl_brand_heading
)
{
"
use strict
"
;
var
$
=
converse
.
env
.
jQuery
,
Strophe
=
converse
.
env
.
Strophe
,
_
=
converse
.
env
.
_
;
function
createBrandHeadingElement
()
{
var
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
tpl_brand_heading
();
return
div
.
firstChild
;
}
function
isMessageToHiddenChat
(
_converse
,
message
)
{
var
jid
=
Strophe
.
getBareJidFromJid
(
message
.
getAttribute
(
'
from
'
));
var
model
=
_converse
.
chatboxes
.
get
(
jid
);
if
(
!
_
.
isNil
(
model
))
{
return
model
.
get
(
'
hidden
'
);
}
// Not having a chat box is assume to be practically the same
// as it being hidden.
return
true
;
}
converse
.
plugins
.
add
(
'
converse-inverse
'
,
{
overrides
:
{
...
...
@@ -37,7 +55,7 @@
shouldNotifyOfMessage
:
function
(
message
)
{
var
_converse
=
this
.
__super__
.
_converse
;
var
result
=
this
.
__super__
.
shouldNotifyOfMessage
.
apply
(
this
,
arguments
);
return
result
&&
_converse
.
isMessageToHiddenChat
(
message
);
return
result
&&
isMessageToHiddenChat
(
_converse
,
message
);
},
ControlBoxView
:
{
...
...
@@ -50,11 +68,8 @@
renderRegistrationPanel
:
function
()
{
this
.
__super__
.
renderRegistrationPanel
.
apply
(
this
,
arguments
);
// TODO: put into template
var
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
'
<h1 class="brand-heading"><i class="icon-conversejs"></i> inVerse</h1>
'
;
var
el
=
document
.
getElementById
(
'
converse-register
'
);
el
.
parentNode
.
insertBefore
(
div
.
firstChild
,
el
);
el
.
parentNode
.
insertBefore
(
createBrandHeadingElement
()
,
el
);
return
this
;
},
...
...
@@ -62,11 +77,8 @@
this
.
__super__
.
renderLoginPanel
.
apply
(
this
,
arguments
);
this
.
el
.
classList
.
add
(
"
fullscreen
"
);
// TODO: put into template
var
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
'
<h1 class="brand-heading"><i class="icon-conversejs"></i> inVerse</h1>
'
;
var
el
=
document
.
getElementById
(
'
converse-login
'
);
el
.
parentNode
.
insertBefore
(
div
.
firstChild
,
el
);
el
.
parentNode
.
insertBefore
(
createBrandHeadingElement
()
,
el
);
return
this
;
}
},
...
...
@@ -85,8 +97,6 @@
},
initialize
:
function
()
{
var
_converse
=
this
.
_converse
;
this
.
updateSettings
({
chatview_avatar_height
:
44
,
chatview_avatar_width
:
44
,
...
...
@@ -96,17 +106,6 @@
sounds_path
:
'
/node_modules/converse.js/sounds/
'
,
// New default
sticky_controlbox
:
true
,
});
_converse
.
isMessageToHiddenChat
=
function
(
message
)
{
var
jid
=
Strophe
.
getBareJidFromJid
(
message
.
getAttribute
(
'
from
'
));
var
model
=
_converse
.
chatboxes
.
get
(
jid
);
if
(
!
_
.
isNil
(
model
))
{
return
model
.
get
(
'
hidden
'
);
}
// Not having a chat box is assume to be practically the same
// as it being hidden.
return
true
;
}
}
});
}));
src/templates/brand_heading.html
0 → 100644
View file @
7e62546d
<h1
class=
"brand-heading"
><i
class=
"icon-conversejs"
></i>
inVerse
</h1>
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