File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ body { margin: 0; }
58
58
html , body {height : 100% }
59
59
}
60
60
61
- cxx-docnum { string-set : docnum content (); }
62
61
* / deep/ .docname { string-set : docname content (); }
63
62
* / deep/ .pubyear { string-set : pubyear content (); }
64
63
Original file line number Diff line number Diff line change 68
68
< template if ="{{docnum}} ">
69
69
< tr > < th > Document Number:</ th > < td > < content select ="cxx-docnum "> </ content > </ td > </ tr >
70
70
</ template >
71
- < template if ="{{pubdate }} ">
72
- < tr > < th > Date:</ th > < td > < content select =" time[pubdate] " > </ content > </ td > </ tr >
71
+ < template if ="{{hasPubdate }} ">
72
+ < tr > < th > Date:</ th > < td > < time pubdate > < span class =" pubyear " > {{pubyear}} </ span > -{{pubmonth}}-{{pubday}} </ time > </ td > </ tr >
73
73
</ template >
74
74
< template if ="{{revises}} ">
75
75
< tr > < th > Revises:</ th > < td > < content select ="cxx-revises "> </ content > </ td > </ tr >
@@ -93,7 +93,7 @@ <h1>Working Draft, {{title}}</h1>
93
93
< div class ="header ">
94
94
< template if ="{{stage == 'pdts' || stage == 'dts'}} ">
95
95
< strong > ISO/IEC JTC1 SC22 WG21 < content select ="cxx-docnum "/> </ content> </ strong> < br />
96
- Date: < content select =" time[pubdate] " > </ content > < br />
96
+ Date: < time pubdate > < span class =" pubyear " > {{pubyear}} </ span > -{{pubmonth}}-{{pubday}} </ time > < br />
97
97
< template if ="{{stage == 'pdts'}} ">
98
98
ISO/IEC PDTS < content select ="cxx-project-number "> </ content > < br />
99
99
</ template >
@@ -178,7 +178,7 @@ <h2>Langages de programmation — {{title_fr}}</h2>
178
178
<!-- Find your project number at https://isocpp.org/std/status. -->
179
179
< template > < content > </ content > </ template >
180
180
</ polymer-element >
181
- < polymer-element name ="cxx-docnum " noscript >
181
+ < polymer-element name ="cxx-docnum " noscript class =" docname " >
182
182
< template > < content > </ content > </ template >
183
183
</ polymer-element >
184
184
< polymer-element name ="cxx-editor " noscript >
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ limitations under the License.
18
18
// Default properties
19
19
projectNumber : null ,
20
20
docnum : null ,
21
- pubdate : null ,
21
+ hasPubdate : false ,
22
22
editor : null ,
23
23
revises : null ,
24
24
title : null ,
@@ -65,8 +65,14 @@ limitations under the License.
65
65
domReady : function ( ) {
66
66
this . projectNumber = this . querySelector ( 'cxx-project-number' ) ;
67
67
this . docnum = this . querySelector ( 'cxx-docnum' ) ;
68
- this . pubdate = this . querySelector ( 'time[pubdate]' ) ;
69
- this . pubyear = new Date ( this . pubdate . textContent . split ( '-' ) ) . getFullYear ( ) ;
68
+ var pubdateElem = this . querySelector ( 'time[pubdate]' ) ;
69
+ this . hasPubdate = ! ! pubdateElem ;
70
+ if ( pubdateElem ) {
71
+ var pubdate = pubdateElem . textContent . split ( '-' ) ;
72
+ this . pubyear = pubdate [ 0 ] ;
73
+ this . pubmonth = pubdate [ 1 ] ;
74
+ this . pubday = pubdate [ 2 ] ;
75
+ }
70
76
this . editor = this . querySelector ( 'cxx-editor' ) ;
71
77
this . revises = this . querySelector ( 'cxx-revises' ) ;
72
78
You can’t perform that action at this time.
0 commit comments