Esempio n. 1
0
            echo '	<a href="?id=' . $obj->activity_id . '" class="button delete">Delete</a>';
        }
        echo '</td>';
    }
    echo '</tr>';
}
?>
			</tbody>
		</table>
	</form>
	<?php 
try {
    $icalsess = $ATC->find_current_user_session(ATC_SESSION_TYPE_CALENDAR);
    $icalsess = $icalsess->session_code;
} catch (ATCExceptionInvalidUserSession $e) {
    $icalsess = $ATC->store_session_key($ATC->get_currentuser_id(), null, ATC_SESSION_TYPE_CALENDAR);
}
?>
	<script>
		$("thead th").button().removeClass("ui-corner-all").css({ display: "table-cell" });
		
		$('a.button.delete').button({ icons:{ primary: 'ui-icon-trash' }, text: false }).addClass('ui-state-error').click(function(e){
			e.preventDefault(); // stop the link actually firing
			var href = $(this).attr("href");
			$('#dialog').html("Are you absolutely sure you want to delete this activity?<p>There is <strong>no undo to this action</strong>!").dialog({
				modal: true,
				title: "<span class='ui-icon ui-icon-alert' style='float:left; margin: 0;'>!</span>Warning!",
				buttons: {
					Cancel: function() {
						$( this ).dialog( "close" );
					},