Skip to content

Commit 68c0300

Browse files
author
Koen Deforche
committed
add conf. parameter for double-click-timeout, fix WPopupMenu within WNavigationBar
1 parent 25bc507 commit 68c0300

File tree

22 files changed

+504
-365
lines changed

22 files changed

+504
-365
lines changed

examples/widgetgallery/approot/src.xml

Lines changed: 322 additions & 316 deletions
Large diffs are not rendered by default.

examples/widgetgallery/examples/LargeTableView.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ tableView->setSortingEnabled(false);
1313
tableView->setAlternatingRowColors(true);
1414
tableView->setRowHeight(28);
1515
tableView->setHeaderHeight(28);
16+
tableView->setSelectionMode(Wt::ExtendedSelection);
17+
tableView->setEditTriggers(Wt::WAbstractItemView::NoEditTrigger);
1618

1719
tableView->resize(650, 400);
1820

examples/widgetgallery/examples/SmallTableView.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ tableView->setAlternatingRowColors(true);
1515
tableView->setRowHeight(28);
1616
tableView->setHeaderHeight(28);
1717
tableView->setSelectionMode(Wt::SingleSelection);
18+
tableView->setEditTriggers(Wt::WAbstractItemView::NoEditTrigger);
1819

1920
/*
2021
* Configure column widths and matching table width

examples/widgetgallery/examples/TreeView.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ treeView->setRowHeight(24);
1616
treeView->setHeaderHeight(24);
1717
treeView->setSortingEnabled(false);
1818
treeView->setSelectionMode(Wt::SingleSelection);
19+
treeView->setEditTriggers(Wt::WAbstractItemView::NoEditTrigger);
1920

2021
SAMPLE_END(return treeView)

examples/wt-homepage/Home.C

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Home::Home(const WEnvironment& env, const std::string& title,
4848
useStyleSheet(cssPath + "/wt_ie.css", "lt IE 7");
4949
useStyleSheet("css/home.css");
5050
useStyleSheet("css/sourceview.css");
51+
useStyleSheet("css/chatwidget.css");
52+
useStyleSheet("css/chatwidget_ie6.css", "lt IE 7");
5153
setTitle(title);
5254

5355
setLocale("");
@@ -269,15 +271,15 @@ WWidget *Home::blog()
269271
void Home::chatSetUser(const WString& userName)
270272
{
271273
WApplication::instance()->doJavaScript
272-
("if (window.chat) "
273-
"try {"
274-
"""window.chat.emit(window.chat, 'login', "
275-
"" "" + userName.jsStringLiteral() + "); "
276-
"} catch (e) {"
277-
"""window.chatUser = " + userName.jsStringLiteral() + ";"
278-
"}"
279-
"else "
280-
"""window.chatUser = " + userName.jsStringLiteral() + ";");
274+
("if (window.chat && window.chat.emit) {"
275+
"""try {"
276+
"" "window.chat.emit(window.chat, 'login', "
277+
"" "" + userName.jsStringLiteral() + "); "
278+
"""} catch (e) {"
279+
"" "window.chatUser=" + userName.jsStringLiteral() + ";"
280+
"""}"
281+
"} else "
282+
"""window.chatUser=" + userName.jsStringLiteral() + ";");
281283
}
282284

283285
WWidget *Home::status()
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
.chat-widget {
2+
position: fixed;
3+
right: 5px;
4+
bottom: 0px;
5+
border: 1px solid #BBB;
6+
border-bottom: 0px;
7+
z-index: 100;
8+
background-color: white;
9+
}
10+
11+
.chat-minimized {
12+
width: 185px;
13+
height: 20px;
14+
}
15+
16+
.chat-maximized {
17+
width: 200px;
18+
height: 250px;
19+
}
20+
21+
.chat-bar {
22+
height: 21px;
23+
padding: 2px 5px;
24+
background-color: #70bd1A;
25+
color: white;
26+
}
27+
28+
.chat-bar.alert {
29+
background-color: #D05D2A;
30+
}
31+
32+
.chat-bar .chat-minmax {
33+
float: right;
34+
width: 16px;
35+
height: 16px;
36+
}
37+
38+
.chat-bar .self {
39+
font-size: 110%;
40+
font-weight: bold;
41+
}
42+
43+
.chat-bar .online {
44+
color: #DDDDDD;
45+
}
46+
47+
.chat-maximized .chat-bar .chat-minmax {
48+
background: url(icons/minimize.png) no-repeat center center;
49+
}
50+
51+
.chat-minimized .chat-bar .chat-minmax {
52+
background: url(icons/maximize.png) no-repeat center center;
53+
}
54+
55+
.chat-self {
56+
color: #B42600;
57+
font-weight: bold;
58+
padding-right: 0.2em;
59+
}
60+
61+
.chat-highlight {
62+
font-weight: bold;
63+
}
64+
65+
.chat-msg {
66+
padding: 0px 3px;
67+
line-height: 1.3;
68+
}
69+
70+
.chat-info {
71+
font-style: oblique;
72+
color: gray;
73+
}
74+
75+
.chat-user {
76+
color: #DD7200;
77+
font-weight: bold;
78+
padding-right: 0.2em;
79+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.chat-widget {
2+
position: absolute;
3+
right: expression(((ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft + 5)) + 'px' );
4+
bottom: expression(((ignoreMe3 = document.body.innerHeight - (window.innerHeight + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)))) + 'px' );
5+
}

examples/wt-homepage/wt-home.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ Download the package
988988
(<a href="http://www.webtoolkit.eu/packages/winst-0.4.tar.gz">winst-0.4.tar.gz</a>)
989989
or get the latest git version:
990990
<div class="fragment">
991-
<pre class="fragment">$ git clone git://github.com/kdeforche/wt.git</pre>
991+
<pre class="fragment">$ git clone git://github.com/kdeforche/winst.git</pre>
992992
</div>
993993
</p>
994994

resources/themes/bootstrap/wt.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@
9696
-moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
9797
box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
9898
}
99+
/*
100+
* Fix submens in popup menus in navbar
101+
*/
102+
.navbar .nav > li > .dropdown-menu.submenu:before {
103+
display: none;
104+
}
105+
.navbar .nav > li > .dropdown-menu.submenu:after {
106+
display: none;
107+
}
99108
/*
100109
* Dialog extensions
101110
*/
@@ -716,7 +725,7 @@ body.Wt-rtl .Wt-tableview .Wt-plaintable tbody .Wt-tv-c {
716725
margin-left: 7px;
717726
}
718727
.Wt-treeview .Wt-tv-br,
719-
.Wt-treeview .Wt-tv-node .Wt-tv-c {
728+
.Wt-treeview ul .Wt-tv-c {
720729
/* data */
721730

722731
margin-right: 0px;
@@ -788,7 +797,7 @@ body.Wt-rtl .Wt-treeview .Wt-header .Wt-tv-c {
788797
margin-right: 7px;
789798
}
790799
body.Wt-rtl .Wt-treeview .Wt-tv-br,
791-
body.Wt-rtl .Wt-treeview .Wt-tv-node .Wt-tv-row .Wt-tv-c {
800+
body.Wt-rtl .Wt-treeview ul .Wt-tv-row .Wt-tv-c {
792801
/* data */
793802

794803
margin-right: 1px;

resources/themes/bootstrap/wt.less

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@
8282
.box-shadow(inset 0 3px 8px rgba(0,0,0,.125));
8383
}
8484

85+
/*
86+
* Fix submens in popup menus in navbar
87+
*/
88+
.navbar .nav > li > .dropdown-menu.submenu:before {
89+
display: none;
90+
}
91+
92+
.navbar .nav > li > .dropdown-menu.submenu:after {
93+
display: none;
94+
}
95+
8596
/*
8697
* Dialog extensions
8798
*/

0 commit comments

Comments
 (0)