Skip to content
Snippets Groups Projects
actions.html 2.04 KiB
Newer Older
<!DOCTYPE html>
<html>
    <head>
        {% for src in js %}
            <script type="text/javascript" src="{{ src }}"></script>
        {% endfor %}
        {% for src in css %}
            <link type="text/css" rel="stylesheet" href="{{ src }}">
        {% endfor %}
        
        <script type="text/javascript" src="{{ url_for( 'send_app_files', path = 'functions.js' ) }}"></script>
        <link type="text/css" rel="stylesheet" href="{{ url_for( 'send_app_files', path = 'app.css' ) }}">
        
        <script type="text/javascript">
            baseurl = "{{ baseurl }}";
            
            var update_all = function()
            {
            	$.ajax( {
    	            url: "{{ url_for( 'pianos_update_all_accounts' ) }}",
    	            dataType: 'json',
    	            success: function( data )
    	            {
    	            	if( ! data.error )
	            		{
    	            		toastr.success( "PiAnoS updated" );
	            		} else {
	            			toastr.error( "Error while updating" );
	            		}
    	            }
    	        } );
            }
        </script>
    </head>
    <body class="icnml_main_layout">
        {% include "header.html" %}
        {% include "navigations/admin.html" %}
        
        <div class="icnml_content">
            <div id="pianos_update_all_accounts_button_div">
                <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="pianos_update_all_accounts_button" role="button" aria-disabled="false">
                    <span class="ui-button-text" id="pianos_update_all_accounts_button_span_text">Copy all accounts to PiAnoS</span>
                </a>
            </div>
        </div>
        
        <script type="text/javascript">
        	$( "#pianos_update_all_accounts_button" )
        		.on( 'click', update_all );
        	
        	$( '#icnml_navigation_pianos' )
            	.addClass( 'activated' );
            
            $( '#navloc' ).append(
        		$( '<span />' ).text( "PiAnoS Actions" )
			);
        </script>
    </body>
</html>