@section('page_title') OSAA - Manage Web Ads @stop @section('page_sub_title') Manage Website Advertisements @stop @section('scripts') @parent @stop @section('jquery_init') if(!window.console) { window.console = { log: $.noop, group: $.noop, groupEnd: $.noop }; } // Success bar $('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function () { $(this).delay(6000).fadeOut(4000); $(this).hover(function () { $(this).stop(true).css('opacity', '1.0'); }, function () { $(this).fadeOut(4000); }) }); /* * Custom tooltip items */ $('[data-tooltip]').each(function () { var item = $(this); var help = item.attr('data-tooltip'); item.tooltip({'content' : help, 'items' : item}); }); /* Positioned elements * * Elements that contain the attribute data-position="true" will be positioned * using JQuery's UI positioning utility. Other expected attributes define the * element's position: * data-position-my * data-position-at * data-position-of */ $('[data-position="true"]').each(function() { var element = $(this); var my = element.attr('data-position-my'); var at = element.attr('data-position-at'); var of = element.attr('data-position-of'); var options = $.parseJSON('{ "my" : "' + my + '", "at": "' + at + '", "of": "' + of + '"}'); element.position(options); }); // Table row highlighter function colorRows () { $('table').each(function () { var i = 0; $('tbody tr:visible', $(this)).each(function () { if (i % 2 == 1) { $(this).addClass('odd'); } else { $(this).removeClass('odd'); } i = i + 1; }); }); } colorRows(); /* * Auto-complete text fields */ $('input[type="text"][data-autocomplete]') .each(function() { $(this).autocomplete({'source' : $(this).attr('data-source'), 'minLength' : 3}); }); /* alertRequiredField * * Shows an alert box when attempting to save a blank value to a required field. */ function alertRequiredField() { $('
') .appendTo('body') .dialog( { modal : true, draggable : false, resizable : false, height : 275, width : 415, title : 'Required Field', buttons: [ { text : "OK", 'class' : "float_right", icons : { primary : 'ui-icon-check'}, click : function() { // Close the dialog box $(this).dialog("close"); } } ], open : function () { var dialog_object = $(this); dialog_object.html('