Minor - commenting code

skala
Julio Montoya 13 years ago
parent 33e153c8a8
commit f34cad338b
  1. 19
      main/admin/session_list.php
  2. 42
      main/template/default/agenda/month.tpl

@ -60,6 +60,7 @@ $column_model = array(
$extra_params['autowidth'] = 'true';
//height auto
$extra_params['height'] = 'auto';
$extra_params['excel'] = 'excel';
$extra_params['rowList'] = array(10, 20 ,30);
@ -86,6 +87,24 @@ $("#sessions").jqGrid('navGrid','#sessions_pager', {edit:false,add:false,del:fal
{reloadAfterSubmit:false}, // del options
{width:500} // search options
);
/*
// add custom button to export the data to excel
jQuery("#sessions").jqGrid('navButtonAdd','#sessions_pager',{
caption:"",
onClickButton : function () {
jQuery("#sessions").excelExport();
}
});
jQuery('#sessions').jqGrid('navButtonAdd','#sessions_pager',{id:'pager_csv',caption:'',title:'Export To CSV',onClickButton : function(e)
{
try {
jQuery("#sessions").jqGrid('excelExport',{tag:'csv', url:'grid.php'});
} catch (e) {
window.location= 'grid.php?oper=csv';
}
},buttonicon:'ui-icon-document'})
*/
});
</script>

@ -1,4 +1,23 @@
<script type="text/javascript">
function checkLength( o, n, min, max ) {
if ( o.val().length > max || o.val().length < min ) {
o.addClass( "ui-state-error" );
updateTips( "Length of " + n + " must be between " +
min + " and " + max + "." );
return false;
} else {
return true;
}
}
function clean_user_select() {
//Cleans the selected attr
$('#users_to_send_id')
.find('option')
.removeAttr('selected')
.end();
}
$(document).ready(function() {
var date = new Date();
@ -17,16 +36,14 @@ $(document).ready(function() {
content = $( "#content" ),
allFields = $( [] ).add( title ).add( content ), tips = $(".validateTips");
function checkLength( o, n, min, max ) {
if ( o.val().length > max || o.val().length < min ) {
o.addClass( "ui-state-error" );
updateTips( "Length of " + n + " must be between " +
min + " and " + max + "." );
return false;
} else {
return true;
}
}
$('#users_to_send_id').bind('change', function() {
//alert($("#users_to_send_id option[value='everyone']").attr('selected'));
if ($("#users_to_send_id option[value='everyone']").attr('selected') == 'selected') {
clean_user_select();
$('#users_to_send_id option').eq(0).attr('selected', 'selected');
$("#users_to_send_id").trigger("liszt:updated");
}
});
var calendar = $('#calendar').fullCalendar({
header: {
@ -50,10 +67,7 @@ $(document).ready(function() {
$('#visible_to_input').show();
//Cleans the selected attr
$('#users_to_send_id')
.find('option')
.removeAttr('selected')
.end();
clean_user_select();
//Sets the 1st item selected by default
$('#users_to_send_id option').eq(0).attr('selected', 'selected');

Loading…
Cancel
Save