Skip to content

Commit

Permalink
Slight pimp to the "open tickets" widget, didn't align properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Coen Coppens committed Jan 22, 2014
1 parent a709ed5 commit ce2972d
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions View/Elements/Widgets/opentickets.ctp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php echo '<li id="' . $iDashboardWidgetId . '" data-row="' . $iRow . '" data-col="' . $iCol . '" data-sizex="' . $iDataSizeX . '" data-sizey="' . $iDataSizeY . '">'; ?>

<div class="status-count">
<div class="well status-count">

<h4><?php echo $sTitle; ?></h4>
<h4 class="jeditable" id="display_name"><?php echo $sTitle; ?></h4>
<hr class="dark">
<hr class="light">
<h1><?php
Expand Down Expand Up @@ -70,4 +70,38 @@

</div>

</li>
</li>

<?php if( 'Dashboards' == $this->name && 'reorganize' == $this->action ) { ?>

<script type="text/javascript">

$(function() {

$( 'li#<?php echo $iDashboardWidgetId; ?> .jeditable' ).editable( '/autotask/dashboardwidgets/edit/<?php echo $iDashboardWidgetId; ?>', {
indicator : 'Saving..',
tooltip : 'Click to edit'
});

$( 'li#<?php echo $iDashboardWidgetId; ?> .jeditable_setting' ).editable( function( sNewValue, settings ) {

$.post( '/autotask/dashboardwidgetsettings/edit/<?php echo $iDashboardWidgetId; ?>' , {

name: $( this ).attr( 'id' )
, value: sNewValue

} );

return sNewValue;

}, {
indicator : 'Saving..',
tooltip : 'Click to edit',
onblur : 'submit'
});

});

</script>

<?php } ?>

0 comments on commit ce2972d

Please sign in to comment.