@@ -38,6 +38,12 @@ function loadProvisuToolbar(element, url, file, extra) {
3838 var json = JSON . parse ( evt . target . responseText ) ;
3939 generateHTML ( element , url , json , extra ) ;
4040 $ ( function ( ) {
41+ $ ( '#toolbar-smaller' ) . click ( function ( ) {
42+ setFontSize ( - 4 ) ;
43+ } ) ;
44+ $ ( '#toolbar-bigger' ) . click ( function ( ) {
45+ setFontSize ( 4 ) ;
46+ } ) ;
4147 $ ( '[data-toggle="tooltip"]' ) . tooltip ( {
4248 container : 'body' ,
4349 template : '<div class="tooltip tooltip-big" role="tooltip">' +
@@ -135,9 +141,31 @@ function generateHTML(element, url, i18n, extra) {
135141
136142 if ( extra ) {
137143 html = '<div class="btn-group" role="group" aria-label="...">' +
138- '<a href="/service?url=' + url + '" class="btn btn-default" ' +
144+ '<a href="/service?url=' + url + '&filter=normal" ' +
145+ 'class="btn btn-default" data-toggle="tooltip" data-placement="bottom" ' +
146+ 'title="' + i18n . toolbarDescription . message + ' - ' +
147+ i18n . infoNormal . message + '">' +
148+ '<i class="fa fa-low-vision fa-2x" aria-hidden="true"></i>' +
149+ '</a>' +
150+ '<a href="/service?url=' + url + '&filter=black" ' +
151+ 'class="btn btn-default tooltip-bk hidden-xs" ' +
139152 'data-toggle="tooltip" data-placement="bottom" ' +
140- 'title="' + i18n . toolbarDescription . message + '">' +
153+ 'title="' + i18n . toolbarDescription . message + ' - ' +
154+ i18n . infoBlack . message + '">' +
155+ '<i class="fa fa-low-vision fa-2x" aria-hidden="true"></i>' +
156+ '</a>' +
157+ '<a href="/service?url=' + url + '&filter=blue" ' +
158+ 'class="btn btn-default tooltip-bl hidden-xs" ' +
159+ 'data-toggle="tooltip" data-placement="bottom" ' +
160+ 'title="' + i18n . toolbarDescription . message + ' - ' +
161+ i18n . infoBlue . message + '">' +
162+ '<i class="fa fa-low-vision fa-2x" aria-hidden="true"></i>' +
163+ '</a>' +
164+ '<a href="/service?url=' + url + '&filter=cyan" ' +
165+ 'class="btn btn-default tooltip-cy hidden-xs" ' +
166+ 'data-toggle="tooltip" data-placement="bottom" ' +
167+ 'title="' + i18n . toolbarDescription . message + ' - ' +
168+ i18n . infoCyan . message + '">' +
141169 '<i class="fa fa-low-vision fa-2x" aria-hidden="true"></i>' +
142170 '</a>' +
143171 '<button type="button" class="btn btn-default" id="toolbar-smaller" ' +
@@ -154,3 +182,12 @@ function generateHTML(element, url, i18n, extra) {
154182 }
155183 document . getElementById ( element ) . innerHTML = html ;
156184}
185+
186+ $ ( function ( ) {
187+ $ ( '[data-toggle="tooltip"]' ) . tooltip ( {
188+ container : 'body' ,
189+ template : '<div class="tooltip tooltip-big" role="tooltip">' +
190+ '<div class="tooltip-arrow"></div>' +
191+ '<div class="tooltip-inner tooltip-wide"></div></div>' ,
192+ } ) ;
193+ } ) ;
0 commit comments