Skip to content
Commits on Source (3)
...@@ -16,19 +16,23 @@ ...@@ -16,19 +16,23 @@
var update_all = function() var update_all = function()
{ {
$.ajax( { $.ajax( {
url: "{{ url_for( 'pianos_update_all_accounts' ) }}", url: "{{ url_for( 'pianos_update_all_accounts' ) }}",
dataType: 'json', dataType: "json",
success: function( data ) success: function( data )
{ {
if( ! data.error ) if( ! data.error )
{ {
toastr.success( "PiAnoS updated" ); toastr.success( "PiAnoS updated" );
} else { } else {
toastr.error( "Error while updating" ); toastr.error( "Error while updating" );
} }
} },
} ); error: function()
{
toastr.error( "Network error" );
}
} );
} }
</script> </script>
</head> </head>
...@@ -45,15 +49,15 @@ ...@@ -45,15 +49,15 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$( "#pianos_update_all_accounts_button" ) $( "#pianos_update_all_accounts_button" )
.on( 'click', update_all ); .on( "click", update_all );
$( '#icnml_navigation_pianos' )
.addClass( 'activated' );
$( '#navloc' ).append( $( "#icnml_navigation_pianos" )
$( '<span />' ).text( "PiAnoS Actions" ) .addClass( "activated" );
);
$( "#navloc" ).append(
$( "<span />" ).text( "PiAnoS Actions" )
);
</script> </script>
</body> </body>
</html> </html>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<h1 style="margin-bottom: 0px">ICNML</h1> <h1 style="margin-bottom: 0px">ICNML</h1>
<h4 style="margin-top: 0px">International Close Non-Matches Library</h4> <h4 style="margin-top: 0px">International Close Non-Matches Library</h4>
<div class="ui-widget-header ui-corner-top icnml_box_top">Please enter your login information</div> <div class="ui-widget-header ui-corner-top icnml_box_top">Please enter the following information to configure you account:</div>
<div id="icnml_homepage_form" class="ui-widget-content ui-corner-bottom icnml_box_content"> <div id="icnml_homepage_form" class="ui-widget-content ui-corner-bottom icnml_box_content">
<div id="icnml_user_configuration"> <div id="icnml_user_configuration">
<div id="icnml_box_fields" class="icnml_box_fields"> <div id="icnml_box_fields" class="icnml_box_fields">
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
var totp_build = function() var totp_build = function()
{ {
var totpvalue = `<div style="min-height: 378px"> var totpdiv = `<div style="min-height: 378px">
<img alt="qrcode" id="icnml_qrcode" width="100%"> <img alt="qrcode" id="icnml_qrcode" width="100%">
</div> </div>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</a> </a>
</div>`; </div>`;
$( '#icnml_user_configuration' ).html( totpvalue ); $( '#icnml_user_configuration' ).html( totpdiv );
var fetch_secret = function() var fetch_secret = function()
{ {
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
$( document ).ready( function() $( document ).ready( function()
{ {
if( !window.crypto || !window.crypto.subtle || !window.TextEncoder || !window.TextDecoder) if( !window.crypto || !window.crypto.subtle || !window.TextEncoder || !window.TextDecoder )
{ {
$( '#warning' ) $( '#warning' )
.text( "Your browser does not support client-side cryptography. Please use compatible browser (Firefox, Chrome, Opera, Safari, ...) to protect your password before sending it to the ICNML server." ); .text( "Your browser does not support client-side cryptography. Please use compatible browser (Firefox, Chrome, Opera, Safari, ...) to protect your password before sending it to the ICNML server." );
......