mkws-moved-to-github.git
10 years agoThe switchview show/hide is done using jQuery rather than directly
Mike Taylor [Fri, 2 May 2014 16:02:17 +0000 (17:02 +0100)]
The switchview show/hide is done using jQuery rather than directly
messing with the CSS.

10 years agoMove the M function (translation) from mkws-team.js to mkws-core.js,
Mike Taylor [Fri, 2 May 2014 15:56:11 +0000 (16:56 +0100)]
Move the M function (translation) from mkws-team.js to mkws-core.js,
since it's not team-specific (and never really was).

10 years agoIn fact, remove the local alias M completely, since it's not used!
Mike Taylor [Fri, 2 May 2014 15:54:39 +0000 (16:54 +0100)]
In fact, remove the local alias M completely, since it's not used!

10 years agoDelete obsolete comment.
Mike Taylor [Fri, 2 May 2014 15:51:54 +0000 (16:51 +0100)]
Delete obsolete comment.

10 years agomkws.M is defined, and M made a local alias for it, rather than the
Mike Taylor [Fri, 2 May 2014 15:51:37 +0000 (16:51 +0100)]
mkws.M is defined, and M made a local alias for it, rather than the
other way around. Again, this is just about being honest.

10 years agoLanguage-setting code also honestly uses mkws.config.lang instead of m_config.lang.
Mike Taylor [Fri, 2 May 2014 15:50:14 +0000 (16:50 +0100)]
Language-setting code also honestly uses mkws.config.lang instead of m_config.lang.

10 years agoThe M function (translation) looks up mkws.config.lang rather than
Mike Taylor [Fri, 2 May 2014 15:46:01 +0000 (16:46 +0100)]
The M function (translation) looks up mkws.config.lang rather than
m_config.lang. Doing the latter was lie, since this function gets
called as mkws.M much of the time, and so gets a randomly chosen
team's lang setting; and all teams always have the same lang setting
anyway, since there's no way to set it differently per team.

10 years agoRemove obsolete comment.
Mike Taylor [Fri, 2 May 2014 15:36:32 +0000 (16:36 +0100)]
Remove obsolete comment.

10 years agoThe team-private findnode function is no longer made visible as the
Mike Taylor [Fri, 2 May 2014 15:10:42 +0000 (16:10 +0100)]
The team-private findnode function is no longer made visible as the
team.findnode method. It's not actually been used for a while now,
since widgets know their own nodes. Its continued existence is a bit
of an embarrassment for various reasons, including its knowledge of
how "AUTO" is special and the extremely complex jQuery selectors is
generates in some cases. It would be good to get rid of it completely,
but it's presently (ab)used for full-record display. Is there a good
way to widgetify that?

10 years agoPrefix names of all Handlebars helpers with "mkws-":
Mike Taylor [Fri, 2 May 2014 14:04:10 +0000 (15:04 +0100)]
Prefix names of all Handlebars helpers with "mkws-":
mkws-json
mkws-paragraphs
mkws-translate
mkws-attr
mkws-if-any
mkws-first
mkws-commaList
mkws-index1

This fixes MKWS-172 ("Prefix Handlebars helpers"), which OK was only a
P5, but it irritated my sense of neatness having a P5 hanging around
in the MKWS area with all the good bugs.

10 years agoTweak name of resize-narrow/resize-wide events (now including a hyphen).
Mike Taylor [Thu, 1 May 2014 16:03:31 +0000 (17:03 +0100)]
Tweak name of resize-narrow/resize-wide events (now including a hyphen).
Remove old hardwired hide/show code depending on list.

10 years agoSwitch and Lang widgets hide themselves when the window is narrow.
Mike Taylor [Thu, 1 May 2014 16:02:02 +0000 (17:02 +0100)]
Switch and Lang widgets hide themselves when the window is narrow.

10 years agoNew widget-setup utility function, hideWhenNarrow.
Mike Taylor [Thu, 1 May 2014 16:01:37 +0000 (17:01 +0100)]
New widget-setup utility function, hideWhenNarrow.
Teaches the widget to disappear when the window changes from wide to
narrow, and reappear when it changes from narrow to wide.

10 years agoDocument mkwsTermlists-Container-* instead of mkwsTermlist-Container-*
Mike Taylor [Thu, 1 May 2014 15:48:43 +0000 (16:48 +0100)]
Document mkwsTermlists-Container-* instead of mkwsTermlist-Container-*

10 years agoGenerate mkwsTermlists-Container-* instead of mkwsTermlist-Container-*
Mike Taylor [Thu, 1 May 2014 15:48:33 +0000 (16:48 +0100)]
Generate mkwsTermlists-Container-* instead of mkwsTermlist-Container-*

10 years agoGeneralise the moving as well as the hiding.
Mike Taylor [Thu, 1 May 2014 15:01:17 +0000 (16:01 +0100)]
Generalise the moving as well as the hiding.

10 years agoSet up resize-aware containers for mkwsSearch.
Mike Taylor [Thu, 1 May 2014 14:59:28 +0000 (15:59 +0100)]
Set up resize-aware containers for mkwsSearch.

10 years agoteam.widget returns undefined is there are no widgets of the specified type.
Mike Taylor [Thu, 1 May 2014 14:59:06 +0000 (15:59 +0100)]
team.widget returns undefined is there are no widgets of the specified type.

10 years agoSilly typo.
Mike Taylor [Thu, 1 May 2014 14:58:41 +0000 (15:58 +0100)]
Silly typo.

10 years agoRip out special-case code for moving Termlists between
Mike Taylor [Thu, 1 May 2014 14:44:30 +0000 (15:44 +0100)]
Rip out special-case code for moving Termlists between
Termlist-Container-wide and Termlist-Container-narrow; replace it with
general code that will re-position ANY widget between two different
containers on a narrowing or widening event.

10 years agoWidget facets now render (using toString) with the facet-name included.
Mike Taylor [Thu, 1 May 2014 14:01:00 +0000 (15:01 +0100)]
Widget facets now render (using toString) with the facet-name included.

10 years agoThe m_widgets private member, which maps widget-type to wiget object,
Mike Taylor [Thu, 1 May 2014 13:52:32 +0000 (14:52 +0100)]
The m_widgets private member, which maps widget-type to wiget object,
now maps to an array of widgets of that type. For most types of
widget, only one instance per team makes sense, so the team.widget
method now complains loudly if it's invoked for a type that has more
than one instance -- client code should never do that. visitWidgets
now visits all widgets of the specified type.

10 years agoLess verbose logging when a widget makes new HTML on creation.
Mike Taylor [Thu, 1 May 2014 13:40:05 +0000 (14:40 +0100)]
Less verbose logging when a widget makes new HTML on creation.

10 years agoChange commenting type for team->widgets logging walk.
Mike Taylor [Thu, 1 May 2014 13:09:30 +0000 (14:09 +0100)]
Change commenting type for team->widgets logging walk.

10 years agoCommented-out code to walk team->widgets structure uses visitWidgets
Mike Taylor [Thu, 1 May 2014 13:08:53 +0000 (14:08 +0100)]
Commented-out code to walk team->widgets structure uses visitWidgets

10 years agoRemove lumped team.widgetTypes method with more functional visitWidgets.
Mike Taylor [Thu, 1 May 2014 13:08:24 +0000 (14:08 +0100)]
Remove lumped team.widgetTypes method with more functional visitWidgets.

10 years agoAdd tmp
Mike Taylor [Thu, 1 May 2014 11:35:26 +0000 (12:35 +0100)]
Add tmp

10 years agoTweak resizePage so that is does the appropriate actions on its very
Mike Taylor [Thu, 1 May 2014 11:24:46 +0000 (12:24 +0100)]
Tweak resizePage so that is does the appropriate actions on its very
first call. As a result, we now initially display the narrow version
when viewing in narrow window.

10 years agoresizePage now use team.widget method to find widgets to show/hide.
Mike Taylor [Thu, 1 May 2014 11:10:49 +0000 (12:10 +0100)]
resizePage now use team.widget method to find widgets to show/hide.
This works correctly when the implicit AUTO team is used.

10 years agoTransform resizePage function so the actual work is done only once,
Mike Taylor [Thu, 1 May 2014 09:26:30 +0000 (10:26 +0100)]
Transform resizePage function so the actual work is done only once,
the same code for narrowing and widening.

10 years agoConsolidate both narrow/wide clauses.
Mike Taylor [Wed, 30 Apr 2014 15:54:33 +0000 (16:54 +0100)]
Consolidate both narrow/wide clauses.

10 years agoRename targetWidth -> threshhold.
Mike Taylor [Wed, 30 Apr 2014 15:53:31 +0000 (16:53 +0100)]
Rename targetWidth -> threshhold.

10 years agoSwap order of logging clauses.
Mike Taylor [Wed, 30 Apr 2014 15:53:02 +0000 (16:53 +0100)]
Swap order of logging clauses.

10 years agoRemove the "already wide" and "already narrow" logging.
Mike Taylor [Wed, 30 Apr 2014 15:52:51 +0000 (16:52 +0100)]
Remove the "already wide" and "already narrow" logging.

10 years agoDetection of wide/narrow state changes is now done on the basis of the
Mike Taylor [Wed, 30 Apr 2014 15:51:49 +0000 (16:51 +0100)]
Detection of wide/narrow state changes is now done on the basis of the
stored mkws.width rather than the presence of absence of known magic
elements.

10 years agoAdd logging of size state-changes.
Mike Taylor [Wed, 30 Apr 2014 15:49:36 +0000 (16:49 +0100)]
Add logging of size state-changes.

10 years agoAdd new temporary variable width in resizePage function.
Mike Taylor [Wed, 30 Apr 2014 15:41:45 +0000 (16:41 +0100)]
Add new temporary variable width in resizePage function.

10 years agoRename variable width->targetWidth in resizePage function.
Mike Taylor [Wed, 30 Apr 2014 15:40:48 +0000 (16:40 +0100)]
Rename variable width->targetWidth in resizePage function.

10 years agoresizePage() publishes "resize-narrow" and "resize-wide" events.
Mike Taylor [Wed, 30 Apr 2014 15:35:05 +0000 (16:35 +0100)]
resizePage() publishes "resize-narrow" and "resize-wide" events.
This will allow individual widgets to respond to size-changes.

10 years agoUse mkwsTermlist-container-wide and -narrow instead of mkwsTermlistContainer1 and...
Mike Taylor [Wed, 30 Apr 2014 15:18:54 +0000 (16:18 +0100)]
Use mkwsTermlist-container-wide and -narrow instead of mkwsTermlistContainer1 and 2, part of a new general scheme

10 years agoAdd responsive_design_width.
Mike Taylor [Wed, 30 Apr 2014 15:18:13 +0000 (16:18 +0100)]
Add responsive_design_width.

10 years agoFix embedded stylesheet of heikki-motd.html to address by class rather than ID.
Mike Taylor [Wed, 30 Apr 2014 10:59:41 +0000 (11:59 +0100)]
Fix embedded stylesheet of heikki-motd.html to address by class rather than ID.

10 years agoFix embedded stylesheet of heikki.html to address by class rather than ID.
Mike Taylor [Wed, 30 Apr 2014 10:59:20 +0000 (11:59 +0100)]
Fix embedded stylesheet of heikki.html to address by class rather than ID.

10 years agoAdd null widget definitions for Query, MOTDContainer, Button and Popup.
Mike Taylor [Wed, 30 Apr 2014 10:57:01 +0000 (11:57 +0100)]
Add null widget definitions for Query, MOTDContainer, Button and Popup.
These are all used in the code, but have no functionality of their own.

10 years agoComment out the addWidget logging.
Mike Taylor [Wed, 30 Apr 2014 09:55:30 +0000 (10:55 +0100)]
Comment out the addWidget logging.

10 years agoChange wording of addWidget function's logging.
Mike Taylor [Wed, 30 Apr 2014 09:55:16 +0000 (10:55 +0100)]
Change wording of addWidget function's logging.

10 years agoTest scripts pull in new mkws-widget.js and mkws-widget-main.js rather than old mkws...
Mike Taylor [Wed, 30 Apr 2014 08:14:25 +0000 (09:14 +0100)]
Test scripts pull in new mkws-widget.js and mkws-widget-main.js rather than old mkws-widgets.js

10 years agoCOMPONENTS now includes mkws-widget.js (for the widget factory
Mike Taylor [Wed, 30 Apr 2014 08:06:02 +0000 (09:06 +0100)]
COMPONENTS now includes mkws-widget.js (for the widget factory
function and shared autosearch functionality) and mkws-widget-main.js
(for the main widgets' definitions) in place of the old and
over-monolithic mkws-widgets.js

10 years agoRename mkws-widgets.js to mkws-widget-main.js
Mike Taylor [Wed, 30 Apr 2014 08:03:10 +0000 (09:03 +0100)]
Rename mkws-widgets.js to mkws-widget-main.js

10 years agoMove widget factory function and autosearch functionality out of
Mike Taylor [Wed, 30 Apr 2014 08:02:45 +0000 (09:02 +0100)]
Move widget factory function and autosearch functionality out of
mkws-widgets.js into their own new file mkws-widget.js

10 years agoNew file, mkws-widget.js: contains wiget factory function and
Mike Taylor [Wed, 30 Apr 2014 08:01:34 +0000 (09:01 +0100)]
New file, mkws-widget.js: contains wiget factory function and
autosearch code from the old mkws-widgets.js.

10 years agoRemove not-necessary-after-all newline.
Mike Taylor [Tue, 29 Apr 2014 15:24:21 +0000 (16:24 +0100)]
Remove not-necessary-after-all newline.

10 years agoRename reference-universe.html to reference.html, since the widget it defines and...
Mike Taylor [Tue, 29 Apr 2014 15:24:00 +0000 (16:24 +0100)]
Rename reference-universe.html to reference.html, since the widget it defines and uses is not after all the one that MKWS-156 wants

10 years agoUse as testbed for Reference widget.
Mike Taylor [Tue, 29 Apr 2014 15:17:51 +0000 (16:17 +0100)]
Use as testbed for Reference widget.

10 years agoUse new Handlebars helper, "paragraphs", to render md-description.
Mike Taylor [Tue, 29 Apr 2014 15:17:00 +0000 (16:17 +0100)]
Use new Handlebars helper, "paragraphs", to render md-description.

10 years agoAdd new Handlebars helper, "paragraphs".
Mike Taylor [Tue, 29 Apr 2014 15:16:36 +0000 (16:16 +0100)]
Add new Handlebars helper, "paragraphs".

10 years agoWhitespace.
Mike Taylor [Tue, 29 Apr 2014 14:00:39 +0000 (15:00 +0100)]
Whitespace.

10 years agoAdd MOTD
Mike Taylor [Tue, 29 Apr 2014 12:56:44 +0000 (13:56 +0100)]
Add MOTD

10 years agoInline the code of function mkwsSetLang, which is now gone.
Mike Taylor [Tue, 29 Apr 2014 12:56:20 +0000 (13:56 +0100)]
Inline the code of function mkwsSetLang, which is now gone.

10 years agoOops, remove the spurious alert() from the MOTD widget!
Mike Taylor [Tue, 29 Apr 2014 12:54:54 +0000 (13:54 +0100)]
Oops, remove the spurious alert() from the MOTD widget!

10 years agoRemove unused return from end of mkwsSetLang
Mike Taylor [Tue, 29 Apr 2014 12:53:55 +0000 (13:53 +0100)]
Remove unused return from end of mkwsSetLang

10 years agoMove function mkwsSetLang() to the end of the team object, where it's used.
Mike Taylor [Tue, 29 Apr 2014 12:53:14 +0000 (13:53 +0100)]
Move function mkwsSetLang() to the end of the team object, where it's used.

10 years agofunction mkwsHtmlAll is GONE!
Mike Taylor [Tue, 29 Apr 2014 12:52:25 +0000 (13:52 +0100)]
function mkwsHtmlAll is GONE!
I think we may now be fully widgeted.

10 years agoAdd MOTD widget.
Mike Taylor [Tue, 29 Apr 2014 12:51:57 +0000 (13:51 +0100)]
Add MOTD widget.

10 years agoRemove unused "none" case from switchView.
Mike Taylor [Tue, 29 Apr 2014 12:46:04 +0000 (13:46 +0100)]
Remove unused "none" case from switchView.

10 years agoMove the defaultTemplate function, which was never team-specific, up into the MKWS...
Mike Taylor [Tue, 29 Apr 2014 12:44:32 +0000 (13:44 +0100)]
Move the defaultTemplate function, which was never team-specific, up into the MKWS global core

10 years agoCall mkwsSetLang separately from mkwsHtmlAll.
Mike Taylor [Tue, 29 Apr 2014 12:41:24 +0000 (13:41 +0100)]
Call mkwsSetLang separately from mkwsHtmlAll.

10 years agoRip out the mkwsHtmlLang and lang_url functions.
Mike Taylor [Tue, 29 Apr 2014 12:39:44 +0000 (13:39 +0100)]
Rip out the mkwsHtmlLang and lang_url functions.

10 years agoLang widget now generates its own HTML
Mike Taylor [Tue, 29 Apr 2014 12:39:14 +0000 (13:39 +0100)]
Lang widget now generates its own HTML

10 years agoMove show_lang logic inside mkwsHtmlLang.
Mike Taylor [Tue, 29 Apr 2014 12:32:18 +0000 (13:32 +0100)]
Move show_lang logic inside mkwsHtmlLang.

10 years agoAdd team.sortOrder access method.
Mike Taylor [Tue, 29 Apr 2014 12:28:16 +0000 (13:28 +0100)]
Add team.sortOrder access method.
Remove all code to generate the mkwsSelect area.
(Done by a new widget.)

10 years agoAdd new "Ranking" widget.
Mike Taylor [Tue, 29 Apr 2014 12:27:34 +0000 (13:27 +0100)]
Add new "Ranking" widget.
Uses mkwsHtmlSort and mkwsHtmlPerpage functions to generate mkwsSort
and mkwsPerpage widgets.

10 years agoMerge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws
Mike Taylor [Tue, 29 Apr 2014 11:21:59 +0000 (12:21 +0100)]
Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws

10 years agoNo changes at all -- git is confused again
Mike Taylor [Tue, 29 Apr 2014 11:20:39 +0000 (12:20 +0100)]
No changes at all -- git is confused again

10 years agoRemove mkwsRecords magic, now in the widget.
Mike Taylor [Tue, 29 Apr 2014 11:19:26 +0000 (12:19 +0100)]
Remove mkwsRecords magic, now in the widget.
Likewise for creating the individual Facet widgets within Termlists.

10 years agoTermlists widget creates the individual Facet widgets therein.
Mike Taylor [Tue, 29 Apr 2014 11:11:44 +0000 (12:11 +0100)]
Termlists widget creates the individual Facet widgets therein.

10 years agolog() emits a stack-trace, rather than a function listing, when mkws.log_level >= 3.
Mike Taylor [Tue, 29 Apr 2014 10:32:52 +0000 (11:32 +0100)]
log() emits a stack-trace, rather than a function listing, when mkws.log_level >= 3.

10 years agoMerge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws
John Malconian [Mon, 28 Apr 2014 18:00:32 +0000 (18:00 +0000)]
Merge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws

10 years agochanged SP host from 'mkc.indexdata.com:9009' to 'sp-mkc.indexdata.com' which points...
John Malconian [Mon, 28 Apr 2014 18:00:22 +0000 (18:00 +0000)]
changed SP host from 'mkc.indexdata.com:9009' to 'sp-mkc.indexdata.com' which points to SP instances on arya and sansa

10 years agoMerge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws
John Malconian [Mon, 28 Apr 2014 17:55:42 +0000 (17:55 +0000)]
Merge branch 'master' of ssh://git.indexdata.com:222/home/git/private/mkws

10 years agoexamples/htdocs/mike.html
John Malconian [Mon, 28 Apr 2014 17:55:35 +0000 (17:55 +0000)]
examples/htdocs/mike.html

10 years agochanged SP host from 'mkc.indexdata.com:9009' to 'sp-mkc.indexdata.com' which points...
John Malconian [Mon, 28 Apr 2014 17:52:17 +0000 (17:52 +0000)]
changed SP host from 'mkc.indexdata.com:9009' to 'sp-mkc.indexdata.com' which points to SP instances on arya and sansa.

10 years agoRemove Search and SearchForm code, now down in the widgets.
Mike Taylor [Mon, 28 Apr 2014 16:48:15 +0000 (17:48 +0100)]
Remove Search and SearchForm code, now down in the widgets.

10 years agoNew widgets Search and SearchForm.
Mike Taylor [Mon, 28 Apr 2014 16:47:42 +0000 (17:47 +0100)]
New widgets Search and SearchForm.

10 years agoCompletely remove the mkwsHtmlSwitch() function, since all it did was
Mike Taylor [Mon, 28 Apr 2014 16:29:45 +0000 (17:29 +0100)]
Completely remove the mkwsHtmlSwitch() function, since all it did was
generate the mkwsTargets inner HTML, which the widget now does for
itself.

10 years agoTargerts function generates its own inner HTML.
Mike Taylor [Mon, 28 Apr 2014 16:29:15 +0000 (17:29 +0100)]
Targerts function generates its own inner HTML.

10 years agoRemove UpperCase widget.
Mike Taylor [Mon, 28 Apr 2014 16:26:38 +0000 (17:26 +0100)]
Remove UpperCase widget.

10 years agoSwitch widget now generates it own HTML.
Mike Taylor [Mon, 28 Apr 2014 16:26:22 +0000 (17:26 +0100)]
Switch widget now generates it own HTML.
(For now it also generates a sub-widget, and we define that widget
type -- UpperCase -- too. That's just as a proof of concept. I'll
delete it in the next delta, but I want it in the VC history.)

10 years ago mkwsHtmlSwitch no longer sets up the .mkwsSwitch element, because now
Mike Taylor [Mon, 28 Apr 2014 16:23:18 +0000 (17:23 +0100)]
 mkwsHtmlSwitch no longer sets up the .mkwsSwitch element, because now
 the widget can do this itself.

10 years agoMain iteration to create widgets moved to new function
Mike Taylor [Mon, 28 Apr 2014 16:08:12 +0000 (17:08 +0100)]
Main iteration to create widgets moved to new function
makeWidgetsWithin. This now recursively calls itself to re-parse new
content generated within a widget during its creation. The upshot is
the widgets can now hold other widgets, and we're going to be able to
move a shedload of code out of mkws-team.js into the individual
widgets. Yay us! Fixes MKWS-180.

10 years agoMike's playground goes back to the vanilla MKWS application.
Mike Taylor [Mon, 28 Apr 2014 15:58:09 +0000 (16:58 +0100)]
Mike's playground goes back to the vanilla MKWS application.

10 years agoRework Makefile to better classify files.
Mike Taylor [Mon, 28 Apr 2014 11:10:17 +0000 (12:10 +0100)]
Rework Makefile to better classify files.

10 years agoThe widget.autosearch function now understands queries of the form
Mike Taylor [Sat, 26 Apr 2014 00:26:23 +0000 (01:26 +0100)]
The widget.autosearch function now understands queries of the form
!var!name (as well as !param!name and !path!number)

Allows the application to set the query into a named variable in
whatever way it wishes, and have MKWS obtain it from that variable.

Fixes bug MKWS-170.

10 years agoExample of !var!name autosearch.
Mike Taylor [Sat, 26 Apr 2014 00:22:35 +0000 (01:22 +0100)]
Example of !var!name autosearch.

10 years agoDo not include the MKWS stylesheet.
Mike Taylor [Fri, 25 Apr 2014 17:03:43 +0000 (18:03 +0100)]
Do not include the MKWS stylesheet.
Use only our own mkws-widget-reference stylesheet.

10 years ago<img> is emitted before <h1>, so it floats to the right of that, too.
Mike Taylor [Fri, 25 Apr 2014 17:01:08 +0000 (18:01 +0100)]
<img> is emitted before <h1>, so it floats to the right of that, too.

10 years agoReduce margin.
Mike Taylor [Fri, 25 Apr 2014 17:00:27 +0000 (18:00 +0100)]
Reduce margin.

10 years agoAdd styling for .mkwsReference img.
Mike Taylor [Fri, 25 Apr 2014 17:00:07 +0000 (18:00 +0100)]
Add styling for .mkwsReference img.

10 years agoRemove styling from generated <img>.
Mike Taylor [Fri, 25 Apr 2014 16:59:55 +0000 (17:59 +0100)]
Remove styling from generated <img>.
It belongs in the CSS file.

10 years agoAdd maximum width.
Mike Taylor [Fri, 25 Apr 2014 16:58:27 +0000 (17:58 +0100)]
Add maximum width.